aalib-1.4.0/0000777000766200001440000000000007272037667006355 5aalib-1.4.0/Makefile.in0000644000766200001440000003132007272037663010331 # 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. #AUTOMAKE_OPTIONS = foreign #include-deps 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@ AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_LIBS = @AALIB_LIBS@ AALIB_RLD_FLAGS = @AALIB_RLD_FLAGS@ AS = @AS@ CC = @CC@ DLLTOOL = @DLLTOOL@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ MAKEINFO = @MAKEINFO@ OBJDUMP = @OBJDUMP@ PACKAGE = @PACKAGE@ RANLIB = @RANLIB@ VERSION = @VERSION@ XCURSES = @XCURSES@ machine = @machine@ system = @system@ SUBDIRS = src man doc EXTRA_DIST = README.OS2 ANNOUNCE aalib.lsm acconfig.h aalib.m4 bin_SCRIPTS = aalib-config m4datadir = $(datadir)/aclocal m4data_DATA = aalib.m4 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = ./src/config.h CONFIG_CLEAN_FILES = aalib-config SCRIPTS = $(bin_SCRIPTS) DATA = $(m4data_DATA) DIST_COMMON = README AUTHORS COPYING ChangeLog INSTALL Makefile.am \ Makefile.in NEWS aalib-config.in acconfig.h aclocal.m4 config.guess \ config.sub configure configure.in install-sh ltconfig ltmain.sh missing \ mkinstalldirs src/config.h.in src/stamp-h.in texinfo.tex 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 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) src/config.h: src/stamp-h @if test ! -f $@; then \ rm -f src/stamp-h; \ $(MAKE) src/stamp-h; \ else :; fi src/stamp-h: $(srcdir)/src/config.h.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES= CONFIG_HEADERS=src/config.h \ $(SHELL) ./config.status @echo timestamp > src/stamp-h 2> /dev/null $(srcdir)/src/config.h.in: $(srcdir)/src/stamp-h.in @if test ! -f $@; then \ rm -f $(srcdir)/src/stamp-h.in; \ $(MAKE) $(srcdir)/src/stamp-h.in; \ else :; fi $(srcdir)/src/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) acconfig.h cd $(top_srcdir) && $(AUTOHEADER) @echo timestamp > $(srcdir)/src/stamp-h.in 2> /dev/null mostlyclean-hdr: clean-hdr: distclean-hdr: -rm -f src/config.h maintainer-clean-hdr: aalib-config: $(top_builddir)/config.status aalib-config.in cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(bindir) @list='$(bin_SCRIPTS)'; for p in $$list; do \ if test -f $$p; then \ echo " $(INSTALL_SCRIPT) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`"; \ $(INSTALL_SCRIPT) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \ else if test -f $(srcdir)/$$p; then \ echo " $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`"; \ $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \ else :; fi; fi; \ done uninstall-binSCRIPTS: @$(NORMAL_UNINSTALL) list='$(bin_SCRIPTS)'; for p in $$list; do \ rm -f $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \ done install-m4dataDATA: $(m4data_DATA) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(m4datadir) @list='$(m4data_DATA)'; for p in $$list; do \ if test -f $(srcdir)/$$p; then \ echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(m4datadir)/$$p"; \ $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(m4datadir)/$$p; \ else if test -f $$p; then \ echo " $(INSTALL_DATA) $$p $(DESTDIR)$(m4datadir)/$$p"; \ $(INSTALL_DATA) $$p $(DESTDIR)$(m4datadir)/$$p; \ fi; fi; \ done uninstall-m4dataDATA: @$(NORMAL_UNINSTALL) list='$(m4data_DATA)'; for p in $$list; do \ rm -f $(DESTDIR)$(m4datadir)/$$p; \ done # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. @SET_MAKE@ all-recursive install-data-recursive install-exec-recursive \ installdirs-recursive install-recursive uninstall-recursive \ check-recursive installcheck-recursive info-recursive dvi-recursive: @set fnord $(MAKEFLAGS); amf=$$2; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: @set fnord $(MAKEFLAGS); amf=$$2; \ dot_seen=no; \ rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \ rev="$$subdir $$rev"; \ test "$$subdir" = "." && dot_seen=yes; \ done; \ test "$$dot_seen" = "no" && rev=". $$rev"; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done tags: TAGS ID: $(HEADERS) $(SOURCES) $(LISP) list='$(SOURCES) $(HEADERS)'; \ unique=`for i in $$list; do echo $$i; done | \ awk ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ here=`pwd` && cd $(srcdir) \ && mkid -f$$here/ID $$unique $(LISP) TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP) tags=; \ here=`pwd`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS)'; \ unique=`for i in $$list; do echo $$i; done | \ awk ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS) mostlyclean-tags: clean-tags: distclean-tags: -rm -f TAGS ID maintainer-clean-tags: distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist -rm -rf $(distdir) GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz mkdir $(distdir)/=build mkdir $(distdir)/=inst dc_install_base=`cd $(distdir)/=inst && pwd`; \ cd $(distdir)/=build \ && ../configure --srcdir=.. --prefix=$$dc_install_base \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) dist -rm -rf $(distdir) @banner="$(distdir).tar.gz is ready for distribution"; \ dashes=`echo "$$banner" | sed s/./=/g`; \ echo "$$dashes"; \ echo "$$banner"; \ echo "$$dashes" dist: distdir -chmod -R a+r $(distdir) GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir) -rm -rf $(distdir) dist-all: distdir -chmod -R a+r $(distdir) GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir) -rm -rf $(distdir) distdir: $(DISTFILES) -rm -rf $(distdir) mkdir $(distdir) -chmod 777 $(distdir) @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ cp -pr $$d/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ || cp -p $$d/$$file $(distdir)/$$file || :; \ fi; \ done for subdir in $(SUBDIRS); do \ if test "$$subdir" = .; then :; else \ test -d $(distdir)/$$subdir \ || mkdir $(distdir)/$$subdir \ || exit 1; \ chmod 777 $(distdir)/$$subdir; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \ || exit 1; \ fi; \ done info-am: info: info-recursive dvi-am: dvi: dvi-recursive check-am: all-am check: check-recursive installcheck-am: installcheck: installcheck-recursive install-exec-am: install-binSCRIPTS install-exec: install-exec-recursive install-data-am: install-m4dataDATA install-data: install-data-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am install: install-recursive uninstall-am: uninstall-binSCRIPTS uninstall-m4dataDATA uninstall: uninstall-recursive all-am: Makefile $(SCRIPTS) $(DATA) all-redirect: all-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install installdirs: installdirs-recursive installdirs-am: $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(m4datadir) mostlyclean-generic: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) -rm -f config.cache config.log stamp-h stamp-h[0-9]* maintainer-clean-generic: mostlyclean-am: mostlyclean-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 \ uninstall-binSCRIPTS install-binSCRIPTS uninstall-m4dataDATA \ install-m4dataDATA install-data-recursive uninstall-data-recursive \ install-exec-recursive uninstall-exec-recursive installdirs-recursive \ uninstalldirs-recursive all-recursive check-recursive \ installcheck-recursive info-recursive dvi-recursive \ mostlyclean-recursive distclean-recursive clean-recursive \ maintainer-clean-recursive tags tags-recursive mostlyclean-tags \ distclean-tags clean-tags maintainer-clean-tags distdir info-am info \ dvi-am dvi check check-am installcheck-am installcheck install-exec-am \ install-exec install-data-am install-data install-am install \ uninstall-am uninstall all-redirect all-am all installdirs-am \ installdirs mostlyclean-generic distclean-generic clean-generic \ maintainer-clean-generic clean mostlyclean distclean maintainer-clean # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: aalib-1.4.0/README0000644000766200001440000000702407272031253007135 Credits(alphabetically) ======================= Jan Hubicka (hubicka@freesoft.cz) Most of aalib code, dos and unix drivers, documentation Thomas A. K. Kjaer (takjaer@daimi.aau.dk) OS/2 driver Tim Newsome (nuisance@cmu.edu) Many extensions into aasave driver. Kamil Toman (toman@artax.karlin.mff.cuni.cz) documentation, some ideas Why such library? ================= I vote for simplicity. There are many problems of various kinds with video cards, low frequency monitors, crashing graphical apps... AA-lib IS the solution. It works on a terminal of any kind, it is fast and portable, it gives to you standard API. It gives to your old hardware more power! Supports: dos (VGA + MDA), stdio, curses, slang, X11, gpm, linux-console, OS/2 What does this software do then ? ================================= AA-lib is a low level gfx library just as many other libraries are. The main difference is that AA-lib does not require graphics device. In fact, there is no graphical output possible. AA-lib replaces those old-fashioned output methods with powerful ascii-art renderer. Now my linux boots with a nice penguin logo at secondary display (yes! Like Win95 does:) AA-lib API is designed to be similar to other graphics libraries. Learning a new API would be a piece of cake! How this all started ==================== Once upon a time we've (my friend Kamil and I) bought two old Herculeses as secondary monitors. We didn't know for that time that our Diamond Stealths 64 cards would become obsolete soon. The next day we downloaded the logo of Linux Texas Users Group - nice silly penguin looking like a cowboy! It was so exciting logo ... we decided that we couldn't live without it and we wanted to see it at boot time as a logo on our secondary monitors. There was a small problem - Hercules doesn't support color graphics. So we decided to convert the penguin image to ascii art using netpbm tools. The output was very ugly because the converting algorithm was absolutely stupid. During the night I designed a new convertor that used a font bitmap to creat an approximation table. The output wasn't very good since the algorithm wasn't tuned so well. Many months this small piece of code was waiting on my disc for the day "D". Meanwhile I started a new project XaoS (a fractal zoomer) with my friend Thomas. And then I got an idea: Ascii Art Mandelbrots! I was really impressed by the result! XaoS was faster, portable and looking much better than ever before. I found a new way to go ... AA-Project ********** dT8 8Tb dT 8 8 Tb dT 8 8 Tb dT 8 8 Tb dT 8 8 Tb Three goals of AA-Project: 1. Port all important software (like Doom, Second Reality, X windows etc..) on AA-lib. 2. Port AA-lib on all available platforms (mainly ZX-Spectrum and Sharp). 3. Force IBM to start manufacturing MDA cards again. AA-project was started by Jan Hubicka. In that times just a few people knew about it. Then a new demo named BB has been released to show the power of AA-lib technology. Now the project is freely available and anyone can help. Where to find AA-lib ******************** Just join our mailing list: `aa-project-discuss@lists.sourceforge.net'. Or just browse our homepage at `http://aa-project.sourceforge.net'. A ton of examples of ascii-art generated by aalib, pointers to other AA-Project resources etc. aalib-1.4.0/AUTHORS0000644000766200001440000000023007272031253007315 Jan Hubicka (hubicka@freesoft.cz) Thomas A. K. Kjaer (takjaer@daimi.aau.dk) Tim Newsome (nuisance@cmu.edu) Kamil Toman (toman@artax.karlin.mff.cuni.cz) aalib-1.4.0/COPYING0000644000766200001440000006126107272031253007313 GNU LIBRARY GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 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. [This is the first released version of the library GPL. It is numbered 2 because it goes with version 2 of the ordinary GPL.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Library General Public License, applies to some specially designated Free Software Foundation software, and to any other libraries whose authors decide to use it. You can use it for your libraries, 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 library, or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link a program with the library, you must provide complete object files to the recipients so that they can relink them with the library, after making changes to the library and recompiling it. And you must show them these terms so they know their rights. Our method of protecting your rights has two steps: (1) copyright the library, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the library. Also, for each distributor's protection, we want to make certain that everyone understands that there is no warranty for this free library. If the library is modified by someone else and passed on, we want its recipients to know that what they have is not the original version, 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 companies distributing free software will individually obtain patent licenses, thus in effect transforming the program into proprietary software. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License, which was designed for utility programs. This license, the GNU Library General Public License, applies to certain designated libraries. This license is quite different from the ordinary one; be sure to read it in full, and don't assume that anything in it is the same as in the ordinary license. The reason we have a separate public license for some libraries is that they blur the distinction we usually make between modifying or adding to a program and simply using it. Linking a program with a library, without changing the library, is in some sense simply using the library, and is analogous to running a utility program or application program. However, in a textual and legal sense, the linked executable is a combined work, a derivative of the original library, and the ordinary General Public License treats it as such. Because of this blurred distinction, using the ordinary General Public License for libraries did not effectively promote software sharing, because most developers did not use the libraries. We concluded that weaker conditions might promote sharing better. However, unrestricted linking of non-free programs would deprive the users of those programs of all benefit from the free status of the libraries themselves. This Library General Public License is intended to permit developers of non-free programs to use free libraries, while preserving your freedom as a user of such programs to change the free libraries that are incorporated in them. (We have not seen how to achieve this as regards changes in header files, but we have achieved it as regards changes in the actual functions of the Library.) The hope is that this will lead to faster development of free libraries. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, while the latter only works together with the library. Note that it is possible for a library to be covered by the ordinary General Public License rather than by this special one. GNU LIBRARY GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Library General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, 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 library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete 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 distribute a copy of this License along with the Library. 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 Library or any portion of it, thus forming a work based on the Library, 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) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, 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 Library, 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 Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you 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. If distribution of 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 satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also compile or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. c) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. d) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. 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. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library 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. 9. 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 Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library 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. 11. 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 Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library 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 Library. 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. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library 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. 13. The Free Software Foundation may publish revised and/or new versions of the Library 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 Library 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 Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, 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 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "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 LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. 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 LIBRARY 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 LIBRARY (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 LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), 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 Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. 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) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; 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. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. , 1 April 1990 Ty Coon, President of Vice That's all there is to it! aalib-1.4.0/ChangeLog0000644000766200001440000000710107272031277010031 Changes in version 1.3 o Automake/libtools/autoconf updated. o Package restructured o Some bugfixes. o New "raw" keyboard driver for linux console alowing to detect key releases. o Fixed -malign-double gcc binarry compatibility problem o Added const keywords to sources where possible. o AAlib.h documented o Lots of fixes from Debian maitainer Joey Hess installed o c2man generated manual pages added o Rest of changelog was lost in the disc crash.... o Fixed X driver handling of refresh o Optimized X driver o X driver now allows setting font using AAFont environment variable o Added aalib-config Changes in version 1.1 Fixes: o Fixed help text o Fixed (I hope) problems with ncurses renamed to curses o Fixed release event in X11 driver o Fixed problems with -s ar options o Fixed problems with one pass linkers o X driver now handler non alphabed keys o Fixed GPM mouse cursor overflowing o Fixed compilation problem of aalinux w/o gpm libs Cleanups: o Stderr driver merged with stdout. They share most of code now o All program names starts with aa to avoid colisions Speedups: o Speedups in random dithering New features: o New API call for hidding mouse cursor o New dos keyboard handler o DOS mouse driver o Documentation for writing new driver. o Added aa_printf o Driverdata mechanizm is now useable o X driver updated so it can now handle multiple windows o Now uses automake to generate Makefiles o AAsave extensions by Tim Newsome: o AAsave now accepts %x %y in filename for pages You have to use %% for % o Format now specifies conversion list - so conversions like & -> & should be done ellegantly o added . to extension name - should be usefull to specify no extensions etc.. o New formats: irc, zephyr and roff Revisions of this patch by Jan Hubicka o AAsave now accepts %e for extension and %c for string _%x_%y in case extensions is used (so you might simply add %c%e after filename to get nice results) o extension field of structure returned back for backward compatibility and since I think it is good place to hold default extension for given type. It is not added by default now, but at %e command in filename o Conversion list format changed from [500] array, since it increased executable file size too much. Used pointer to pointer instead. o For one page formats pointer to FILE * structure should be passed instad of filename o Added new formats into formats list o Changed conversions mechanizm a bit to avoid unfreed memory areas. o Avoided conflict in case multiple aa_save filters are up and in threads and some other problems o AA-lib is now under LGPL! API Uncompatibilities: hope last ones for long time :) - better to do them sooner than wait :) o X driver now uses default size (w/o asking) since it is not usual in X11. Use command line options instead :) o AA_getkey now returns just keypresses. Not releases anymore (was bug) o Removed update driver call since it is generaly unused. o stupid typo - MAKS renamed to MASK o You need to add %c%e at the end of name fileld for aa_save to get correct results (see comments bellow) o fontxx renamed to aa_fontxx to avoid confusion with other symbols o context->driver->params moved into context->driverparams since one driver should handle multiple devices with different parameters driverparams is taken as parameter into init (broke compatibility with old aview. New aview is comming soon!) New port: o OS2 port by Thomas A. K. Kjaer Changes in version 1.0 o Initial version aalib-1.4.0/INSTALL0000644000766200001440000000150107272031253007300 For Unix In most cases you should use: CFLAGS=your best optimizing switches export CFLAGS #note that first two lines are usually not needed in case you use #gnu c compiler where AA-lib uses quite good ones automatically ./configure make make install see help for configure in case of problems For DOS: you need to compile vga/text libraries: (available at AA-lib homepage http://aa-project.sourceforge.net/aalib/) cd ../vga make cd ../text make then you can finally compile AA-lib cd os2 ; make -f makefile.dos then you should copy libaa.a libvga.a or libtext.a to your lib directory and libaa.h to your include directory All programs in AA-project expects AA-lib,vga and text archive in uncompressed and compiled in same directory as sources of them aalib-1.4.0/Makefile.am0000644000766200001440000000031607272031300010277 #AUTOMAKE_OPTIONS = foreign #include-deps SUBDIRS=src man doc EXTRA_DIST = README.OS2 ANNOUNCE aalib.lsm acconfig.h aalib.m4 bin_SCRIPTS = aalib-config m4datadir = $(datadir)/aclocal m4data_DATA = aalib.m4 aalib-1.4.0/NEWS0000644000766200001440000000137407272031300006747 Noteworthly changes in aalib-1.3 are: - Raw keyboard driver for Linux console - many bugfixes - "reference" section in texinfo documentation - Manual pages - Comments in aalib.h - Many "const" keywords added - Configure no longer attempts to guess optimization switches. - c2man generated manual pages added - X driver now allows setting font using AAFont environment variable - Added SDL/GTK+ like configuration scheme Noteworthly changes in aalib-1.1 are: shared library support, better DOS mouse/keyboard support, OS/2 drivers, multiple windows support for X11 driver, Save driver now allows to specify FILE * instead of filename, new save formats, and other enhancements to save driver, few API changes (see ChangeLog) and many bugfixes aalib-1.4.0/aalib-config.in0000644000766200001440000000300407272031253011112 #!/bin/sh prefix=@prefix@ exec_prefix=@exec_prefix@ exec_prefix_set=no usage="\ Usage: aalib-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--libs] [--cflags]" if test $# -eq 0; then echo "${usage}" 1>&2 exit 1 fi while test $# -gt 0; do case "$1" in -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; *) optarg= ;; esac case $1 in --prefix=*) prefix=$optarg if test $exec_prefix_set = no ; then exec_prefix=$optarg fi ;; --prefix) echo $prefix ;; --exec-prefix=*) exec_prefix=$optarg exec_prefix_set=yes ;; --exec-prefix) echo $exec_prefix ;; --version) echo @VERSION@ ;; --cflags) if test @includedir@ != /usr/include ; then # Handle oddities in Win32 path handling (assumes prefix) prefix=`echo ${prefix} | sed 's,^//\([A-Z]\),\1:,'` includes=-I@includedir@ fi echo -I@includedir@ @AALIB_CFLAGS@ ;; @ENABLE_SHARED_TRUE@ --libs) @ENABLE_SHARED_TRUE@ libdirs="-L@libdir@ @AALIB_RLD_FLAGS@" @ENABLE_SHARED_TRUE@ echo $libdirs @AALIB_LIBS@ @ENABLE_SHARED_TRUE@ ;; @ENABLE_STATIC_TRUE@@ENABLE_SHARED_TRUE@ --static-libs) @ENABLE_STATIC_TRUE@@ENABLE_SHARED_FALSE@ --libs|--static-libs) @ENABLE_STATIC_TRUE@ libdirs="-L@libdir@ @AALIB_RLD_FLAGS@" @ENABLE_STATIC_TRUE@ echo $libdirs @AALIB_LIBS@ @ENABLE_STATIC_TRUE@ ;; *) echo "${usage}" 1>&2 exit 1 ;; esac shift done aalib-1.4.0/acconfig.h0000644000766200001440000000057007272031253010176 #undef CURSES_DRIVER #undef X11_DRIVER #undef SLANG_DRIVER #undef LINUX_DRIVER #undef CURSES_KBDDRIVER #undef X11_KBDDRIVER #undef SLANG_KBDDRIVER #undef LINUX_KBDDRIVER #undef CURSES_MOUSEDRIVER #undef GPM_MOUSEDRIVER #undef X11_MOUSEDRIVER #undef PACKAGE #undef VERSION #undef SUNOS_CURSES #undef NO_COLOR_SUPPORT #undef USE_CURSES #undef USE_NCURSES #undef USE_SYSV_CURSES aalib-1.4.0/aclocal.m40000644000766200001440000004405107272032144010116 dnl 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. # 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([,]))]) # serial 40 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 $lt_target \ || 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 case "$target" in NONE) lt_target="$host" ;; *) lt_target="$target" ;; esac # 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 "$lt_target" 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_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_CHECK_LIBM - check for math library AC_DEFUN(AC_CHECK_LIBM, [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case "$lt_target" 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 and INCLTDL to the include flags for # the libltdl header and adds --enable-ltdl-convenience to the # configure arguments. Note that LIBLTDL and INCLTDL are not # AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not # provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed # with '${top_builddir}/' and INCLTDL will be prefixed with # '${top_srcdir}/' (note the single quotes!). If your package is not # flat and you're not using automake, define top_builddir and # top_srcdir appropriately 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='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) ]) # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for # the libltdl installable library and INCLTDL to the include flags for # the libltdl header and adds --enable-ltdl-install to the configure # arguments. Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is # AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed # libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will # be prefixed with '${top_builddir}/' and INCLTDL will be prefixed # with '${top_srcdir}/' (note the single quotes!). If your package is # not flat and you're not using automake, define top_builddir and # top_srcdir appropriately 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='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) else ac_configure_args="$ac_configure_args --enable-ltdl-install=no" LIBLTDL="-lltdl" INCLTDL= 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 silence aclocal about the macro not being used ifelse([AC_DISABLE_FAST_INSTALL])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]) aalib-1.4.0/config.guess0000755000766200001440000011450607272031253010601 #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. timestamp='2001-03-30' # 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 . # Please send patches to . # # 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 build system type. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit 0 ;; --version | -v ) echo "$version" ; exit 0 ;; --help | --h* | -h ) echo "$usage"; exit 0 ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi dummy=dummy-$$ trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int dummy(){}" > $dummy.c for c in cc gcc c89 ; do ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 if test $? = 0 ; then CC_FOR_BUILD="$c"; break fi done rm -f $dummy.c $dummy.o $dummy.rel if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac # 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 # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # Netbsd (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # Determine the machine/vendor (is the vendor relevant). case "${UNAME_MACHINE}" in amiga) machine=m68k-unknown ;; arm32) machine=arm-unknown ;; atari*) machine=m68k-atari ;; sun3*) machine=m68k-sun ;; mac68k) machine=m68k-apple ;; macppc) machine=powerpc-apple ;; hp3[0-9][05]) machine=m68k-hp ;; ibmrt|romp-ibm) machine=romp-ibm ;; *) machine=${UNAME_MACHINE}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE}" in i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k) if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep __ELF__ >/dev/null then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit 0 ;; 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 .data \$Lformat: .byte 37,100,45,37,120,10,0 # "%d-%x\n" .text .globl main .align 4 .ent main main: .frame \$30,16,\$26,0 ldgp \$29,0(\$27) .prologue 1 .long 0x47e03d80 # implver \$0 lda \$2,-1 .long 0x47e20c21 # amask \$2,\$1 lda \$16,\$Lformat mov \$0,\$17 not \$1,\$18 jsr \$26,printf ldgp \$29,0(\$26) mov 0,\$16 jsr \$26,exit .end main EOF $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null if test "$?" = 0 ; then case `./$dummy` in 0-0) UNAME_MACHINE="alpha" ;; 1-0) UNAME_MACHINE="alphaev5" ;; 1-1) UNAME_MACHINE="alphaev56" ;; 1-101) UNAME_MACHINE="alphapca56" ;; 2-303) UNAME_MACHINE="alphaev6" ;; 2-307) UNAME_MACHINE="alphaev67" ;; esac fi rm -f $dummy.s $dummy echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit 0 ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit 0 ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit 0 ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 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 ;; *:OS/390:*:*) echo i370-ibm-openedition exit 0 ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit 0;; SR2?01:HI-UX/MPP:*:* | SR8000: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*:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit 0 ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit 0 ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit 0 ;; sun3*:OpenBSD:*:*) echo m68k-unknown-openbsd${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 ;; 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:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit 0 ;; mips:*:*:UMIPS | mips:*:*:RISCos) sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #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_FOR_BUILD $dummy.c -o $dummy \ && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ && rm -f $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 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${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 ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} 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_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $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:*:[45]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${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=${UNAME_VERSION}.${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 BSD 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:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) case "${HPUX_REV}" in 11.[0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; esac ;; esac fi ;; esac if [ "${HP_ARCH}" = "" ]; then sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #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 (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy` if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi rm -f $dummy.c $dummy fi ;; esac echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit 0 ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-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_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $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 ;; *9??*:MPE/iX:*:*) echo hppa1.0-hp-mpeix 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 ;; hppa*:OpenBSD:*:*) echo hppa-unknown-openbsd 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} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*T3D:*:*:*) echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY-2:*:*:*) echo cray2-cray-unicos exit 0 ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit 0 ;; hp300:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; i?86:BSD/386:*:* | i?86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit 0 ;; sparc*:BSD/OS:*:*) echo sparc-unknown-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 ;; *: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 ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit 0 ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i386-pc-interix exit 0 ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin 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 ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit 0 ;; arm*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux exit 0 ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; mips:Linux:*:*) cat >$dummy.c < /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #ifdef __MIPSEB__ printf ("%s-unknown-linux-gnu\n", argv[1]); #endif #ifdef __MIPSEL__ printf ("%sel-unknown-linux-gnu\n", argv[1]); #endif return 0; } EOF $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy ;; ppc:Linux:*:*) # Determine Lib Version cat >$dummy.c < #if defined(__GLIBC__) extern char __libc_version[]; extern char __libc_release[]; #endif main(argc, argv) int argc; char *argv[]; { #if defined(__GLIBC__) printf("%s %s\n", __libc_version, __libc_release); #else printf("unknown\n"); #endif return 0; } EOF LIBC="" $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null if test "$?" = 0 ; then ./$dummy | grep 1\.99 > /dev/null if test "$?" = 0 ; then LIBC="libc1" ; fi fi rm -f $dummy.c $dummy echo powerpc-unknown-linux-gnu${LIBC} exit 0 ;; alpha:Linux:*:*) cat <$dummy.s .data \$Lformat: .byte 37,100,45,37,120,10,0 # "%d-%x\n" .text .globl main .align 4 .ent main main: .frame \$30,16,\$26,0 ldgp \$29,0(\$27) .prologue 1 .long 0x47e03d80 # implver \$0 lda \$2,-1 .long 0x47e20c21 # amask \$2,\$1 lda \$16,\$Lformat mov \$0,\$17 not \$1,\$18 jsr \$26,printf ldgp \$29,0(\$26) mov 0,\$16 jsr \$26,exit .end main EOF LIBC="" $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null if test "$?" = 0 ; then case `./$dummy` in 0-0) UNAME_MACHINE="alpha" ;; 1-0) UNAME_MACHINE="alphaev5" ;; 1-1) UNAME_MACHINE="alphaev56" ;; 1-101) UNAME_MACHINE="alphapca56" ;; 2-303) UNAME_MACHINE="alphaev6" ;; 2-307) UNAME_MACHINE="alphaev67" ;; 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 ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit 0 ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit 0 ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit 0 ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit 0 ;; i?86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. ld_supported_emulations=`cd /; ld --help 2>&1 \ | 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 ;; elf_i?86) TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ;; i?86coff) echo "${UNAME_MACHINE}-pc-linux-gnucoff" exit 0 ;; esac # 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. test -z "$ld_supported_emulations" && 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 < #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #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_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 ;; # 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.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit 0 ;; i?86:*:5:7*) # Fixed at (any) Pentium or better UNAME_MACHINE=i586 if [ ${UNAME_SYSTEM} = "UnixWare" ] ; then echo ${UNAME_MACHINE}-sco-sysv${UNAME_RELEASE}uw${UNAME_VERSION} 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 (/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit 0 ;; i?86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit 0 ;; pc:*:*:*) # Left here for compatibility: # 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]??A:*: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.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit 0 ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit 0 ;; i?86:LynxOS:2.*:* | i?86:LynxOS:3.[01]*:* | i?86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit 0 ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit 0 ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit 0 ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 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 ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000: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 ;; *:Darwin:*:*) echo `uname -p`-apple-darwin${UNAME_RELEASE} exit 0 ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) if test "${UNAME_MACHINE}" = "x86pc"; then UNAME_MACHINE=pc fi echo `uname -p`-${UNAME_MACHINE}-nto-qnx exit 0 ;; *:QNX:*:4*) echo i386-pc-qnx exit 0 ;; NSR-[KW]:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit 0 ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit 0 ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit 0 ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit 0 ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit 0 ;; i?86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit 0 ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit 0 ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit 0 ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit 0 ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit 0 ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit 0 ;; *:ITS:*:*) echo pdp10-unknown-its 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) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # 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_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $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 cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: aalib-1.4.0/config.sub0000755000766200001440000006570607272031253010253 #! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. timestamp='2001-03-30' # 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. # Please send patches to . # # 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. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit 0 ;; --version | -v ) echo "$version" ; exit 0 ;; --help | --h* | -h ) echo "$usage"; exit 0 ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit 0;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; 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 nto-qnx* | linux-gnu* | storm-chaos* | os2-emx*) 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 | -axis) os= basic_machine=$1 ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks 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/'` ;; -udk*) 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 ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; 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 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc \ | arm | arme[lb] | arm[bl]e | armv[2345] | armv[345][lb] | strongarm | xscale \ | pyramid | mn10200 | mn10300 | tron | a29k \ | 580 | i960 | h8300 \ | x86 | ppcbe | mipsbe | mipsle | shbe | shle \ | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \ | hppa64 \ | alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \ | alphaev6[78] \ | we32k | ns16k | clipper | i370 | sh | sh[34] \ | powerpc | powerpcle \ | 1750a | dsp16xx | pdp10 | pdp11 \ | mips16 | mips64 | mipsel | mips64el \ | mips64orion | mips64orionel | mipstx39 | mipstx39el \ | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \ | mips64vr5000 | miprs64vr5000el | mcore | s390 | s390x \ | sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \ | thumb | d10v | d30v | fr30 | avr | openrisc | tic80 \ | pj | pjl | h8500) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | w65) ;; # 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[234567]86 | x86_64) 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. # FIXME: clean up the formatting here. vax-* | tahoe-* | i[234567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \ | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | c[123]* \ | arm-* | armbe-* | armle-* | armv*-* | strongarm-* | xscale-* \ | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \ | xmp-* | ymp-* \ | x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* \ | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \ | hppa2.0n-* | hppa64-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \ | alphaev6[78]-* \ | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \ | clipper-* | orion-* \ | sparclite-* | pdp10-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \ | sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \ | mips64el-* | mips64orion-* | mips64orionel-* \ | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \ | mipstx39-* | mipstx39el-* | mcore-* \ | f30[01]-* | f700-* | s390-* | s390x-* | sv1-* | t3e-* \ | [cjt]90-* \ | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \ | thumb-* | v850-* | d30v-* | tic30-* | tic80-* | c30-* | fr30-* \ | bs2000-* | tic54x-* | c54x-* | x86_64-* | pj-* | pjl-*) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; 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-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; 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 ;; [cjt]90) basic_machine=${basic_machine}-cray os=-unicos ;; crds | unos) basic_machine=m68k-crds ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; 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 ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-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 ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # 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 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; 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 ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; 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 ;; mmix*) basic_machine=mmix-knuth os=-mmixware ;; monitor) basic_machine=m68k-rom68k os=-coff ;; msdos) basic_machine=i386-pc os=-msdos ;; mvs) basic_machine=i370-ibm os=-mvs ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; 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 ;; necv70) basic_machine=v70-nec os=-sysv ;; 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 ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; 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 | k6 | nexgen) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon) basic_machine=i686-pc ;; pentiumii | pentium2) basic_machine=i686-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-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 ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sparclite-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; 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 ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=t3e-cray os=-unicos ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; 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 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; 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 ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xmp) basic_machine=xmp-cray os=-unicos ;; xps | xps100) basic_machine=xps100-honeywell ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; 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. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; 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 ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh3 | sh4) basic_machine=sh-unknown ;; sparc | sparcv9) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; c4x*) basic_machine=c4x-none os=-coff ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) 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* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* | -os2*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i[34567]86-*) ;; *) os=-nto$os ;; esac ;; -nto*) os=-nto-qnx ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -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|'` ;; -opened*) os=-openedition ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # 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*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -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*-rebel) os=-linux ;; arm*-semi) os=-aout ;; pdp10-*) os=-tops20 ;; 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 ;; m68*-cisco) os=-aout ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; *-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 ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-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 ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) 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 ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -ptx*) vendor=sequent ;; -vxsim* | -vxworks*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: aalib-1.4.0/configure0000755000766200001440000042524407272032146010176 #! /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=yes]" 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 --with-x11-driver=no Used to disable x11 driver" ac_help="$ac_help --with-slang-driver=no Used to disable slang driver" ac_help="$ac_help --with-curses-driver=no/yes Used to disable/force curses driver" ac_help="$ac_help --with-gpm-mouse=base-dir Specifies the base gpm directory" ac_help="$ac_help --with-x use the X Window System" 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[=base-dir] Compile with ncurses/locate base dir" # 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/aalib.c # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then its parent. ac_prog=$0 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. srcdir=$ac_confdir if test ! -r $srcdir/$ac_unique_file; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } else { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } fi fi srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` # Prefer explicitly selected file to automatically selected ones. if test -z "$CONFIG_SITE"; then if test "x$prefix" != xNONE; then CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" else CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then echo "loading site script $ac_site_file" . "$ac_site_file" fi done if test -r "$cache_file"; then echo "loading cache $cache_file" . $cache_file else echo "creating cache $cache_file" > $cache_file fi ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' cross_compiling=$ac_cv_prog_cc_cross ac_exeext= ac_objext=o if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then ac_n= ac_c=' ' ac_t=' ' else ac_n=-n ac_c= ac_t= fi else ac_n= ac_c='\c' ac_t= fi ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do if test -f $ac_dir/install-sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f $ac_dir/install.sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break fi done if test -z "$ac_aux_dir"; then { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } fi ac_config_guess=$ac_aux_dir/config.guess ac_config_sub=$ac_aux_dir/config.sub ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 echo "configure:584: 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:637: 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:694: 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=aalib VERSION=1.4.0 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:740: 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:753: 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:766: 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:779: 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:792: 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:812: 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 echo $ac_n "checking target system type""... $ac_c" 1>&6 echo "configure:833: checking target system type" >&5 target_alias=$target case "$target_alias" in NONE) case $nonopt in NONE) target_alias=$host_alias ;; *) target_alias=$nonopt ;; esac ;; esac target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$target" 1>&6 AALIB_CFLAGS="" AALIB_LIBS="-laa" if test x$enable_video = xtrue; then if test "$VIDEO_SUBDIRS" = ""; then { echo "configure: error: *** No video drivers are enabled!" 1>&2; exit 1; } fi fi x_driver_test=yes curses_driver_test=yes linux_driver_test=yes slang_driver_test=yes force_curses_driver=false x_kbddriver_test=yes curses_kbddriver_test=yes slang_kbddriver_test=yes curses_mousedriver_test=yes gpm_mousedriver_test=yes x_mousedriver_test=yes use_cc_g_flag=no # 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:882: 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:912: 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:963: 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:995: 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 1006 "configure" #include "confdefs.h" main(){return(0);} EOF if { (eval echo configure:1011: \"$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:1037: 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:1042: 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:1070: 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 # 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=yes 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:1171: 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 # 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:1191: 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 # 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:1230: 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:1254: checking for GNU ld" >&5 else echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 echo "configure:1257: 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:1292: 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:1308: 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 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 echo "configure:1344: 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 case "$target" in NONE) lt_target="$host" ;; *) lt_target="$target" ;; esac # 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" # 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 "$lt_target" in *-*-irix6*) # Find out which ABI we are using. echo '#line 1393 "configure"' > conftest.$ac_ext if { (eval echo configure:1394: \"$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:1415: 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 $lt_target \ || { 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 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 echo "configure:1529: 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:1567: 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 "uname", so it can be a program name with args. set dummy uname; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:1624: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_system'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$system"; then ac_cv_prog_system="$system" # 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_system="`uname`" break fi done IFS="$ac_save_ifs" test -z "$ac_cv_prog_system" && ac_cv_prog_system="unknown" fi fi system="$ac_cv_prog_system" if test -n "$system"; then echo "$ac_t""$system" 1>&6 else echo "$ac_t""no" 1>&6 fi if test "x$system" = xLinux; then # Extract the first word of "uname", so it can be a program name with args. set dummy uname; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:1655: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_machine'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$machine"; then ac_cv_prog_machine="$machine" # 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_machine="`uname --machine`" break fi done IFS="$ac_save_ifs" test -z "$ac_cv_prog_machine" && ac_cv_prog_machine="unknown" fi fi machine="$ac_cv_prog_machine" if test -n "$machine"; then echo "$ac_t""$machine" 1>&6 else echo "$ac_t""no" 1>&6 fi fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 echo "configure:1684: 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:1705: \"$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:1722: \"$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:1739: \"$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:1764: 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:1777: \"$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:1844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* ac_cv_header_stdc=no fi rm -fr conftest* fi fi fi echo "$ac_t""$ac_cv_header_stdc" 1>&6 if test $ac_cv_header_stdc = yes; then cat >> confdefs.h <<\EOF #define STDC_HEADERS 1 EOF fi echo $ac_n "checking for pow in -lm""... $ac_c" 1>&6 echo "configure:1868: checking for pow in -lm" >&5 ac_lib_var=`echo m'_'pow | 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="-lm $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 m | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 fi if test "x$ac_cv_lib_m_pow" = xyes; then AALIB_LIBS="$AALIB_LIBS -lm" fi cc_uses_g=yes if test x$GCC = xyes; then if test x$ac_cv_prog_gcc_g = xyes; then : else cc_uses_g=no fi fi # Check whether --with-x11-driver or --without-x11-driver was given. if test "${with_x11_driver+set}" = set; then withval="$with_x11_driver" if test x$withval = xno; then x_driver_test=no fi fi # Check whether --with-slang-driver or --without-slang-driver was given. if test "${with_slang_driver+set}" = set; then withval="$with_slang_driver" if test x$withval = xno; then slang_driver_test=no fi fi # Check whether --with-curses-driver or --without-curses-driver was given. if test "${with_curses_driver+set}" = set; then withval="$with_curses_driver" if test x$withval = xno; then curses_driver_test=no fi if test x$withval = xyes; then force_curses_driver=true fi fi # Check whether --with-gpm-mouse or --without-gpm-mouse was given. if test "${with_gpm_mouse+set}" = set; then withval="$with_gpm_mouse" if test x$withval = xyes then echo "configure: warning: Usage is: --with-gpm-mouse=base-dir" 1>&2 else LIBS="$LIBS -L$withval/lib -lgpm" cat >> confdefs.h <<\EOF #define GPM_MOUSEDRIVER 1 EOF gpm_mousedriver=true CFLAGS="$CFLAGS -I$withval/include" AALIB_LIBS="$AALIB_LIBS -L$withval/lib -lgpm" echo "$ac_t""defining use_gpm" 1>&6 fi fi if test "$x_driver_test" = yes; then # 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:1988: 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:2055: \"$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:2237: 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:2302: 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:2343: 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:2391: 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:2419: \"$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:2440: 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:2489: 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:2517: \"$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:2538: 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:2581: 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:2609: \"$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:2630: 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:2673: 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:2701: \"$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:2722: 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:2774: 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$no_x" = x; then x_driver=true cat >> confdefs.h <<\EOF #define X11_DRIVER 1 EOF LIBS="$LIBS $X_EXTRA_LIBS $X_LIBS -lX11" AALIB_LIBS="$AALIB_LIBS $X_EXTRA_LIBS $X_LIBS -lX11" CFLAGS="$CFLAGS $X_CFLAGS" fi fi if test "$gpm_mousedriver_test" = yes; then echo $ac_n "checking for Gpm_Repeat in -lgpm""... $ac_c" 1>&6 echo "configure:2831: checking for Gpm_Repeat in -lgpm" >&5 ac_lib_var=`echo gpm'_'Gpm_Repeat | 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="-lgpm $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 cat >> confdefs.h <<\EOF #define GPM_MOUSEDRIVER 1 EOF gpm_mousedriver=true AALIB_LIBS="$AALIB_LIBS -lgpm" LIBS="$LIBS -lgpm" else echo "$ac_t""no" 1>&6 fi fi search_ncurses=true XCURSES="" # 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 curses_driver=true 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 SUNOS_CURSES 1 EOF cat >> confdefs.h <<\EOF #define NO_COLOR_SUPPORT 1 EOF cat >> confdefs.h <<\EOF #define USE_SYSV_CURSES 1 EOF CFLAGS="$CFLAGS -I/usr/5include" XCURSES="xcurses.o /usr/5lib/libcurses.a /usr/5lib/libtermcap.a" echo "$ac_t""Please note that some screen refreshs may fail" 1>&6 echo "configure: warning: Reconsider using Slang" 1>&2 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 curses_driver=true screen_manager="OSF1 curses" cat >> confdefs.h <<\EOF #define NO_COLOR_SUPPORT 1 EOF cat >> confdefs.h <<\EOF #define USE_SYSV_CURSES 1 EOF XCURSES="xcurses.o" LIBS="$LIBS -lcurses" AALIB_LIBS="$AALIB_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 CFLAGS="$CFLAGS" else CFLAGS="$CFLAGS -I$withval" fi echo "$ac_t""Using SysV curses" 1>&6 curses_driver=true cat >> confdefs.h <<\EOF #define USE_SYSV_CURSES 1 EOF XCURSES="" search_ncurses=false screen_manager="SysV/curses" LIBS="$LIBS -lcurses" AALIB_LIBS="$AALIB_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 = xyes then search_ncurses=true else LIBS="$LIBS -L$withval/lib -lncurses" AALIB_LIBS="$AALIB_LIBS -L$withval/lib -lncurses" CFLAGS="$CFLAGS -I$withval/include" search_ncurses=false curses_driver=true screen_manager="ncurses" cat >> confdefs.h <<\EOF #define USE_NCURSES 1 EOF fi fi if test "$slang_driver_test" = yes; then if $search_slang then if test -f /usr/include/slang.h then LIBS1="$LIBS" LIBS="$LIBS " echo $ac_n "checking for SLsmg_init_smg in -lslang""... $ac_c" 1>&6 echo "configure:3010: checking for SLsmg_init_smg in -lslang" >&5 ac_lib_var=`echo slang'_'SLsmg_init_smg | 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="-lslang $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 slang | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 fi if test "x$ac_cv_lib_slang_SLsmg_init_smg" = xyes; then echo "$ac_t""Found slang on /usr/include/slang.h" 1>&6 AALIB_LIBS="$AALIB_LIBS -lslang" LIBS="$LIBS " CFLAGS="$CFLAGS -I/usr/include " slang_driver=true search_slang=false cat >> confdefs.h <<\EOF #define SLANG_DRIVER 1 EOF else unset ac_cv_lib_slang_SLsmg_init_smg LIBS="$LIBS1" fi fi fi if $search_slang then if test -f /usr/include/slang/slang.h then LIBS1="$LIBS" LIBS="$LIBS " echo $ac_n "checking for SLsmg_init_smg in -lslang""... $ac_c" 1>&6 echo "configure:3082: checking for SLsmg_init_smg in -lslang" >&5 ac_lib_var=`echo slang'_'SLsmg_init_smg | 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="-lslang $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 slang | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 fi if test "x$ac_cv_lib_slang_SLsmg_init_smg" = xyes; then echo "$ac_t""Found slang on /usr/include/slang/slang.h" 1>&6 AALIB_LIBS="$AALIB_LIBS -lslang" LIBS="$LIBS " CFLAGS="$CFLAGS -I/usr/include/slang " slang_driver=true search_slang=false cat >> confdefs.h <<\EOF #define SLANG_DRIVER 1 EOF else unset ac_cv_lib_slang_SLsmg_init_smg LIBS="$LIBS1" fi fi fi if $search_slang then if test -f /usr/local/include/slang.h then LIBS1="$LIBS" LIBS="$LIBS " echo $ac_n "checking for SLsmg_init_smg in -lslang""... $ac_c" 1>&6 echo "configure:3154: checking for SLsmg_init_smg in -lslang" >&5 ac_lib_var=`echo slang'_'SLsmg_init_smg | 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="-lslang $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 slang | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 fi if test "x$ac_cv_lib_slang_SLsmg_init_smg" = xyes; then echo "$ac_t""Found slang on /usr/local/include/slang.h" 1>&6 AALIB_LIBS="$AALIB_LIBS -lslang" LIBS="$LIBS " CFLAGS="$CFLAGS -I/usr/local/include/slang " slang_driver=true search_slang=false cat >> confdefs.h <<\EOF #define SLANG_DRIVER 1 EOF else unset ac_cv_lib_slang_SLsmg_init_smg LIBS="$LIBS1" fi fi fi if $search_slang then if test -f /usr/local/include/slang/slang.h then LIBS1="$LIBS" LIBS="$LIBS " echo $ac_n "checking for SLsmg_init_smg in -lslang""... $ac_c" 1>&6 echo "configure:3226: checking for SLsmg_init_smg in -lslang" >&5 ac_lib_var=`echo slang'_'SLsmg_init_smg | 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="-lslang $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 slang | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 fi if test "x$ac_cv_lib_slang_SLsmg_init_smg" = xyes; then echo "$ac_t""Found slang on /usr/local/include/slang/slang.h" 1>&6 AALIB_LIBS="$AALIB_LIBS -lslang" LIBS="$LIBS " CFLAGS="$CFLAGS -I/usr/local/include/slang " slang_driver=true search_slang=false cat >> confdefs.h <<\EOF #define SLANG_DRIVER 1 EOF else unset ac_cv_lib_slang_SLsmg_init_smg LIBS="$LIBS1" fi fi fi if test "$slang_driver" = true; then if test "$force_curses_driver" = false; then echo "Disabling curses driver since slang is available" curses_driver_test=no fi fi fi if test "$curses_driver_test" = yes; then if $search_ncurses then echo "checking "location of curses"" 1>&6 echo "configure:3306: checking "location of curses"" >&5 if $search_ncurses then if test -f /usr/include/ncurses.h then LIBS1="$LIBS" LIBS="$LIBS " echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6 echo "configure:3316: checking for initscr in -lncurses" >&5 ac_lib_var=`echo ncurses'_'initscr | 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="-lncurses $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 ncurses | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 fi if test "x$ac_cv_lib_ncurses_initscr" = xyes; then echo "$ac_t""Found ncurses on /usr/include/ncurses.h" 1>&6 AALIB_LIBS="$AALIB_LIBS -lncurses" LIBS="$LIBS " CFLAGS="$CFLAGS -I/usr/include/ncurses " search_ncurses=false curses_driver=true screen_manager="ncurses on /usr/include" cat >> confdefs.h <<\EOF #define USE_NCURSES 1 EOF else unset ac_cv_lib_ncurses_initscr LIBS="$LIBS1" fi fi fi if $search_ncurses then if test -f /usr/include/ncurses/ncurses.h then LIBS1="$LIBS" LIBS="$LIBS " echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6 echo "configure:3389: checking for initscr in -lncurses" >&5 ac_lib_var=`echo ncurses'_'initscr | 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="-lncurses $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 ncurses | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 fi if test "x$ac_cv_lib_ncurses_initscr" = xyes; then echo "$ac_t""Found ncurses on /usr/include/ncurses/ncurses.h" 1>&6 AALIB_LIBS="$AALIB_LIBS -lncurses" LIBS="$LIBS " CFLAGS="$CFLAGS -I/usr/include/ncurses" search_ncurses=false curses_driver=true screen_manager="ncurses on /usr/include/ncurses" cat >> confdefs.h <<\EOF #define USE_NCURSES 1 EOF else unset ac_cv_lib_ncurses_initscr LIBS="$LIBS1" fi fi fi if $search_ncurses then if test -f /usr/local/include/ncurses.h then LIBS1="$LIBS" LIBS="$LIBS " echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6 echo "configure:3462: checking for initscr in -lncurses" >&5 ac_lib_var=`echo ncurses'_'initscr | 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="-lncurses $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 ncurses | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 fi if test "x$ac_cv_lib_ncurses_initscr" = xyes; then echo "$ac_t""Found ncurses on /usr/local/include/ncurses.h" 1>&6 AALIB_LIBS="$AALIB_LIBS -lncurses" LIBS="$LIBS " CFLAGS="$CFLAGS -L/usr/local/lib" search_ncurses=false curses_driver=true screen_manager=-I/usr/local/include cat >> confdefs.h <<\EOF #define USE_NCURSES 1 EOF else unset ac_cv_lib_ncurses_initscr LIBS="$LIBS1" fi fi fi if $search_ncurses then if test -f /usr/local/include/ncurses/ncurses.h then LIBS1="$LIBS" LIBS="$LIBS -L/usr/local/lib -L/usr/local/lib/ncurses" echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6 echo "configure:3535: checking for initscr in -lncurses" >&5 ac_lib_var=`echo ncurses'_'initscr | 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="-lncurses $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 ncurses | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 fi if test "x$ac_cv_lib_ncurses_initscr" = xyes; then echo "$ac_t""Found ncurses on /usr/local/include/ncurses/ncurses.h" 1>&6 AALIB_LIBS="$AALIB_LIBS -L/usr/local/lib -L/usr/local/lib/ncurses -lncurses" LIBS="$LIBS -L/usr/local/lib -L/usr/local/lib/ncurses" CFLAGS="$CFLAGS -I/usr/local/include/ncurses" search_ncurses=false curses_driver=true screen_manager="ncurses on /usr/local/include/ncurses" cat >> confdefs.h <<\EOF #define USE_NCURSES 1 EOF else unset ac_cv_lib_ncurses_initscr LIBS="$LIBS1" fi fi fi if $search_ncurses then if test -f /usr/local/include/ncurses/curses.h then LIBS1="$LIBS" LIBS="$LIBS -L/usr/local/lib" echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6 echo "configure:3609: checking for initscr in -lncurses" >&5 ac_lib_var=`echo ncurses'_'initscr | 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="-lncurses $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 ncurses | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 fi if test "x$ac_cv_lib_ncurses_initscr" = xyes; then echo "$ac_t""Found ncurses on /usr/local/include/ncurses/curses.h" 1>&6 AALIB_LIBS="$AALIB_LIBS -L/usr/local/lib -lncurses" LIBS="$LIBS -L/usr/local/lib" CFLAGS="$CFLAGS -I/usr/local/include/ncurses -DRENAMED_NCURSES" search_ncurses=false curses_driver=true screen_manager="renamed ncurses on /usr/local/.../ncurses" cat >> confdefs.h <<\EOF #define USE_NCURSES 1 EOF else unset ac_cv_lib_ncurses_initscr LIBS="$LIBS1" fi fi fi if $search_ncurses then if test -f /usr/include/ncurses/curses.h then LIBS1="$LIBS" LIBS="$LIBS " echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6 echo "configure:3683: checking for initscr in -lncurses" >&5 ac_lib_var=`echo ncurses'_'initscr | 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="-lncurses $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 ncurses | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 fi if test "x$ac_cv_lib_ncurses_initscr" = xyes; then echo "$ac_t""Found ncurses on /usr/include/ncurses/curses.h" 1>&6 AALIB_LIBS="$AALIB_LIBS -lncurses" LIBS="$LIBS " CFLAGS="$CFLAGS -I/usr/include/ncurses -DRENAMED_NCURSES" search_ncurses=false curses_driver=true screen_manager="renamed ncurses on /usr/include/ncurses" cat >> confdefs.h <<\EOF #define USE_NCURSES 1 EOF else unset ac_cv_lib_ncurses_initscr LIBS="$LIBS1" fi fi fi if $search_ncurses then if test -f /usr/include/curses.h then LIBS1="$LIBS" LIBS="$LIBS " echo $ac_n "checking for initscr in -lcurses""... $ac_c" 1>&6 echo "configure:3756: checking for initscr in -lcurses" >&5 ac_lib_var=`echo curses'_'initscr | 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="-lcurses $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 curses | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 fi if test "x$ac_cv_lib_curses_initscr" = xyes; then echo "$ac_t""Found generic curses on /usr/include/curses.h" 1>&6 CFLAGS="$CFLAGS " search_ncurses=false curses_driver=true AALIB_LIBS="$AALIB_LIBS -lcurses" cat >> confdefs.h <<\EOF #define CURSES_DRIVER 1 EOF screen_manager="curses on /usr/include" cat >> confdefs.h <<\EOF #define USE_CURSES 1 EOF else unset ac_cv_lib_curses_initscr LIBS="$LIBS1" fi 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 curses_driver=true cat >> confdefs.h <<\EOF #define USE_SYSV_CURSES 1 EOF XCURSES="" search_ncurses=false screen_manager="SysV/curses" LIBS="$LIBS -lcurses" AALIB_LIBS="$AALIB_LIBS -lcurses" fi rm -f conftest* fi if $search_ncurses then if test -f /usr/5include/curses.h then search_ncurses=false curses_driver=true 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 SUNOS_CURSES 1 EOF cat >> confdefs.h <<\EOF #define NO_COLOR_SUPPORT 1 EOF cat >> confdefs.h <<\EOF #define USE_SYSV_CURSES 1 EOF CFLAGS="$CFLAGS -I/usr/5include" XCURSES="xcurses.o /usr/5lib/libcurses.a /usr/5lib/libtermcap.a" echo "$ac_t""Please note that some screen refreshs may fail" 1>&6 echo "configure: warning: Reconsider using Slang" 1>&2 fi fi fi for ac_func in mousemask termattrs wredrawln redrawwin curs_set do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 echo "configure:3885: 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:3913: \"$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 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 echo "configure:3941: 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:3954: \"$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:4021: \"$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 for ac_hdr in fcntl.h limits.h malloc.h sys/ioctl.h sys/time.h unistd.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo "configure:4048: 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:4058: \"$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 echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6 echo "configure:4086: checking for st_rdev in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include int main() { struct stat s; s.st_rdev; ; return 0; } EOF if { (eval echo configure:4099: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_rdev=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* ac_cv_struct_st_rdev=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6 if test $ac_cv_struct_st_rdev = yes; then cat >> confdefs.h <<\EOF #define HAVE_ST_RDEV 1 EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 echo "configure:4120: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include #include int main() { struct tm *tp; ; return 0; } EOF if { (eval echo configure:4134: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* ac_cv_header_time=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_header_time" 1>&6 if test $ac_cv_header_time = yes; then cat >> confdefs.h <<\EOF #define TIME_WITH_SYS_TIME 1 EOF fi if test $ac_cv_prog_gcc = yes; then echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6 echo "configure:4157: checking whether ${CC-cc} needs -traditional" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_pattern="Autoconf.*'x'" cat > conftest.$ac_ext < Autoconf TIOCGETP EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "$ac_pattern" >/dev/null 2>&1; then rm -rf conftest* ac_cv_prog_gcc_traditional=yes else rm -rf conftest* ac_cv_prog_gcc_traditional=no fi rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then cat > conftest.$ac_ext < Autoconf TCGETA EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "$ac_pattern" >/dev/null 2>&1; then rm -rf conftest* ac_cv_prog_gcc_traditional=yes fi rm -f conftest* fi fi echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6 if test $ac_cv_prog_gcc_traditional = yes; then CC="$CC -traditional" fi fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 echo "configure:4203: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include #ifdef signal #undef signal #endif #ifdef __cplusplus extern "C" void (*signal (int, void (*)(int)))(int); #else void (*signal ()) (); #endif int main() { int i; ; return 0; } EOF if { (eval echo configure:4225: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* ac_cv_type_signal=int fi rm -f conftest* fi echo "$ac_t""$ac_cv_type_signal" 1>&6 cat >> confdefs.h <&6 echo "configure:4246: 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:4274: \"$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 case "$target" in *-*-linux*) ARCH=linux ;; *-*-bsdi*) ARCH=bsdi ;; *-*-freebsd*) ARCH=freebsd ;; *-*-solaris*) ARCH=solaris ;; *) ARCH=other ;; esac # Set runtime shared library paths as needed if test $ARCH = linux -o $ARCH = freebsd -o $ARCH = bsdi; then AALIB_RLD_FLAGS="-Wl,-rpath,\${exec_prefix}/lib" fi if test $ARCH = solaris; then AALIB_RLD_FLAGS="-R\${exec_prefix}/lib" fi # Set conditional variables for shared and static library selection. # These are not used in any Makefile.am but in sdl-config.in. if test "$enable_shared" = yes; then ENABLE_SHARED_TRUE= ENABLE_SHARED_FALSE='#' else ENABLE_SHARED_TRUE='#' ENABLE_SHARED_FALSE= fi if test "$enable_static" = yes; then ENABLE_STATIC_TRUE= ENABLE_STATIC_FALSE='#' else ENABLE_STATIC_TRUE='#' ENABLE_STATIC_FALSE= fi echo "-----------------------------------------------------" echo "CFLAGS $CFLAGS" echo "LDFLAGS $LIBS" echo "AA-LIBD $AALIB_LIBS" echo "CC $CC" echo "-----------------------------------------------------" echo "Display drivers:" if test "$slang_driver" = true; then echo " slang" if test "$slang_kbddriver_test" = yes; then cat >> confdefs.h <<\EOF #define SLANG_KBDDRIVER 1 EOF slang_kbddriver=true fi fi if test "$curses_driver" = true; then cat >> confdefs.h <<\EOF #define CURSES_DRIVER 1 EOF echo " curses" if test "$curses_kbddriver_test" = yes; then cat >> confdefs.h <<\EOF #define CURSES_KBDDRIVER 1 EOF curses_kbddriver=true fi if test "$curses_kbddriver_test" = yes; then if test "x$ac_cv_func_mousemask" = xyes; then cat >> confdefs.h <<\EOF #define CURSES_MOUSEDRIVER 1 EOF curses_mousedriver=true fi fi fi if test "$linux_driver_test" = yes; then if test "x$system" = xLinux; then echo " Linux console" cat >> confdefs.h <<\EOF #define LINUX_DRIVER 1 EOF cat >> confdefs.h <<\EOF #define LINUX_KBDDRIVER 1 EOF fi fi if test "$x_driver" = true; then echo " x11" if test "$x_kbddriver_test" = yes; then cat >> confdefs.h <<\EOF #define X11_KBDDRIVER 1 EOF x_kbddriver=true fi if test "$x_mousedriver_test" = yes; then cat >> confdefs.h <<\EOF #define X11_MOUSEDRIVER 1 EOF x_mousedriver=true fi fi echo "Keyboard drivers:" if test "$linux_driver_test" = yes; then if test "x$system" = xLinux; then echo " Linux console" fi fi if test "$slang_kbddriver" = true; then echo " slang" fi if test "$curses_kbddriver" = true; then echo " curses" fi if test "$x_kbddriver" = true; then echo " X11" fi echo "Mouse drivers:" if test "$curses_mousedriver" = true; then echo " curses" fi if test "$gpm_mousedriver" = true; then echo " gpm" fi if test "$x_mousedriver" = true; then echo " X11" fi echo "-----------------------------------------------------" 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 "Makefile man/Makefile doc/Makefile src/Makefile aalib-config src/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%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g s%@INSTALL_DATA@%$INSTALL_DATA%g s%@PACKAGE@%$PACKAGE%g s%@VERSION@%$VERSION%g s%@ACLOCAL@%$ACLOCAL%g s%@AUTOCONF@%$AUTOCONF%g s%@AUTOMAKE@%$AUTOMAKE%g s%@AUTOHEADER@%$AUTOHEADER%g s%@MAKEINFO@%$MAKEINFO%g s%@SET_MAKE@%$SET_MAKE%g s%@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%@target@%$target%g s%@target_alias@%$target_alias%g s%@target_cpu@%$target_cpu%g s%@target_vendor@%$target_vendor%g s%@target_os@%$target_os%g s%@CC@%$CC%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%@RANLIB@%$RANLIB%g s%@LN_S@%$LN_S%g s%@LIBTOOL@%$LIBTOOL%g s%@system@%$system%g s%@machine@%$machine%g s%@CPP@%$CPP%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%@AALIB_CFLAGS@%$AALIB_CFLAGS%g s%@AALIB_LIBS@%$AALIB_LIBS%g s%@AALIB_RLD_FLAGS@%$AALIB_RLD_FLAGS%g s%@XCURSES@%$XCURSES%g s%@ENABLE_SHARED_TRUE@%$ENABLE_SHARED_TRUE%g s%@ENABLE_SHARED_FALSE@%$ENABLE_SHARED_FALSE%g s%@ENABLE_STATIC_TRUE@%$ENABLE_STATIC_TRUE%g s%@ENABLE_STATIC_FALSE@%$ENABLE_STATIC_FALSE%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 test -z "$CONFIG_HEADERS" || echo timestamp > src/stamp-h chmod +x aalib-config 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 aalib-1.4.0/configure.in0000644000766200001440000002714407272031301010565 include(aclocal.m4) AC_INIT(src/aalib.c) AM_INIT_AUTOMAKE(aalib,1.4.0) AC_CANONICAL_HOST AC_CANONICAL_TARGET AM_CONFIG_HEADER(src/config.h) dnl Initialize the compiler and linker flags for AALIB applications AALIB_CFLAGS="" AALIB_LIBS="-laa" dnl Output the video drivers we use if test x$enable_video = xtrue; then if test "$VIDEO_SUBDIRS" = ""; then AC_MSG_ERROR(*** No video drivers are enabled!) fi fi dnl Checks for programs. x_driver_test=yes curses_driver_test=yes linux_driver_test=yes slang_driver_test=yes force_curses_driver=false x_kbddriver_test=yes curses_kbddriver_test=yes slang_kbddriver_test=yes curses_mousedriver_test=yes gpm_mousedriver_test=yes x_mousedriver_test=yes use_cc_g_flag=no AC_PROG_CC AM_PROG_LIBTOOL AC_PROG_MAKE_SET AC_PROG_INSTALL dnl detect OS AC_CHECK_PROG(system,uname,`uname`,unknown) if test "x$system" = xLinux; then AC_CHECK_PROG(machine,uname,`uname --machine`,unknown) fi AC_HEADER_STDC AC_CHECK_LIB(m, pow) if test "x$ac_cv_lib_m_pow" = xyes; then AALIB_LIBS="$AALIB_LIBS -lm" fi cc_uses_g=yes if test x$GCC = xyes; then if test x$ac_cv_prog_gcc_g = xyes; then : else cc_uses_g=no fi fi dnl command line options AC_ARG_WITH(x11-driver, [ --with-x11-driver=no Used to disable x11 driver],[ if test x$withval = xno; then x_driver_test=no fi ]) AC_ARG_WITH(slang-driver, [ --with-slang-driver=no Used to disable slang driver],[ if test x$withval = xno; then slang_driver_test=no fi ]) AC_ARG_WITH(curses-driver, [ --with-curses-driver=no/yes Used to disable/force curses driver],[ if test x$withval = xno; then curses_driver_test=no fi if test x$withval = xyes; then force_curses_driver=true fi ]) AC_ARG_WITH(gpm-mouse, [ --with-gpm-mouse=base-dir Specifies the base gpm directory], if test x$withval = xyes then AC_MSG_WARN(Usage is: --with-gpm-mouse=base-dir) else LIBS="$LIBS -L$withval/lib -lgpm" AC_DEFINE(GPM_MOUSEDRIVER) gpm_mousedriver=true CFLAGS="$CFLAGS -I$withval/include" AALIB_LIBS="$AALIB_LIBS -L$withval/lib -lgpm" AC_MSG_RESULT(defining use_gpm) fi ) if test "$x_driver_test" = yes; then AC_PATH_X AC_PATH_XTRA if test "x$no_x" = x; then x_driver=true AC_DEFINE(X11_DRIVER) LIBS="$LIBS $X_EXTRA_LIBS $X_LIBS -lX11" AALIB_LIBS="$AALIB_LIBS $X_EXTRA_LIBS $X_LIBS -lX11" CFLAGS="$CFLAGS $X_CFLAGS" fi fi if test "$gpm_mousedriver_test" = yes; then AC_CHECK_LIB(gpm, Gpm_Repeat,[ AC_DEFINE(GPM_MOUSEDRIVER) gpm_mousedriver=true AALIB_LIBS="$AALIB_LIBS -lgpm" LIBS="$LIBS -lgpm"]) fi dnl dnl This part supplies reasonable defaults for CFLAGS, if they weren't dnl specified by ''CFLAGS=flags ./configure'' dnl search_ncurses=true AC_DEFUN(AC_USE_SUNOS_CURSES, [ search_ncurses=false curses_driver=true screen_manager="SunOS 4.x /usr/5include curses" AC_MSG_RESULT(Using SunOS 4.x /usr/5include curses) AC_DEFINE(SUNOS_CURSES) AC_DEFINE(NO_COLOR_SUPPORT) AC_DEFINE(USE_SYSV_CURSES) CFLAGS="$CFLAGS -I/usr/5include" XCURSES="xcurses.o /usr/5lib/libcurses.a /usr/5lib/libtermcap.a" AC_MSG_RESULT(Please note that some screen refreshs may fail) AC_WARN(Reconsider using Slang) ]) AC_DEFUN(AC_USE_OSF1_CURSES, [ AC_MSG_RESULT(Using OSF1 curses) search_ncurses=false curses_driver=true screen_manager="OSF1 curses" AC_DEFINE(NO_COLOR_SUPPORT) AC_DEFINE(USE_SYSV_CURSES) XCURSES="xcurses.o" LIBS="$LIBS -lcurses" AALIB_LIBS="$AALIB_LIBS -lcurses" ]) AC_DEFUN(AC_USE_SYSV_CURSES, [ AC_MSG_RESULT(Using SysV curses) curses_driver=true AC_DEFINE(USE_SYSV_CURSES) XCURSES="" search_ncurses=false screen_manager="SysV/curses" LIBS="$LIBS -lcurses" AALIB_LIBS="$AALIB_LIBS -lcurses" ]) XCURSES="" 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 CFLAGS="$CFLAGS" else CFLAGS="$CFLAGS -I$withval" fi AC_USE_SYSV_CURSES ) AC_ARG_WITH(ncurses, [ --with-ncurses[=base-dir] Compile with ncurses/locate base dir], if test x$withval = xyes then search_ncurses=true else LIBS="$LIBS -L$withval/lib -lncurses" AALIB_LIBS="$AALIB_LIBS -L$withval/lib -lncurses" CFLAGS="$CFLAGS -I$withval/include" search_ncurses=false curses_driver=true screen_manager="ncurses" AC_DEFINE(USE_NCURSES) fi ) if test "$slang_driver_test" = yes; then AC_DEFUN(AC_SLANG, [ if $search_slang then if test -f $1/$2 then LIBS1="$LIBS" LIBS="$LIBS $3" AC_CHECK_LIB(slang, SLsmg_init_smg) if test "x$ac_cv_lib_slang_SLsmg_init_smg" = xyes; then AC_MSG_RESULT(Found slang on $1/$2) AALIB_LIBS="$AALIB_LIBS $3 -lslang" LIBS="$LIBS $3" CFLAGS="$CFLAGS $4" slang_driver=true search_slang=false AC_DEFINE(SLANG_DRIVER) else unset ac_cv_lib_slang_SLsmg_init_smg LIBS="$LIBS1" fi fi fi ]) AC_SLANG(/usr/include, slang.h, , -I/usr/include , "slang on /usr/include") AC_SLANG(/usr/include/slang, slang.h, , -I/usr/include/slang , "slang on /usr/include/slang") AC_SLANG(/usr/local/include, slang.h, , -I/usr/local/include/slang , "slang on /usr/local/include") AC_SLANG(/usr/local/include/slang, slang.h, , -I/usr/local/include/slang , "slang on /usr/local/include/slang") if test "$slang_driver" = true; then if test "$force_curses_driver" = false; then echo "Disabling curses driver since slang is available" curses_driver_test=no fi fi fi dnl dnl Parameters: directory filename LIBS_append CFLAGS_append nicename dnl AC_DEFUN(AC_NCURSES, [ if $search_ncurses then if test -f $1/$2 then LIBS1="$LIBS" LIBS="$LIBS $3" AC_CHECK_LIB(ncurses, initscr) if test "x$ac_cv_lib_ncurses_initscr" = xyes; then AC_MSG_RESULT(Found ncurses on $1/$2) AALIB_LIBS="$AALIB_LIBS $3 -lncurses" LIBS="$LIBS $3" CFLAGS="$CFLAGS $4" search_ncurses=false curses_driver=true screen_manager=$5 AC_DEFINE(USE_NCURSES) else unset ac_cv_lib_ncurses_initscr LIBS="$LIBS1" fi fi fi ]) dnl dnl Parameters: directory filename LIBS_append CFLAGS_append nicename dnl AC_DEFUN(AC_CURSES, [ if $search_ncurses then if test -f $1/$2 then LIBS1="$LIBS" LIBS="$LIBS $3" AC_CHECK_LIB(curses, initscr) if test "x$ac_cv_lib_curses_initscr" = xyes; then AC_MSG_RESULT(Found generic curses on $1/$2) CFLAGS="$CFLAGS $4" search_ncurses=false curses_driver=true AALIB_LIBS="$AALIB_LIBS $3 -lcurses" AC_DEFINE(CURSES_DRIVER) screen_manager=$5 AC_DEFINE(USE_CURSES) else unset ac_cv_lib_curses_initscr LIBS="$LIBS1" fi fi fi ]) if test "$curses_driver_test" = yes; then if $search_ncurses then AC_CHECKING("location of curses") AC_NCURSES(/usr/include, ncurses.h, , -I/usr/include/ncurses , "ncurses on /usr/include") AC_NCURSES(/usr/include/ncurses, ncurses.h, , -I/usr/include/ncurses, "ncurses on /usr/include/ncurses") AC_NCURSES(/usr/local/include, ncurses.h, ,-L/usr/local/lib, -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, -I/usr/local/include/ncurses, "ncurses on /usr/local/include/ncurses") AC_NCURSES(/usr/local/include/ncurses, curses.h, -L/usr/local/lib, -I/usr/local/include/ncurses -DRENAMED_NCURSES, "renamed ncurses on /usr/local/.../ncurses") AC_NCURSES(/usr/include/ncurses, curses.h, , -I/usr/include/ncurses -DRENAMED_NCURSES, "renamed ncurses on /usr/include/ncurses") AC_CURSES(/usr/include, curses.h, , , "curses on /usr/include") 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) fi dnl dnl Try SunOS 4.x /usr/5{lib,include} ncurses dnl The flags 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 fi fi AC_CHECK_FUNCS(mousemask termattrs wredrawln redrawwin curs_set) fi dnl Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS(fcntl.h limits.h malloc.h sys/ioctl.h sys/time.h unistd.h) dnl Checks for typedefs, structures, and compiler characteristics. AC_STRUCT_ST_RDEV AC_HEADER_TIME dnl Checks for library functions. AC_PROG_GCC_TRADITIONAL AC_TYPE_SIGNAL AC_CHECK_FUNCS(strdup) case "$target" in *-*-linux*) ARCH=linux ;; *-*-bsdi*) ARCH=bsdi ;; *-*-freebsd*) ARCH=freebsd ;; *-*-solaris*) ARCH=solaris ;; *) ARCH=other ;; esac # Set runtime shared library paths as needed if test $ARCH = linux -o $ARCH = freebsd -o $ARCH = bsdi; then AALIB_RLD_FLAGS="-Wl,-rpath,\${exec_prefix}/lib" fi if test $ARCH = solaris; then AALIB_RLD_FLAGS="-R\${exec_prefix}/lib" fi dnl Expand the cflags and libraries needed by apps using AALIB AC_SUBST(AALIB_CFLAGS) AC_SUBST(AALIB_LIBS) AC_SUBST(AALIB_RLD_FLAGS) AC_SUBST(XCURSES) # Set conditional variables for shared and static library selection. # These are not used in any Makefile.am but in sdl-config.in. AM_CONDITIONAL([ENABLE_SHARED], [test "$enable_shared" = yes]) AM_CONDITIONAL([ENABLE_STATIC], [test "$enable_static" = yes]) echo "-----------------------------------------------------" echo "CFLAGS $CFLAGS" echo "LDFLAGS $LIBS" echo "AA-LIBD $AALIB_LIBS" echo "CC $CC" echo "-----------------------------------------------------" echo "Display drivers:" if test "$slang_driver" = true; then echo " slang" if test "$slang_kbddriver_test" = yes; then AC_DEFINE(SLANG_KBDDRIVER) slang_kbddriver=true fi fi if test "$curses_driver" = true; then AC_DEFINE(CURSES_DRIVER) echo " curses" if test "$curses_kbddriver_test" = yes; then AC_DEFINE(CURSES_KBDDRIVER) curses_kbddriver=true fi if test "$curses_kbddriver_test" = yes; then if test "x$ac_cv_func_mousemask" = xyes; then AC_DEFINE(CURSES_MOUSEDRIVER) curses_mousedriver=true fi fi fi if test "$linux_driver_test" = yes; then if test "x$system" = xLinux; then echo " Linux console" AC_DEFINE(LINUX_DRIVER) AC_DEFINE(LINUX_KBDDRIVER) fi fi if test "$x_driver" = true; then echo " x11" if test "$x_kbddriver_test" = yes; then AC_DEFINE(X11_KBDDRIVER) x_kbddriver=true fi if test "$x_mousedriver_test" = yes; then AC_DEFINE(X11_MOUSEDRIVER) x_mousedriver=true fi fi echo "Keyboard drivers:" if test "$linux_driver_test" = yes; then if test "x$system" = xLinux; then echo " Linux console" fi fi if test "$slang_kbddriver" = true; then echo " slang" fi if test "$curses_kbddriver" = true; then echo " curses" fi if test "$x_kbddriver" = true; then echo " X11" fi echo "Mouse drivers:" if test "$curses_mousedriver" = true; then echo " curses" fi if test "$gpm_mousedriver" = true; then echo " gpm" fi if test "$x_mousedriver" = true; then echo " X11" fi echo "-----------------------------------------------------" AC_OUTPUT([Makefile man/Makefile doc/Makefile src/Makefile aalib-config], [chmod +x aalib-config]) aalib-1.4.0/install-sh0000755000766200001440000001273607272031253010267 #!/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 aalib-1.4.0/ltconfig0000755000766200001440000027672007272031253010023 #! /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 "X${CDPATH+set}" = Xset; 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.5 TIMESTAMP=" (1.385.2.206 2000/05/27 11:12:27)" ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $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 (except M$VC, # which needs '.lib'). 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 exeext= 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 "X${LC_ALL+set}" = Xset; then LC_ALL=C; export LC_ALL; fi if test "X${LANG+set}" = Xset; 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 "X${COLLECT_NAMES+set}" != Xset; 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:581: 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:603: checking for object suffix" >& 5 if { (eval echo $progname:604: \"$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 executable suffix... $ac_c" 1>&6 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_exeext="no" $rm conftest* echo 'main () { return 0; }' > conftest.c echo "$progname:629: checking for executable suffix" >& 5 if { (eval echo $progname:630: \"$ac_link\") 1>&5; (eval $ac_link) 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 | *.err | *.$objext ) ;; *) ac_cv_exeext=.`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* fi if test "X$ac_cv_exeext" = Xno; then exeext="" else exeext="$ac_cv_exeext" fi echo "$ac_t$ac_cv_exeext" 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* | osf5*) # 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' ;; sysv4*MP*) if test -d /usr/nec; then pic_flag=-Kconform_pic fi ;; *) 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* | osf5*) # 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' ;; sysv4*MP*) if test -d /usr/nec ;then pic_flag='-Kconform_pic' link_static_flag='-Bstatic' fi ;; *) 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:776: checking if $compiler PIC flag $pic_flag works" >&5 if { (eval echo $progname:777: \"$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:829: checking if $compiler supports -c -o file.o" >&5 if { (eval echo $progname:830: \"$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:862: checking if $compiler supports -c -o file.lo" >&5 if { (eval echo $progname:863: \"$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:914: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 if { (eval echo $progname:915: \"$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:958: checking if $compiler static flag $link_static_flag works" >&5 if { (eval echo $progname:959: \"$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:991: 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:1015: checking for GNU ld" >&5 else echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 echo "$progname:1018: 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 $convenience | $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. # Be careful not to strip the DATA tag left by newer dlltools. export_symbols_cmds='test -f $objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~ test -f $objdir/$soname-ltdll.$objext || (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 $convenience~ sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $objdir/$soname-def > $export_symbols' # If DATA tags from a recent dlltool are present, honour them! archive_expsym_cmds='echo EXPORTS > $objdir/$soname-def~ _lt_hint=1; cat $export_symbols | while read symbol; do set dummy \$symbol; case \$# in 2) echo " \$2 @ \$_lt_hint ; " >> $objdir/$soname-def;; *) echo " \$2 @ \$_lt_hint \$3 ; " >> $objdir/$soname-def;; esac; _lt_hint=`expr 1 + \$_lt_hint`; done~ test -f $objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~ test -f $objdir/$soname-ltdll.$objext || (cd $objdir && $CC -c $soname-ltdll.c)~ $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 echo __ELF__ | $CC -E - | grep __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 ;; solaris* | sysv5*) if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $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 ;; 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' case $host_os in cygwin* | mingw*) # dlltool doesn't understand --whole-archive et. al. whole_archive_flag_spec= ;; *) # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec= fi ;; esac 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*) 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=: ;; osf4* | osf5*) # As osf3* with the addition of the -msym flag if test "$with_gcc" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $linkopts ${wl}-msym ${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 -msym -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=: ;; rhapsody*) archive_cmds='$CC -bundle -undefined suppress -o $lib $libobjs $deplibs $linkopts' hardcode_libdir_flags_spec='-L$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; 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='-z allextract$convenience -z 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) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $linkopts' else archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' fi 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' ;; sysv5*) 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= hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' ;; 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 ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4.2uw2*) archive_cmds='$LD -G -o $lib $libobjs $deplibs $linkopts' hardcode_direct=yes hardcode_minus_L=no hardcode_shlibpath_var=no hardcode_runpath_var=yes runpath_var=LD_RUN_PATH ;; unixware7*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' runpath_var='LD_RUN_PATH' 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:1654: \"$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:1657: 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:1709: \"$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 deplibs_check_method=pass_all lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; bsdi4*) version_type=linux 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 $libdir' shlibpath_var=LD_LIBRARY_PATH deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' 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" export_dynamic_flag_spec=-rdynamic # 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 need_version=no need_lib_prefix=no 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' # 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 shlibpath_var=LD_LIBRARY_PATH case "$host_os" in freebsd2* | freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes ;; *) # from 3.2 on shlibpath_overrides_runpath=no ;; esac ;; 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' shlibpath_var=LD_LIBRARY_PATH deplibs_check_method=pass_all ;; 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' case "$host_os" in hpux10.20*) # TODO: Does this work for hpux-11 too? deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' file_magic_cmd=/usr/bin/file file_magic_test_file=/usr/lib/libc.sl ;; esac ;; 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 ;; 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=pass_all 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* | osf5*) 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" ;; rhapsody*) version_type=sunos library_names_spec='${libname}.so' soname_spec='${libname}.so' shlibpath_var=DYLD_LIBRARY_PATH deplibs_check_method=pass_all ;; 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 sequent) file_magic_cmd='/bin/file' deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; 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 ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so' soname_spec='$libname.so.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; *) 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 in -ldl""... $ac_c" 1>&6 echo "$progname:2248: 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 dlopen""... $ac_c" 1>&6 echo "$progname:2288: 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. */ #ifdef __cplusplus extern "C" #endif 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:2318: \"$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 dld_link in -ldld""... $ac_c" 1>&6 echo "$progname:2335: 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:2375: 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. */ #ifdef __cplusplus extern "C" #endif 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:2405: \"$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:2423: 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:2488: 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 >/dev/null 2>conftest.out" { (eval echo $progname:2498: \"$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:2526: 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) { dlclose(self); exit(0); } } exit(1); } EOF if { (eval echo $progname:2580: \"$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:2599: 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) { dlclose(self); exit(0); } } exit(1); } EOF if { (eval echo $progname:2653: \"$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. # 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. # 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 "X\${CDPATH+set}" = Xset; 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" # Executable file suffix (normally ""). exeext="$exeext" # 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 "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi EOF ;; esac # Append the ltmain.sh script. sed '$q' "$ltmain" >> "$ofile" || (rm -f "$ofile"; exit 1) # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? 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: aalib-1.4.0/ltmain.sh0000644000766200001440000033025707272031253010104 # 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 $srcfile $pic_flag -DPIC" 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 $run $rm "$output_obj" $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 xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$obj"; then xdir="." else xdir="$xdir" fi baseobj=`$echo "X$obj" | $Xsed -e "s%.*/%%"` libobj=`$echo "X$baseobj" | $Xsed -e "$o2lo"` # Now arrange that obj and lo_libobj become the same file $show "(cd $xdir && $LN_S $baseobj $libobj)" if $run eval '(cd $xdir && $LN_S $baseobj $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" $run $rm "$output_obj" $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" 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 # # #ifndef __CYGWIN__ # # ifdef __CYGWIN32__ # # define __CYGWIN__ __CYGWIN32__ # # endif # #endif # # #ifdef __cplusplus # extern "C" { # #endif # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); # #ifdef __cplusplus # } # #endif # # #ifdef __CYGWIN__ # #include # DECLARE_CYGWIN_DLL( DllMain ); # #endif # 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. force) if test "$dlself" = no; then dlself=needless export_dynamic=yes fi prev= continue ;; 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: warning: cannot determine absolute directory name of \`$dir'" 1>&2 $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 absdir="$dir" 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 and -L 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_dir=`$echo "X$deplib" | $Xsed -e 's/^-L//'` case " $lib_search_path " in *" $temp_dir "*) ;; *) lib_search_path="$lib_search_path $temp_dir";; 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: warning: cannot determine absolute directory name of \`$dir'" 1>&2 $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 absdir="$dir" 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)! ;; *-*-rhapsody*) # rhapsody is a little odd... deplibs="$deplibs -framework System" ;; *) # 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 "$potent_lib" 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) in case we are running --disable-static for obj in $libobjs; do xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$obj"; then xdir="." else xdir="$xdir" fi baseobj=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"` if test ! -f $xdir/$oldobj; then $show "(cd $xdir && ${LN_S} $baseobj $oldobj)" $run eval '(cd $xdir && ${LN_S} $baseobj $oldobj)' || exit $? fi done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` # 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 if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" 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 fi if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" linkopts="$linkopts $flag" 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 # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create # different ones for PIC/non-PIC, this we'll have to duplicate # the extraction. reload_conv_objs= gentop= # reload_cmds runs $LD directly, so let us get rid of # -Wl from whole_archive_flag_spec wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\" else gentop="$output_objdir/${obj}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 $? reload_conv_objs="$reload_objs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP` done fi fi # Create the old-style object. reload_objs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" 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. if test -z "$libobj"; then if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi exit 0 fi if test "$build_libtool_libs" != yes; then if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi # 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 $reload_conv_objs" 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 xdir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$libobj"; then xdir="." else xdir="$xdir" fi baseobj=`$echo "X$libobj" | $Xsed -e 's%^.*/%%'` oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"` $show "(cd $xdir && $LN_S $oldobj $baseobj)" $run eval '(cd $xdir && $LN_S $oldobj $baseobj)' || exit $? fi if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop 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" != no; 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*|*-*-freebsdelf3.0*) case "$compile_command " in *" -static "*) ;; *) pic_flag_for_symtable=" $pic_flag -DPIC -DFREEBSD_WORKAROUND";; esac;; *-*-hpux*) case "$compile_command " in *" -static "*) ;; *) pic_flag_for_symtable=" $pic_flag -DPIC";; esac esac # Now compile the dynamic symbol file. $show "(cd $output_objdir && $CC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" $run eval '(cd $output_objdir && $CC -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 # win32 systems need to use the prog path for dll # lookup to work *-*-cygwin*) $echo >> $output "\ exec \$progdir/\$program \${1+\"\$@\"} " ;; # Backslashes separate directories on plain windows *-*-mingw | *-*-os2*) $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 in case 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 xdir=`$echo "X$oldobj" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$oldobj"; then xdir="." else xdir="$xdir" fi baseobj=`$echo "X$oldobj" | $Xsed -e 's%^.*/%%'` obj=`$echo "X$baseobj" | $Xsed -e "$o2lo"` $show "(cd $xdir && ${LN_S} $obj $baseobj)" $run eval '(cd $xdir && ${LN_S} $obj $baseobj)' || 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 $? if test $# -gt 0; then # Delete the old symlinks, and create new ones. for linkname do 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 # 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 if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # 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. if test -n "$shlibpath_var"; then eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" $echo "export $shlibpath_var" fi $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" done 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: aalib-1.4.0/missing0000755000766200001440000001105207272031253007650 #! /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 touch file \`y.tab.c' makeinfo touch the output file yacc touch file \`y.tab.c'" ;; -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." touch config.h.in ;; 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$/touch \1.in/' \ | sh ;; 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." touch y.tab.c ;; 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 aalib-1.4.0/mkinstalldirs0000755000766200001440000000132507272031253011061 #! /bin/sh # mkinstalldirs --- make directory hierarchy # Author: Noah Friedman # Created: 1993-05-16 # Public domain # $Id: mkinstalldirs,v 1.2 2001/04/17 09:52:20 hubicka 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 aalib-1.4.0/texinfo.tex0000644000766200001440000047170307272031253010464 %% TeX macros to handle Texinfo files. %% $Id: texinfo.tex,v 1.1.1.1 2001/02/12 22:34:47 hubicka Exp $ % Copyright (C) 1985, 86, 88, 90, 91, 92, 93, % 94, 95, 96, 97 Free Software Foundation, Inc. %This texinfo.tex 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, or (at %your option) any later version. %This texinfo.tex file 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 texinfo.tex file; see the file COPYING. If not, write %to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, %Boston, MA 02111-1307, USA. %In other words, you are welcome to use, share and improve this program. %You are forbidden to forbid anyone else to use, share and improve %what you give them. Help stamp out software-hoarding! % Send bug reports to bug-texinfo@prep.ai.mit.edu. % Please include a *precise* test case in each bug report. % Make it possible to create a .fmt file just by loading this file: % if the underlying format is not loaded, start by loading it now. % Added by gildea November 1993. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % This automatically updates the version number based on RCS. \def\deftexinfoversion$#1: #2 ${\def\texinfoversion{#2}} \deftexinfoversion$Revision: 1.1.1.1 $ \message{Loading texinfo package [Version \texinfoversion]:} % If in a .fmt file, print the version number % and turn on active characters that we couldn't do earlier because % they might have appeared in the input file name. \everyjob{\message{[Texinfo version \texinfoversion]}\message{} \catcode`+=\active \catcode`\_=\active} % Save some parts of plain tex whose names we will redefine. \let\ptexb=\b \let\ptexbullet=\bullet \let\ptexc=\c \let\ptexcomma=\, \let\ptexdot=\. \let\ptexdots=\dots \let\ptexend=\end \let\ptexequiv = \equiv \let\ptexi=\i \let\ptexlbrace=\{ \let\ptexrbrace=\} \let\ptexstar=\* \let\ptext=\t % Be sure we're in horizontal mode when doing a tie, since we make space % equivalent to this in @example-like environments. Otherwise, a space % at the beginning of a line will start with \penalty -- and % since \penalty is valid in vertical mode, we'd end up putting the % penalty on the vertical list instead of in the new paragraph. {\catcode`@ = 11 % Avoid using \@M directly, because that causes trouble % if the definition is written into an index file. \global\let\tiepenalty = \@M \gdef\tie{\leavevmode\penalty\tiepenalty\ } } \message{Basics,} \chardef\other=12 % If this character appears in an error message or help string, it % starts a new line in the output. \newlinechar = `^^J % Set up fixed words for English. \ifx\putwordChapter\undefined{\gdef\putwordChapter{Chapter}}\fi% \def\putwordInfo{Info}% \ifx\putwordSee\undefined{\gdef\putwordSee{See}}\fi% \ifx\putwordsee\undefined{\gdef\putwordsee{see}}\fi% \ifx\putwordfile\undefined{\gdef\putwordfile{file}}\fi% \ifx\putwordpage\undefined{\gdef\putwordpage{page}}\fi% \ifx\putwordsection\undefined{\gdef\putwordsection{section}}\fi% \ifx\putwordSection\undefined{\gdef\putwordSection{Section}}\fi% \ifx\putwordTableofContents\undefined{\gdef\putwordTableofContents{Table of Contents}}\fi% \ifx\putwordShortContents\undefined{\gdef\putwordShortContents{Short Contents}}\fi% \ifx\putwordAppendix\undefined{\gdef\putwordAppendix{Appendix}}\fi% % Ignore a token. % \def\gobble#1{} \hyphenation{ap-pen-dix} \hyphenation{mini-buf-fer mini-buf-fers} \hyphenation{eshell} % Margin to add to right of even pages, to left of odd pages. \newdimen \bindingoffset \newdimen \normaloffset \newdimen\pagewidth \newdimen\pageheight % Sometimes it is convenient to have everything in the transcript file % and nothing on the terminal. We don't just call \tracingall here, % since that produces some useless output on the terminal. % \def\gloggingall{\begingroup \globaldefs = 1 \loggingall \endgroup}% \def\loggingall{\tracingcommands2 \tracingstats2 \tracingpages1 \tracingoutput1 \tracinglostchars1 \tracingmacros2 \tracingparagraphs1 \tracingrestores1 \showboxbreadth\maxdimen\showboxdepth\maxdimen }% % For @cropmarks command. % Do @cropmarks to get crop marks. % \newif\ifcropmarks \let\cropmarks = \cropmarkstrue % % Dimensions to add cropmarks at corners. % Added by P. A. MacKay, 12 Nov. 1986 % \newdimen\cornerlong \newdimen\cornerthick \newdimen\topandbottommargin \newdimen\outerhsize \newdimen\outervsize \cornerlong=1pc\cornerthick=.3pt % These set size of cropmarks \outerhsize=7in %\outervsize=9.5in % Alternative @smallbook page size is 9.25in \outervsize=9.25in \topandbottommargin=.75in % Main output routine. \chardef\PAGE = 255 \output = {\onepageout{\pagecontents\PAGE}} \newbox\headlinebox \newbox\footlinebox % \onepageout takes a vbox as an argument. Note that \pagecontents % does insertions, but you have to call it yourself. \def\onepageout#1{% \ifcropmarks \hoffset=0pt \else \hoffset=\normaloffset \fi % \ifodd\pageno \advance\hoffset by \bindingoffset \else \advance\hoffset by -\bindingoffset\fi % % Do this outside of the \shipout so @code etc. will be expanded in % the headline as they should be, not taken literally (outputting ''code). \setbox\headlinebox = \vbox{\let\hsize=\pagewidth \makeheadline}% \setbox\footlinebox = \vbox{\let\hsize=\pagewidth \makefootline}% % {% % Have to do this stuff outside the \shipout because we want it to % take effect in \write's, yet the group defined by the \vbox ends % before the \shipout runs. % \escapechar = `\\ % use backslash in output files. \indexdummies % don't expand commands in the output. \normalturnoffactive % \ in index entries must not stay \, e.g., if % the page break happens to be in the middle of an example. \shipout\vbox{% \ifcropmarks \vbox to \outervsize\bgroup \hsize = \outerhsize \line{\ewtop\hfil\ewtop}% \nointerlineskip \line{% \vbox{\moveleft\cornerthick\nstop}% \hfill \vbox{\moveright\cornerthick\nstop}% }% \vskip\topandbottommargin \line\bgroup \hfil % center the page within the outer (page) hsize. \ifodd\pageno\hskip\bindingoffset\fi \vbox\bgroup \fi % \unvbox\headlinebox \pagebody{#1}% \unvbox\footlinebox % \ifcropmarks \egroup % end of \vbox\bgroup \hfil\egroup % end of (centering) \line\bgroup \vskip\topandbottommargin plus1fill minus1fill \boxmaxdepth = \cornerthick \line{% \vbox{\moveleft\cornerthick\nsbot}% \hfill \vbox{\moveright\cornerthick\nsbot}% }% \nointerlineskip \line{\ewbot\hfil\ewbot}% \egroup % \vbox from first cropmarks clause \fi }% end of \shipout\vbox }% end of group with \turnoffactive \advancepageno \ifnum\outputpenalty>-20000 \else\dosupereject\fi } \newinsert\margin \dimen\margin=\maxdimen \def\pagebody#1{\vbox to\pageheight{\boxmaxdepth=\maxdepth #1}} {\catcode`\@ =11 \gdef\pagecontents#1{\ifvoid\topins\else\unvbox\topins\fi % marginal hacks, juha@viisa.uucp (Juha Takala) \ifvoid\margin\else % marginal info is present \rlap{\kern\hsize\vbox to\z@{\kern1pt\box\margin \vss}}\fi \dimen@=\dp#1 \unvbox#1 \ifvoid\footins\else\vskip\skip\footins\footnoterule \unvbox\footins\fi \ifr@ggedbottom \kern-\dimen@ \vfil \fi} } % Here are the rules for the cropmarks. Note that they are % offset so that the space between them is truly \outerhsize or \outervsize % (P. A. MacKay, 12 November, 1986) % \def\ewtop{\vrule height\cornerthick depth0pt width\cornerlong} \def\nstop{\vbox {\hrule height\cornerthick depth\cornerlong width\cornerthick}} \def\ewbot{\vrule height0pt depth\cornerthick width\cornerlong} \def\nsbot{\vbox {\hrule height\cornerlong depth\cornerthick width\cornerthick}} % Parse an argument, then pass it to #1. The argument is the rest of % the input line (except we remove a trailing comment). #1 should be a % macro which expects an ordinary undelimited TeX argument. % \def\parsearg#1{% \let\next = #1% \begingroup \obeylines \futurelet\temp\parseargx } % If the next token is an obeyed space (from an @example environment or % the like), remove it and recurse. Otherwise, we're done. \def\parseargx{% % \obeyedspace is defined far below, after the definition of \sepspaces. \ifx\obeyedspace\temp \expandafter\parseargdiscardspace \else \expandafter\parseargline \fi } % Remove a single space (as the delimiter token to the macro call). {\obeyspaces % \gdef\parseargdiscardspace {\futurelet\temp\parseargx}} {\obeylines % \gdef\parseargline#1^^M{% \endgroup % End of the group started in \parsearg. % % First remove any @c comment, then any @comment. % Result of each macro is put in \toks0. \argremovec #1\c\relax % \expandafter\argremovecomment \the\toks0 \comment\relax % % % Call the caller's macro, saved as \next in \parsearg. \expandafter\next\expandafter{\the\toks0}% }% } % Since all \c{,omment} does is throw away the argument, we can let TeX % do that for us. The \relax here is matched by the \relax in the call % in \parseargline; it could be more or less anything, its purpose is % just to delimit the argument to the \c. \def\argremovec#1\c#2\relax{\toks0 = {#1}} \def\argremovecomment#1\comment#2\relax{\toks0 = {#1}} % \argremovec{,omment} might leave us with trailing spaces, though; e.g., % @end itemize @c foo % will have two active spaces as part of the argument with the % `itemize'. Here we remove all active spaces from #1, and assign the % result to \toks0. % % This loses if there are any *other* active characters besides spaces % in the argument -- _ ^ +, for example -- since they get expanded. % Fortunately, Texinfo does not define any such commands. (If it ever % does, the catcode of the characters in questionwill have to be changed % here.) But this means we cannot call \removeactivespaces as part of % \argremovec{,omment}, since @c uses \parsearg, and thus the argument % that \parsearg gets might well have any character at all in it. % \def\removeactivespaces#1{% \begingroup \ignoreactivespaces \edef\temp{#1}% \global\toks0 = \expandafter{\temp}% \endgroup } % Change the active space to expand to nothing. % \begingroup \obeyspaces \gdef\ignoreactivespaces{\obeyspaces\let =\empty} \endgroup \def\flushcr{\ifx\par\lisppar \def\next##1{}\else \let\next=\relax \fi \next} %% These are used to keep @begin/@end levels from running away %% Call \inENV within environments (after a \begingroup) \newif\ifENV \ENVfalse \def\inENV{\ifENV\relax\else\ENVtrue\fi} \def\ENVcheck{% \ifENV\errmessage{Still within an environment. Type Return to continue.} \endgroup\fi} % This is not perfect, but it should reduce lossage % @begin foo is the same as @foo, for now. \newhelp\EMsimple{Type to continue.} \outer\def\begin{\parsearg\beginxxx} \def\beginxxx #1{% \expandafter\ifx\csname #1\endcsname\relax {\errhelp=\EMsimple \errmessage{Undefined command @begin #1}}\else \csname #1\endcsname\fi} % @end foo executes the definition of \Efoo. % \def\end{\parsearg\endxxx} \def\endxxx #1{% \removeactivespaces{#1}% \edef\endthing{\the\toks0}% % \expandafter\ifx\csname E\endthing\endcsname\relax \expandafter\ifx\csname \endthing\endcsname\relax % There's no \foo, i.e., no ``environment'' foo. \errhelp = \EMsimple \errmessage{Undefined command `@end \endthing'}% \else \unmatchedenderror\endthing \fi \else % Everything's ok; the right environment has been started. \csname E\endthing\endcsname \fi } % There is an environment #1, but it hasn't been started. Give an error. % \def\unmatchedenderror#1{% \errhelp = \EMsimple \errmessage{This `@end #1' doesn't have a matching `@#1'}% } % Define the control sequence \E#1 to give an unmatched @end error. % \def\defineunmatchedend#1{% \expandafter\def\csname E#1\endcsname{\unmatchedenderror{#1}}% } % Single-spacing is done by various environments (specifically, in % \nonfillstart and \quotations). \newskip\singlespaceskip \singlespaceskip = 12.5pt \def\singlespace{% % Why was this kern here? It messes up equalizing space above and below % environments. --karl, 6may93 %{\advance \baselineskip by -\singlespaceskip %\kern \baselineskip}% \setleading \singlespaceskip } %% Simple single-character @ commands % @@ prints an @ % Kludge this until the fonts are right (grr). \def\@{{\tt \char '100}} % This is turned off because it was never documented % and you can use @w{...} around a quote to suppress ligatures. %% Define @` and @' to be the same as ` and ' %% but suppressing ligatures. %\def\`{{`}} %\def\'{{'}} % Used to generate quoted braces. \def\mylbrace {{\tt \char '173}} \def\myrbrace {{\tt \char '175}} \let\{=\mylbrace \let\}=\myrbrace \begingroup % Definitions to produce actual \{ & \} command in an index. \catcode`\{ = 12 \catcode`\} = 12 \catcode`\[ = 1 \catcode`\] = 2 \catcode`\@ = 0 \catcode`\\ = 12 @gdef@lbracecmd[\{]% @gdef@rbracecmd[\}]% @endgroup % Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent % Others are defined by plain TeX: @` @' @" @^ @~ @= @v @H. \let\, = \c \let\dotaccent = \. \def\ringaccent#1{{\accent23 #1}} \let\tieaccent = \t \let\ubaraccent = \b \let\udotaccent = \d % Other special characters: @questiondown @exclamdown % Plain TeX defines: @AA @AE @O @OE @L (and lowercase versions) @ss. \def\questiondown{?`} \def\exclamdown{!`} % Dotless i and dotless j, used for accents. \def\imacro{i} \def\jmacro{j} \def\dotless#1{% \def\temp{#1}% \ifx\temp\imacro \ptexi \else\ifx\temp\jmacro \j \else \errmessage{@dotless can be used only with i or j}% \fi\fi } % @: forces normal size whitespace following. \def\:{\spacefactor=1000 } % @* forces a line break. \def\*{\hfil\break\hbox{}\ignorespaces} % @. is an end-of-sentence period. \def\.{.\spacefactor=3000 } % @enddots{} is an end-of-sentence ellipsis. \gdef\enddots{$\mathinner{\ldotp\ldotp\ldotp\ldotp}$\spacefactor=3000} % @! is an end-of-sentence bang. \gdef\!{!\spacefactor=3000 } % @? is an end-of-sentence query. \gdef\?{?\spacefactor=3000 } % @w prevents a word break. Without the \leavevmode, @w at the % beginning of a paragraph, when TeX is still in vertical mode, would % produce a whole line of output instead of starting the paragraph. \def\w#1{\leavevmode\hbox{#1}} % @group ... @end group forces ... to be all on one page, by enclosing % it in a TeX vbox. We use \vtop instead of \vbox to construct the box % to keep its height that of a normal line. According to the rules for % \topskip (p.114 of the TeXbook), the glue inserted is % max (\topskip - \ht (first item), 0). If that height is large, % therefore, no glue is inserted, and the space between the headline and % the text is small, which looks bad. % \def\group{\begingroup \ifnum\catcode13=\active \else \errhelp = \groupinvalidhelp \errmessage{@group invalid in context where filling is enabled}% \fi % % The \vtop we start below produces a box with normal height and large % depth; thus, TeX puts \baselineskip glue before it, and (when the % next line of text is done) \lineskip glue after it. (See p.82 of % the TeXbook.) Thus, space below is not quite equal to space % above. But it's pretty close. \def\Egroup{% \egroup % End the \vtop. \endgroup % End the \group. }% % \vtop\bgroup % We have to put a strut on the last line in case the @group is in % the midst of an example, rather than completely enclosing it. % Otherwise, the interline space between the last line of the group % and the first line afterwards is too small. But we can't put the % strut in \Egroup, since there it would be on a line by itself. % Hence this just inserts a strut at the beginning of each line. \everypar = {\strut}% % % Since we have a strut on every line, we don't need any of TeX's % normal interline spacing. \offinterlineskip % % OK, but now we have to do something about blank % lines in the input in @example-like environments, which normally % just turn into \lisppar, which will insert no space now that we've % turned off the interline space. Simplest is to make them be an % empty paragraph. \ifx\par\lisppar \edef\par{\leavevmode \par}% % % Reset ^^M's definition to new definition of \par. \obeylines \fi % % Do @comment since we are called inside an environment such as % @example, where each end-of-line in the input causes an % end-of-line in the output. We don't want the end-of-line after % the `@group' to put extra space in the output. Since @group % should appear on a line by itself (according to the Texinfo % manual), we don't worry about eating any user text. \comment } % % TeX puts in an \escapechar (i.e., `@') at the beginning of the help % message, so this ends up printing `@group can only ...'. % \newhelp\groupinvalidhelp{% group can only be used in environments such as @example,^^J% where each line of input produces a line of output.} % @need space-in-mils % forces a page break if there is not space-in-mils remaining. \newdimen\mil \mil=0.001in \def\need{\parsearg\needx} % Old definition--didn't work. %\def\needx #1{\par % %% This method tries to make TeX break the page naturally %% if the depth of the box does not fit. %{\baselineskip=0pt% %\vtop to #1\mil{\vfil}\kern -#1\mil\penalty 10000 %\prevdepth=-1000pt %}} \def\needx#1{% % Go into vertical mode, so we don't make a big box in the middle of a % paragraph. \par % % Don't add any leading before our big empty box, but allow a page % break, since the best break might be right here. \allowbreak \nointerlineskip \vtop to #1\mil{\vfil}% % % TeX does not even consider page breaks if a penalty added to the % main vertical list is 10000 or more. But in order to see if the % empty box we just added fits on the page, we must make it consider % page breaks. On the other hand, we don't want to actually break the % page after the empty box. So we use a penalty of 9999. % % There is an extremely small chance that TeX will actually break the % page at this \penalty, if there are no other feasible breakpoints in % sight. (If the user is using lots of big @group commands, which % almost-but-not-quite fill up a page, TeX will have a hard time doing % good page breaking, for example.) However, I could not construct an % example where a page broke at this \penalty; if it happens in a real % document, then we can reconsider our strategy. \penalty9999 % % Back up by the size of the box, whether we did a page break or not. \kern -#1\mil % % Do not allow a page break right after this kern. \nobreak } % @br forces paragraph break \let\br = \par % @dots{} output some dots \def\dots{$\ldots$} % @page forces the start of a new page \def\page{\par\vfill\supereject} % @exdent text.... % outputs text on separate line in roman font, starting at standard page margin % This records the amount of indent in the innermost environment. % That's how much \exdent should take out. \newskip\exdentamount % This defn is used inside fill environments such as @defun. \def\exdent{\parsearg\exdentyyy} \def\exdentyyy #1{{\hfil\break\hbox{\kern -\exdentamount{\rm#1}}\hfil\break}} % This defn is used inside nofill environments such as @example. \def\nofillexdent{\parsearg\nofillexdentyyy} \def\nofillexdentyyy #1{{\advance \leftskip by -\exdentamount \leftline{\hskip\leftskip{\rm#1}}}} % @inmargin{TEXT} puts TEXT in the margin next to the current paragraph. \def\inmargin#1{% \strut\vadjust{\nobreak\kern-\strutdepth \vtop to \strutdepth{\baselineskip\strutdepth\vss \llap{\rightskip=\inmarginspacing \vbox{\noindent #1}}\null}}} \newskip\inmarginspacing \inmarginspacing=1cm \def\strutdepth{\dp\strutbox} %\hbox{{\rm#1}}\hfil\break}} % @include file insert text of that file as input. % Allow normal characters that we make active in the argument (a file name). \def\include{\begingroup \catcode`\\=12 \catcode`~=12 \catcode`^=12 \catcode`_=12 \catcode`|=12 \catcode`<=12 \catcode`>=12 \catcode`+=12 \parsearg\includezzz} % Restore active chars for included file. \def\includezzz#1{\endgroup\begingroup % Read the included file in a group so nested @include's work. \def\thisfile{#1}% \input\thisfile \endgroup} \def\thisfile{} % @center line outputs that line, centered \def\center{\parsearg\centerzzz} \def\centerzzz #1{{\advance\hsize by -\leftskip \advance\hsize by -\rightskip \centerline{#1}}} % @sp n outputs n lines of vertical space \def\sp{\parsearg\spxxx} \def\spxxx #1{\vskip #1\baselineskip} % @comment ...line which is ignored... % @c is the same as @comment % @ignore ... @end ignore is another way to write a comment \def\comment{\catcode 64=\other \catcode 123=\other \catcode 125=\other% \parsearg \commentxxx} \def\commentxxx #1{\catcode 64=0 \catcode 123=1 \catcode 125=2 } \let\c=\comment % @paragraphindent is defined for the Info formatting commands only. \let\paragraphindent=\comment % Prevent errors for section commands. % Used in @ignore and in failing conditionals. \def\ignoresections{% \let\chapter=\relax \let\unnumbered=\relax \let\top=\relax \let\unnumberedsec=\relax \let\unnumberedsection=\relax \let\unnumberedsubsec=\relax \let\unnumberedsubsection=\relax \let\unnumberedsubsubsec=\relax \let\unnumberedsubsubsection=\relax \let\section=\relax \let\subsec=\relax \let\subsubsec=\relax \let\subsection=\relax \let\subsubsection=\relax \let\appendix=\relax \let\appendixsec=\relax \let\appendixsection=\relax \let\appendixsubsec=\relax \let\appendixsubsection=\relax \let\appendixsubsubsec=\relax \let\appendixsubsubsection=\relax \let\contents=\relax \let\smallbook=\relax \let\titlepage=\relax } % Used in nested conditionals, where we have to parse the Texinfo source % and so want to turn off most commands, in case they are used % incorrectly. % \def\ignoremorecommands{% \let\defcodeindex = \relax \let\defcv = \relax \let\deffn = \relax \let\deffnx = \relax \let\defindex = \relax \let\defivar = \relax \let\defmac = \relax \let\defmethod = \relax \let\defop = \relax \let\defopt = \relax \let\defspec = \relax \let\deftp = \relax \let\deftypefn = \relax \let\deftypefun = \relax \let\deftypevar = \relax \let\deftypevr = \relax \let\defun = \relax \let\defvar = \relax \let\defvr = \relax \let\ref = \relax \let\xref = \relax \let\printindex = \relax \let\pxref = \relax \let\settitle = \relax \let\setchapternewpage = \relax \let\setchapterstyle = \relax \let\everyheading = \relax \let\evenheading = \relax \let\oddheading = \relax \let\everyfooting = \relax \let\evenfooting = \relax \let\oddfooting = \relax \let\headings = \relax \let\include = \relax \let\lowersections = \relax \let\down = \relax \let\raisesections = \relax \let\up = \relax \let\set = \relax \let\clear = \relax \let\item = \relax } % Ignore @ignore ... @end ignore. % \def\ignore{\doignore{ignore}} % Also ignore @ifinfo, @ifhtml, @html, @menu, and @direntry text. % \def\ifinfo{\doignore{ifinfo}} \def\ifhtml{\doignore{ifhtml}} \def\html{\doignore{html}} \def\menu{\doignore{menu}} \def\direntry{\doignore{direntry}} % Also ignore @macro ... @end macro. The user must run texi2dvi, % which runs makeinfo to do macro expansion. Ignore @unmacro, too. \def\macro{\doignore{macro}} \let\unmacro = \comment % @dircategory CATEGORY -- specify a category of the dir file % which this file should belong to. Ignore this in TeX. \let\dircategory = \comment % Ignore text until a line `@end #1'. % \def\doignore#1{\begingroup % Don't complain about control sequences we have declared \outer. \ignoresections % % Define a command to swallow text until we reach `@end #1'. \long\def\doignoretext##1\end #1{\enddoignore}% % % Make sure that spaces turn into tokens that match what \doignoretext wants. \catcode32 = 10 % % And now expand that command. \doignoretext } % What we do to finish off ignored text. % \def\enddoignore{\endgroup\ignorespaces}% \newif\ifwarnedobs\warnedobsfalse \def\obstexwarn{% \ifwarnedobs\relax\else % We need to warn folks that they may have trouble with TeX 3.0. % This uses \immediate\write16 rather than \message to get newlines. \immediate\write16{} \immediate\write16{***WARNING*** for users of Unix TeX 3.0!} \immediate\write16{This manual trips a bug in TeX version 3.0 (tex hangs).} \immediate\write16{If you are running another version of TeX, relax.} \immediate\write16{If you are running Unix TeX 3.0, kill this TeX process.} \immediate\write16{ Then upgrade your TeX installation if you can.} \immediate\write16{ (See ftp://ftp.gnu.ai.mit.edu/pub/gnu/TeX.README.)} \immediate\write16{If you are stuck with version 3.0, run the} \immediate\write16{ script ``tex3patch'' from the Texinfo distribution} \immediate\write16{ to use a workaround.} \immediate\write16{} \global\warnedobstrue \fi } % **In TeX 3.0, setting text in \nullfont hangs tex. For a % workaround (which requires the file ``dummy.tfm'' to be installed), % uncomment the following line: %%%%%\font\nullfont=dummy\let\obstexwarn=\relax % Ignore text, except that we keep track of conditional commands for % purposes of nesting, up to an `@end #1' command. % \def\nestedignore#1{% \obstexwarn % We must actually expand the ignored text to look for the @end % command, so that nested ignore constructs work. Thus, we put the % text into a \vbox and then do nothing with the result. To minimize % the change of memory overflow, we follow the approach outlined on % page 401 of the TeXbook: make the current font be a dummy font. % \setbox0 = \vbox\bgroup % Don't complain about control sequences we have declared \outer. \ignoresections % % Define `@end #1' to end the box, which will in turn undefine the % @end command again. \expandafter\def\csname E#1\endcsname{\egroup\ignorespaces}% % % We are going to be parsing Texinfo commands. Most cause no % trouble when they are used incorrectly, but some commands do % complicated argument parsing or otherwise get confused, so we % undefine them. % % We can't do anything about stray @-signs, unfortunately; % they'll produce `undefined control sequence' errors. \ignoremorecommands % % Set the current font to be \nullfont, a TeX primitive, and define % all the font commands to also use \nullfont. We don't use % dummy.tfm, as suggested in the TeXbook, because not all sites % might have that installed. Therefore, math mode will still % produce output, but that should be an extremely small amount of % stuff compared to the main input. % \nullfont \let\tenrm = \nullfont \let\tenit = \nullfont \let\tensl = \nullfont \let\tenbf = \nullfont \let\tentt = \nullfont \let\smallcaps = \nullfont \let\tensf = \nullfont % Similarly for index fonts (mostly for their use in % smallexample) \let\indrm = \nullfont \let\indit = \nullfont \let\indsl = \nullfont \let\indbf = \nullfont \let\indtt = \nullfont \let\indsc = \nullfont \let\indsf = \nullfont % % Don't complain when characters are missing from the fonts. \tracinglostchars = 0 % % Don't bother to do space factor calculations. \frenchspacing % % Don't report underfull hboxes. \hbadness = 10000 % % Do minimal line-breaking. \pretolerance = 10000 % % Do not execute instructions in @tex \def\tex{\doignore{tex}} } % @set VAR sets the variable VAR to an empty value. % @set VAR REST-OF-LINE sets VAR to the value REST-OF-LINE. % % Since we want to separate VAR from REST-OF-LINE (which might be % empty), we can't just use \parsearg; we have to insert a space of our % own to delimit the rest of the line, and then take it out again if we % didn't need it. Make sure the catcode of space is correct to avoid % losing inside @example, for instance. % \def\set{\begingroup\catcode` =10 \catcode`\-=12 \catcode`\_=12 % Allow - and _ in VAR. \parsearg\setxxx} \def\setxxx#1{\setyyy#1 \endsetyyy} \def\setyyy#1 #2\endsetyyy{% \def\temp{#2}% \ifx\temp\empty \global\expandafter\let\csname SET#1\endcsname = \empty \else \setzzz{#1}#2\endsetzzz % Remove the trailing space \setxxx inserted. \fi \endgroup } % Can't use \xdef to pre-expand #2 and save some time, since \temp or % \next or other control sequences that we've defined might get us into % an infinite loop. Consider `@set foo @cite{bar}'. \def\setzzz#1#2 \endsetzzz{\expandafter\gdef\csname SET#1\endcsname{#2}} % @clear VAR clears (i.e., unsets) the variable VAR. % \def\clear{\parsearg\clearxxx} \def\clearxxx#1{\global\expandafter\let\csname SET#1\endcsname=\relax} % @value{foo} gets the text saved in variable foo. % \def\value{\begingroup \catcode`\-=12 \catcode`\_=12 % Allow - and _ in VAR. \valuexxx} \def\valuexxx#1{% \expandafter\ifx\csname SET#1\endcsname\relax {\{No value for ``#1''\}}% \else \csname SET#1\endcsname \fi \endgroup} % @ifset VAR ... @end ifset reads the `...' iff VAR has been defined % with @set. % \def\ifset{\parsearg\ifsetxxx} \def\ifsetxxx #1{% \expandafter\ifx\csname SET#1\endcsname\relax \expandafter\ifsetfail \else \expandafter\ifsetsucceed \fi } \def\ifsetsucceed{\conditionalsucceed{ifset}} \def\ifsetfail{\nestedignore{ifset}} \defineunmatchedend{ifset} % @ifclear VAR ... @end ifclear reads the `...' iff VAR has never been % defined with @set, or has been undefined with @clear. % \def\ifclear{\parsearg\ifclearxxx} \def\ifclearxxx #1{% \expandafter\ifx\csname SET#1\endcsname\relax \expandafter\ifclearsucceed \else \expandafter\ifclearfail \fi } \def\ifclearsucceed{\conditionalsucceed{ifclear}} \def\ifclearfail{\nestedignore{ifclear}} \defineunmatchedend{ifclear} % @iftex always succeeds; we read the text following, through @end % iftex). But `@end iftex' should be valid only after an @iftex. % \def\iftex{\conditionalsucceed{iftex}} \defineunmatchedend{iftex} % We can't just want to start a group at @iftex (for example) and end it % at @end iftex, since then @set commands inside the conditional have no % effect (they'd get reverted at the end of the group). So we must % define \Eiftex to redefine itself to be its previous value. (We can't % just define it to fail again with an ``unmatched end'' error, since % the @ifset might be nested.) % \def\conditionalsucceed#1{% \edef\temp{% % Remember the current value of \E#1. \let\nece{prevE#1} = \nece{E#1}% % % At the `@end #1', redefine \E#1 to be its previous value. \def\nece{E#1}{\let\nece{E#1} = \nece{prevE#1}}% }% \temp } % We need to expand lots of \csname's, but we don't want to expand the % control sequences after we've constructed them. % \def\nece#1{\expandafter\noexpand\csname#1\endcsname} % @asis just yields its argument. Used with @table, for example. % \def\asis#1{#1} % @math means output in math mode. % We don't use $'s directly in the definition of \math because control % sequences like \math are expanded when the toc file is written. Then, % we read the toc file back, the $'s will be normal characters (as they % should be, according to the definition of Texinfo). So we must use a % control sequence to switch into and out of math mode. % % This isn't quite enough for @math to work properly in indices, but it % seems unlikely it will ever be needed there. % \let\implicitmath = $ \def\math#1{\implicitmath #1\implicitmath} % @bullet and @minus need the same treatment as @math, just above. \def\bullet{\implicitmath\ptexbullet\implicitmath} \def\minus{\implicitmath-\implicitmath} \def\node{\ENVcheck\parsearg\nodezzz} \def\nodezzz#1{\nodexxx [#1,]} \def\nodexxx[#1,#2]{\gdef\lastnode{#1}} \let\nwnode=\node \let\lastnode=\relax \def\donoderef{\ifx\lastnode\relax\else \expandafter\expandafter\expandafter\setref{\lastnode}\fi \global\let\lastnode=\relax} \def\unnumbnoderef{\ifx\lastnode\relax\else \expandafter\expandafter\expandafter\unnumbsetref{\lastnode}\fi \global\let\lastnode=\relax} \def\appendixnoderef{\ifx\lastnode\relax\else \expandafter\expandafter\expandafter\appendixsetref{\lastnode}\fi \global\let\lastnode=\relax} % @refill is a no-op. \let\refill=\relax % @setfilename is done at the beginning of every texinfo file. % So open here the files we need to have open while reading the input. % This makes it possible to make a .fmt file for texinfo. \def\setfilename{% \readauxfile \opencontents \openindices \fixbackslash % Turn off hack to swallow `\input texinfo'. \global\let\setfilename=\comment % Ignore extra @setfilename cmds. \comment % Ignore the actual filename. } % @bye. \outer\def\bye{\pagealignmacro\tracingstats=1\ptexend} % \def\macro#1{\begingroup\ignoresections\catcode`\#=6\def\macrotemp{#1}\parsearg\macroxxx} % \def\macroxxx#1#2 \end macro{% % \expandafter\gdef\macrotemp#1{#2}% % \endgroup} %\def\linemacro#1{\begingroup\ignoresections\catcode`\#=6\def\macrotemp{#1}\parsearg\linemacroxxx} %\def\linemacroxxx#1#2 \end linemacro{% %\let\parsearg=\relax %\edef\macrotempx{\csname M\butfirst\expandafter\string\macrotemp\endcsname}% %\expandafter\xdef\macrotemp{\parsearg\macrotempx}% %\expandafter\gdef\macrotempx#1{#2}% %\endgroup} %\def\butfirst#1{} \message{fonts,} % Font-change commands. % Texinfo supports the sans serif font style, which plain TeX does not. % So we set up a \sf analogous to plain's \rm, etc. \newfam\sffam \def\sf{\fam=\sffam \tensf} \let\li = \sf % Sometimes we call it \li, not \sf. % We don't need math for this one. \def\ttsl{\tenttsl} %% Try out Computer Modern fonts at \magstephalf \let\mainmagstep=\magstephalf % Set the font macro #1 to the font named #2, adding on the % specified font prefix (normally `cm'). % #3 is the font's design size, #4 is a scale factor \def\setfont#1#2#3#4{\font#1=\fontprefix#2#3 scaled #4} % Use cm as the default font prefix. % To specify the font prefix, you must define \fontprefix % before you read in texinfo.tex. \ifx\fontprefix\undefined \def\fontprefix{cm} \fi % Support font families that don't use the same naming scheme as CM. \def\rmshape{r} \def\rmbshape{bx} %where the normal face is bold \def\bfshape{b} \def\bxshape{bx} \def\ttshape{tt} \def\ttbshape{tt} \def\ttslshape{sltt} \def\itshape{ti} \def\itbshape{bxti} \def\slshape{sl} \def\slbshape{bxsl} \def\sfshape{ss} \def\sfbshape{ss} \def\scshape{csc} \def\scbshape{csc} \ifx\bigger\relax \let\mainmagstep=\magstep1 \setfont\textrm\rmshape{12}{1000} \setfont\texttt\ttshape{12}{1000} \else \setfont\textrm\rmshape{10}{\mainmagstep} \setfont\texttt\ttshape{10}{\mainmagstep} \fi % Instead of cmb10, you many want to use cmbx10. % cmbx10 is a prettier font on its own, but cmb10 % looks better when embedded in a line with cmr10. \setfont\textbf\bfshape{10}{\mainmagstep} \setfont\textit\itshape{10}{\mainmagstep} \setfont\textsl\slshape{10}{\mainmagstep} \setfont\textsf\sfshape{10}{\mainmagstep} \setfont\textsc\scshape{10}{\mainmagstep} \setfont\textttsl\ttslshape{10}{\mainmagstep} \font\texti=cmmi10 scaled \mainmagstep \font\textsy=cmsy10 scaled \mainmagstep % A few fonts for @defun, etc. \setfont\defbf\bxshape{10}{\magstep1} %was 1314 \setfont\deftt\ttshape{10}{\magstep1} \def\df{\let\tentt=\deftt \let\tenbf = \defbf \bf} % Fonts for indices and small examples (9pt). % We actually use the slanted font rather than the italic, % because texinfo normally uses the slanted fonts for that. % Do not make many font distinctions in general in the index, since they % aren't very useful. \setfont\ninett\ttshape{9}{1000} \setfont\indrm\rmshape{9}{1000} \setfont\indit\slshape{9}{1000} \let\indsl=\indit \let\indtt=\ninett \let\indttsl=\ninett \let\indsf=\indrm \let\indbf=\indrm \setfont\indsc\scshape{10}{900} \font\indi=cmmi9 \font\indsy=cmsy9 % Chapter (and unnumbered) fonts (17.28pt). \setfont\chaprm\rmbshape{12}{\magstep2} \setfont\chapit\itbshape{10}{\magstep3} \setfont\chapsl\slbshape{10}{\magstep3} \setfont\chaptt\ttbshape{12}{\magstep2} \setfont\chapttsl\ttslshape{10}{\magstep3} \setfont\chapsf\sfbshape{12}{\magstep2} \let\chapbf=\chaprm \setfont\chapsc\scbshape{10}{\magstep3} \font\chapi=cmmi12 scaled \magstep2 \font\chapsy=cmsy10 scaled \magstep3 % Section fonts (14.4pt). \setfont\secrm\rmbshape{12}{\magstep1} \setfont\secit\itbshape{10}{\magstep2} \setfont\secsl\slbshape{10}{\magstep2} \setfont\sectt\ttbshape{12}{\magstep1} \setfont\secttsl\ttslshape{10}{\magstep2} \setfont\secsf\sfbshape{12}{\magstep1} \let\secbf\secrm \setfont\secsc\scbshape{10}{\magstep2} \font\seci=cmmi12 scaled \magstep1 \font\secsy=cmsy10 scaled \magstep2 % \setfont\ssecrm\bxshape{10}{\magstep1} % This size an font looked bad. % \setfont\ssecit\itshape{10}{\magstep1} % The letters were too crowded. % \setfont\ssecsl\slshape{10}{\magstep1} % \setfont\ssectt\ttshape{10}{\magstep1} % \setfont\ssecsf\sfshape{10}{\magstep1} %\setfont\ssecrm\bfshape{10}{1315} % Note the use of cmb rather than cmbx. %\setfont\ssecit\itshape{10}{1315} % Also, the size is a little larger than %\setfont\ssecsl\slshape{10}{1315} % being scaled magstep1. %\setfont\ssectt\ttshape{10}{1315} %\setfont\ssecsf\sfshape{10}{1315} %\let\ssecbf=\ssecrm % Subsection fonts (13.15pt). \setfont\ssecrm\rmbshape{12}{\magstephalf} \setfont\ssecit\itbshape{10}{1315} \setfont\ssecsl\slbshape{10}{1315} \setfont\ssectt\ttbshape{12}{\magstephalf} \setfont\ssecttsl\ttslshape{10}{\magstep1} \setfont\ssecsf\sfbshape{12}{\magstephalf} \let\ssecbf\ssecrm \setfont\ssecsc\scbshape{10}{\magstep1} \font\sseci=cmmi12 scaled \magstephalf \font\ssecsy=cmsy10 scaled \magstep1 % The smallcaps and symbol fonts should actually be scaled \magstep1.5, % but that is not a standard magnification. % Fonts for title page: \setfont\titlerm\rmbshape{12}{\magstep3} \let\authorrm = \secrm % In order for the font changes to affect most math symbols and letters, % we have to define the \textfont of the standard families. Since % texinfo doesn't allow for producing subscripts and superscripts, we % don't bother to reset \scriptfont and \scriptscriptfont (which would % also require loading a lot more fonts). % \def\resetmathfonts{% \textfont0 = \tenrm \textfont1 = \teni \textfont2 = \tensy \textfont\itfam = \tenit \textfont\slfam = \tensl \textfont\bffam = \tenbf \textfont\ttfam = \tentt \textfont\sffam = \tensf } % The font-changing commands redefine the meanings of \tenSTYLE, instead % of just \STYLE. We do this so that font changes will continue to work % in math mode, where it is the current \fam that is relevant in most % cases, not the current font. Plain TeX does \def\bf{\fam=\bffam % \tenbf}, for example. By redefining \tenbf, we obviate the need to % redefine \bf itself. \def\textfonts{% \let\tenrm=\textrm \let\tenit=\textit \let\tensl=\textsl \let\tenbf=\textbf \let\tentt=\texttt \let\smallcaps=\textsc \let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy \let\tenttsl=\textttsl \resetmathfonts} \def\chapfonts{% \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl \let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc \let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy \let\tenttsl=\chapttsl \resetmathfonts \setleading{19pt}} \def\secfonts{% \let\tenrm=\secrm \let\tenit=\secit \let\tensl=\secsl \let\tenbf=\secbf \let\tentt=\sectt \let\smallcaps=\secsc \let\tensf=\secsf \let\teni=\seci \let\tensy=\secsy \let\tenttsl=\secttsl \resetmathfonts \setleading{16pt}} \def\subsecfonts{% \let\tenrm=\ssecrm \let\tenit=\ssecit \let\tensl=\ssecsl \let\tenbf=\ssecbf \let\tentt=\ssectt \let\smallcaps=\ssecsc \let\tensf=\ssecsf \let\teni=\sseci \let\tensy=\ssecsy \let\tenttsl=\ssecttsl \resetmathfonts \setleading{15pt}} \let\subsubsecfonts = \subsecfonts % Maybe make sssec fonts scaled magstephalf? \def\indexfonts{% \let\tenrm=\indrm \let\tenit=\indit \let\tensl=\indsl \let\tenbf=\indbf \let\tentt=\indtt \let\smallcaps=\indsc \let\tensf=\indsf \let\teni=\indi \let\tensy=\indsy \let\tenttsl=\indttsl \resetmathfonts \setleading{12pt}} % Set up the default fonts, so we can use them for creating boxes. % \textfonts % Count depth in font-changes, for error checks \newcount\fontdepth \fontdepth=0 % Fonts for short table of contents. \setfont\shortcontrm\rmshape{12}{1000} \setfont\shortcontbf\bxshape{12}{1000} \setfont\shortcontsl\slshape{12}{1000} %% Add scribe-like font environments, plus @l for inline lisp (usually sans %% serif) and @ii for TeX italic % \smartitalic{ARG} outputs arg in italics, followed by an italic correction % unless the following character is such as not to need one. \def\smartitalicx{\ifx\next,\else\ifx\next-\else\ifx\next.\else\/\fi\fi\fi} \def\smartitalic#1{{\sl #1}\futurelet\next\smartitalicx} \let\i=\smartitalic \let\var=\smartitalic \let\dfn=\smartitalic \let\emph=\smartitalic \let\cite=\smartitalic \def\b#1{{\bf #1}} \let\strong=\b % We can't just use \exhyphenpenalty, because that only has effect at % the end of a paragraph. Restore normal hyphenation at the end of the % group within which \nohyphenation is presumably called. % \def\nohyphenation{\hyphenchar\font = -1 \aftergroup\restorehyphenation} \def\restorehyphenation{\hyphenchar\font = `- } \def\t#1{% {\tt \rawbackslash \frenchspacing #1}% \null } \let\ttfont=\t \def\samp #1{`\tclose{#1}'\null} \setfont\smallrm\rmshape{8}{1000} \font\smallsy=cmsy9 \def\key#1{{\smallrm\textfont2=\smallsy \leavevmode\hbox{% \raise0.4pt\hbox{$\langle$}\kern-.08em\vtop{% \vbox{\hrule\kern-0.4pt \hbox{\raise0.4pt\hbox{\vphantom{$\langle$}}#1}}% \kern-0.4pt\hrule}% \kern-.06em\raise0.4pt\hbox{$\rangle$}}}} % The old definition, with no lozenge: %\def\key #1{{\ttsl \nohyphenation \uppercase{#1}}\null} \def\ctrl #1{{\tt \rawbackslash \hat}#1} \let\file=\samp % @code is a modification of @t, % which makes spaces the same size as normal in the surrounding text. \def\tclose#1{% {% % Change normal interword space to be same as for the current font. \spaceskip = \fontdimen2\font % % Switch to typewriter. \tt % % But `\ ' produces the large typewriter interword space. \def\ {{\spaceskip = 0pt{} }}% % % Turn off hyphenation. \nohyphenation % \rawbackslash \frenchspacing #1% }% \null } % We *must* turn on hyphenation at `-' and `_' in \code. % Otherwise, it is too hard to avoid overfull hboxes % in the Emacs manual, the Library manual, etc. % Unfortunately, TeX uses one parameter (\hyphenchar) to control % both hyphenation at - and hyphenation within words. % We must therefore turn them both off (\tclose does that) % and arrange explicitly to hyphenate at a dash. % -- rms. { \catcode`\-=\active \catcode`\_=\active \catcode`\|=\active \global\def\code{\begingroup \catcode`\-=\active \let-\codedash \catcode`\_=\active \let_\codeunder \codex} % The following is used by \doprintindex to insure that long function names % wrap around. It is necessary for - and _ to be active before the index is % read from the file, as \entry parses the arguments long before \code is % ever called. -- mycroft % _ is always active; and it shouldn't be \let = to an _ that is a % subscript character anyway. Then, @cindex @samp{_} (for example) % fails. --karl \global\def\indexbreaks{% \catcode`\-=\active \let-\realdash } } \def\realdash{-} \def\codedash{-\discretionary{}{}{}} \def\codeunder{\ifusingtt{\normalunderscore\discretionary{}{}{}}{\_}} \def\codex #1{\tclose{#1}\endgroup} %\let\exp=\tclose %Was temporary % @kbd is like @code, except that if the argument is just one @key command, % then @kbd has no effect. % \def\xkey{\key} \def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}% \ifx\one\xkey\ifx\threex\three \key{#2}% \else{\tclose{\ttsl\look}}\fi \else{\tclose{\ttsl\look}}\fi} % @url, @email. Quotes do not seem necessary. \let\url=\code % perhaps include a hypertex \special eventually % rms does not like the angle brackets --karl, 17may97. %\def\email#1{$\langle${\tt #1}$\rangle$} \let\email=\code % Check if we are currently using a typewriter font. Since all the % Computer Modern typewriter fonts have zero interword stretch (and % shrink), and it is reasonable to expect all typewriter fonts to have % this property, we can check that font parameter. % \def\ifmonospace{\ifdim\fontdimen3\font=0pt } % Typeset a dimension, e.g., `in' or `pt'. The only reason for the % argument is to make the input look right: @dmn{pt} instead of % @dmn{}pt. % \def\dmn#1{\thinspace #1} \def\kbd#1{\def\look{#1}\expandafter\kbdfoo\look??\par} % @l was never documented to mean ``switch to the Lisp font'', % and it is not used as such in any manual I can find. We need it for % Polish suppressed-l. --karl, 22sep96. %\def\l#1{{\li #1}\null} \def\r#1{{\rm #1}} % roman font % Use of \lowercase was suggested. \def\sc#1{{\smallcaps#1}} % smallcaps font \def\ii#1{{\it #1}} % italic font % @pounds{} is a sterling sign. \def\pounds{{\it\$}} \message{page headings,} \newskip\titlepagetopglue \titlepagetopglue = 1.5in \newskip\titlepagebottomglue \titlepagebottomglue = 2pc % First the title page. Must do @settitle before @titlepage. \def\titlefont#1{{\titlerm #1}} \newif\ifseenauthor \newif\iffinishedtitlepage \def\shorttitlepage{\parsearg\shorttitlepagezzz} \def\shorttitlepagezzz #1{\begingroup\hbox{}\vskip 1.5in \chaprm \centerline{#1}% \endgroup\page\hbox{}\page} \def\titlepage{\begingroup \parindent=0pt \textfonts \let\subtitlerm=\tenrm % I deinstalled the following change because \cmr12 is undefined. % This change was not in the ChangeLog anyway. --rms. % \let\subtitlerm=\cmr12 \def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines}% % \def\authorfont{\authorrm \normalbaselineskip = 16pt \normalbaselines}% % % Leave some space at the very top of the page. \vglue\titlepagetopglue % % Now you can print the title using @title. \def\title{\parsearg\titlezzz}% \def\titlezzz##1{\leftline{\titlefont{##1}} % print a rule at the page bottom also. \finishedtitlepagefalse \vskip4pt \hrule height 4pt width \hsize \vskip4pt}% % No rule at page bottom unless we print one at the top with @title. \finishedtitlepagetrue % % Now you can put text using @subtitle. \def\subtitle{\parsearg\subtitlezzz}% \def\subtitlezzz##1{{\subtitlefont \rightline{##1}}}% % % @author should come last, but may come many times. \def\author{\parsearg\authorzzz}% \def\authorzzz##1{\ifseenauthor\else\vskip 0pt plus 1filll\seenauthortrue\fi {\authorfont \leftline{##1}}}% % % Most title ``pages'' are actually two pages long, with space % at the top of the second. We don't want the ragged left on the second. \let\oldpage = \page \def\page{% \iffinishedtitlepage\else \finishtitlepage \fi \oldpage \let\page = \oldpage \hbox{}}% % \def\page{\oldpage \hbox{}} } \def\Etitlepage{% \iffinishedtitlepage\else \finishtitlepage \fi % It is important to do the page break before ending the group, % because the headline and footline are only empty inside the group. % If we use the new definition of \page, we always get a blank page % after the title page, which we certainly don't want. \oldpage \endgroup \HEADINGSon } \def\finishtitlepage{% \vskip4pt \hrule height 2pt width \hsize \vskip\titlepagebottomglue \finishedtitlepagetrue } %%% Set up page headings and footings. \let\thispage=\folio \newtoks \evenheadline % Token sequence for heading line of even pages \newtoks \oddheadline % Token sequence for heading line of odd pages \newtoks \evenfootline % Token sequence for footing line of even pages \newtoks \oddfootline % Token sequence for footing line of odd pages % Now make Tex use those variables \headline={{\textfonts\rm \ifodd\pageno \the\oddheadline \else \the\evenheadline \fi}} \footline={{\textfonts\rm \ifodd\pageno \the\oddfootline \else \the\evenfootline \fi}\HEADINGShook} \let\HEADINGShook=\relax % Commands to set those variables. % For example, this is what @headings on does % @evenheading @thistitle|@thispage|@thischapter % @oddheading @thischapter|@thispage|@thistitle % @evenfooting @thisfile|| % @oddfooting ||@thisfile \def\evenheading{\parsearg\evenheadingxxx} \def\oddheading{\parsearg\oddheadingxxx} \def\everyheading{\parsearg\everyheadingxxx} \def\evenfooting{\parsearg\evenfootingxxx} \def\oddfooting{\parsearg\oddfootingxxx} \def\everyfooting{\parsearg\everyfootingxxx} {\catcode`\@=0 % \gdef\evenheadingxxx #1{\evenheadingyyy #1@|@|@|@|\finish} \gdef\evenheadingyyy #1@|#2@|#3@|#4\finish{% \global\evenheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} \gdef\oddheadingxxx #1{\oddheadingyyy #1@|@|@|@|\finish} \gdef\oddheadingyyy #1@|#2@|#3@|#4\finish{% \global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} \gdef\everyheadingxxx #1{\everyheadingyyy #1@|@|@|@|\finish} \gdef\everyheadingyyy #1@|#2@|#3@|#4\finish{% \global\evenheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}} \global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} \gdef\evenfootingxxx #1{\evenfootingyyy #1@|@|@|@|\finish} \gdef\evenfootingyyy #1@|#2@|#3@|#4\finish{% \global\evenfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} \gdef\oddfootingxxx #1{\oddfootingyyy #1@|@|@|@|\finish} \gdef\oddfootingyyy #1@|#2@|#3@|#4\finish{% \global\oddfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} \gdef\everyfootingxxx #1{\everyfootingyyy #1@|@|@|@|\finish} \gdef\everyfootingyyy #1@|#2@|#3@|#4\finish{% \global\evenfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}} \global\oddfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} % }% unbind the catcode of @. % @headings double turns headings on for double-sided printing. % @headings single turns headings on for single-sided printing. % @headings off turns them off. % @headings on same as @headings double, retained for compatibility. % @headings after turns on double-sided headings after this page. % @headings doubleafter turns on double-sided headings after this page. % @headings singleafter turns on single-sided headings after this page. % By default, they are off at the start of a document, % and turned `on' after @end titlepage. \def\headings #1 {\csname HEADINGS#1\endcsname} \def\HEADINGSoff{ \global\evenheadline={\hfil} \global\evenfootline={\hfil} \global\oddheadline={\hfil} \global\oddfootline={\hfil}} \HEADINGSoff % When we turn headings on, set the page number to 1. % For double-sided printing, put current file name in lower left corner, % chapter name on inside top of right hand pages, document % title on inside top of left hand pages, and page numbers on outside top % edge of all pages. \def\HEADINGSdouble{ \global\pageno=1 \global\evenfootline={\hfil} \global\oddfootline={\hfil} \global\evenheadline={\line{\folio\hfil\thistitle}} \global\oddheadline={\line{\thischapter\hfil\folio}} \global\let\contentsalignmacro = \chapoddpage } \let\contentsalignmacro = \chappager % For single-sided printing, chapter title goes across top left of page, % page number on top right. \def\HEADINGSsingle{ \global\pageno=1 \global\evenfootline={\hfil} \global\oddfootline={\hfil} \global\evenheadline={\line{\thischapter\hfil\folio}} \global\oddheadline={\line{\thischapter\hfil\folio}} \global\let\contentsalignmacro = \chappager } \def\HEADINGSon{\HEADINGSdouble} \def\HEADINGSafter{\let\HEADINGShook=\HEADINGSdoublex} \let\HEADINGSdoubleafter=\HEADINGSafter \def\HEADINGSdoublex{% \global\evenfootline={\hfil} \global\oddfootline={\hfil} \global\evenheadline={\line{\folio\hfil\thistitle}} \global\oddheadline={\line{\thischapter\hfil\folio}} \global\let\contentsalignmacro = \chapoddpage } \def\HEADINGSsingleafter{\let\HEADINGShook=\HEADINGSsinglex} \def\HEADINGSsinglex{% \global\evenfootline={\hfil} \global\oddfootline={\hfil} \global\evenheadline={\line{\thischapter\hfil\folio}} \global\oddheadline={\line{\thischapter\hfil\folio}} \global\let\contentsalignmacro = \chappager } % Subroutines used in generating headings % Produces Day Month Year style of output. \def\today{\number\day\space \ifcase\month\or January\or February\or March\or April\or May\or June\or July\or August\or September\or October\or November\or December\fi \space\number\year} % Use this if you want the Month Day, Year style of output. %\def\today{\ifcase\month\or %January\or February\or March\or April\or May\or June\or %July\or August\or September\or October\or November\or December\fi %\space\number\day, \number\year} % @settitle line... specifies the title of the document, for headings % It generates no output of its own \def\thistitle{No Title} \def\settitle{\parsearg\settitlezzz} \def\settitlezzz #1{\gdef\thistitle{#1}} \message{tables,} % @tabs -- simple alignment % These don't work. For one thing, \+ is defined as outer. % So these macros cannot even be defined. %\def\tabs{\parsearg\tabszzz} %\def\tabszzz #1{\settabs\+#1\cr} %\def\tabline{\parsearg\tablinezzz} %\def\tablinezzz #1{\+#1\cr} %\def\&{&} % Tables -- @table, @ftable, @vtable, @item(x), @kitem(x), @xitem(x). % default indentation of table text \newdimen\tableindent \tableindent=.8in % default indentation of @itemize and @enumerate text \newdimen\itemindent \itemindent=.3in % margin between end of table item and start of table text. \newdimen\itemmargin \itemmargin=.1in % used internally for \itemindent minus \itemmargin \newdimen\itemmax % Note @table, @vtable, and @vtable define @item, @itemx, etc., with % these defs. % They also define \itemindex % to index the item name in whatever manner is desired (perhaps none). \newif\ifitemxneedsnegativevskip \def\itemxpar{\par\ifitemxneedsnegativevskip\nobreak\vskip-\parskip\nobreak\fi} \def\internalBitem{\smallbreak \parsearg\itemzzz} \def\internalBitemx{\itemxpar \parsearg\itemzzz} \def\internalBxitem "#1"{\def\xitemsubtopix{#1} \smallbreak \parsearg\xitemzzz} \def\internalBxitemx "#1"{\def\xitemsubtopix{#1} \itemxpar \parsearg\xitemzzz} \def\internalBkitem{\smallbreak \parsearg\kitemzzz} \def\internalBkitemx{\itemxpar \parsearg\kitemzzz} \def\kitemzzz #1{\dosubind {kw}{\code{#1}}{for {\bf \lastfunction}}% \itemzzz {#1}} \def\xitemzzz #1{\dosubind {kw}{\code{#1}}{for {\bf \xitemsubtopic}}% \itemzzz {#1}} \def\itemzzz #1{\begingroup % \advance\hsize by -\rightskip \advance\hsize by -\tableindent \setbox0=\hbox{\itemfont{#1}}% \itemindex{#1}% \nobreak % This prevents a break before @itemx. % % Be sure we are not still in the middle of a paragraph. %{\parskip = 0in %\par %}% % % If the item text does not fit in the space we have, put it on a line % by itself, and do not allow a page break either before or after that % line. We do not start a paragraph here because then if the next % command is, e.g., @kindex, the whatsit would get put into the % horizontal list on a line by itself, resulting in extra blank space. \ifdim \wd0>\itemmax % % Make this a paragraph so we get the \parskip glue and wrapping, % but leave it ragged-right. \begingroup \advance\leftskip by-\tableindent \advance\hsize by\tableindent \advance\rightskip by0pt plus1fil \leavevmode\unhbox0\par \endgroup % % We're going to be starting a paragraph, but we don't want the % \parskip glue -- logically it's part of the @item we just started. \nobreak \vskip-\parskip % % Stop a page break at the \parskip glue coming up. Unfortunately % we can't prevent a possible page break at the following % \baselineskip glue. \nobreak \endgroup \itemxneedsnegativevskipfalse \else % The item text fits into the space. Start a paragraph, so that the % following text (if any) will end up on the same line. Since that % text will be indented by \tableindent, we make the item text be in % a zero-width box. \noindent \rlap{\hskip -\tableindent\box0}\ignorespaces% \endgroup% \itemxneedsnegativevskiptrue% \fi } \def\item{\errmessage{@item while not in a table}} \def\itemx{\errmessage{@itemx while not in a table}} \def\kitem{\errmessage{@kitem while not in a table}} \def\kitemx{\errmessage{@kitemx while not in a table}} \def\xitem{\errmessage{@xitem while not in a table}} \def\xitemx{\errmessage{@xitemx while not in a table}} %% Contains a kludge to get @end[description] to work \def\description{\tablez{\dontindex}{1}{}{}{}{}} \def\table{\begingroup\inENV\obeylines\obeyspaces\tablex} {\obeylines\obeyspaces% \gdef\tablex #1^^M{% \tabley\dontindex#1 \endtabley}} \def\ftable{\begingroup\inENV\obeylines\obeyspaces\ftablex} {\obeylines\obeyspaces% \gdef\ftablex #1^^M{% \tabley\fnitemindex#1 \endtabley \def\Eftable{\endgraf\afterenvbreak\endgroup}% \let\Etable=\relax}} \def\vtable{\begingroup\inENV\obeylines\obeyspaces\vtablex} {\obeylines\obeyspaces% \gdef\vtablex #1^^M{% \tabley\vritemindex#1 \endtabley \def\Evtable{\endgraf\afterenvbreak\endgroup}% \let\Etable=\relax}} \def\dontindex #1{} \def\fnitemindex #1{\doind {fn}{\code{#1}}}% \def\vritemindex #1{\doind {vr}{\code{#1}}}% {\obeyspaces % \gdef\tabley#1#2 #3 #4 #5 #6 #7\endtabley{\endgroup% \tablez{#1}{#2}{#3}{#4}{#5}{#6}}} \def\tablez #1#2#3#4#5#6{% \aboveenvbreak % \begingroup % \def\Edescription{\Etable}% Necessary kludge. \let\itemindex=#1% \ifnum 0#3>0 \advance \leftskip by #3\mil \fi % \ifnum 0#4>0 \tableindent=#4\mil \fi % \ifnum 0#5>0 \advance \rightskip by #5\mil \fi % \def\itemfont{#2}% \itemmax=\tableindent % \advance \itemmax by -\itemmargin % \advance \leftskip by \tableindent % \exdentamount=\tableindent \parindent = 0pt \parskip = \smallskipamount \ifdim \parskip=0pt \parskip=2pt \fi% \def\Etable{\endgraf\afterenvbreak\endgroup}% \let\item = \internalBitem % \let\itemx = \internalBitemx % \let\kitem = \internalBkitem % \let\kitemx = \internalBkitemx % \let\xitem = \internalBxitem % \let\xitemx = \internalBxitemx % } % This is the counter used by @enumerate, which is really @itemize \newcount \itemno \def\itemize{\parsearg\itemizezzz} \def\itemizezzz #1{% \begingroup % ended by the @end itemsize \itemizey {#1}{\Eitemize} } \def\itemizey #1#2{% \aboveenvbreak % \itemmax=\itemindent % \advance \itemmax by -\itemmargin % \advance \leftskip by \itemindent % \exdentamount=\itemindent \parindent = 0pt % \parskip = \smallskipamount % \ifdim \parskip=0pt \parskip=2pt \fi% \def#2{\endgraf\afterenvbreak\endgroup}% \def\itemcontents{#1}% \let\item=\itemizeitem} % Set sfcode to normal for the chars that usually have another value. % These are `.?!:;,' \def\frenchspacing{\sfcode46=1000 \sfcode63=1000 \sfcode33=1000 \sfcode58=1000 \sfcode59=1000 \sfcode44=1000 } % \splitoff TOKENS\endmark defines \first to be the first token in % TOKENS, and \rest to be the remainder. % \def\splitoff#1#2\endmark{\def\first{#1}\def\rest{#2}}% % Allow an optional argument of an uppercase letter, lowercase letter, % or number, to specify the first label in the enumerated list. No % argument is the same as `1'. % \def\enumerate{\parsearg\enumeratezzz} \def\enumeratezzz #1{\enumeratey #1 \endenumeratey} \def\enumeratey #1 #2\endenumeratey{% \begingroup % ended by the @end enumerate % % If we were given no argument, pretend we were given `1'. \def\thearg{#1}% \ifx\thearg\empty \def\thearg{1}\fi % % Detect if the argument is a single token. If so, it might be a % letter. Otherwise, the only valid thing it can be is a number. % (We will always have one token, because of the test we just made. % This is a good thing, since \splitoff doesn't work given nothing at % all -- the first parameter is undelimited.) \expandafter\splitoff\thearg\endmark \ifx\rest\empty % Only one token in the argument. It could still be anything. % A ``lowercase letter'' is one whose \lccode is nonzero. % An ``uppercase letter'' is one whose \lccode is both nonzero, and % not equal to itself. % Otherwise, we assume it's a number. % % We need the \relax at the end of the \ifnum lines to stop TeX from % continuing to look for a . % \ifnum\lccode\expandafter`\thearg=0\relax \numericenumerate % a number (we hope) \else % It's a letter. \ifnum\lccode\expandafter`\thearg=\expandafter`\thearg\relax \lowercaseenumerate % lowercase letter \else \uppercaseenumerate % uppercase letter \fi \fi \else % Multiple tokens in the argument. We hope it's a number. \numericenumerate \fi } % An @enumerate whose labels are integers. The starting integer is % given in \thearg. % \def\numericenumerate{% \itemno = \thearg \startenumeration{\the\itemno}% } % The starting (lowercase) letter is in \thearg. \def\lowercaseenumerate{% \itemno = \expandafter`\thearg \startenumeration{% % Be sure we're not beyond the end of the alphabet. \ifnum\itemno=0 \errmessage{No more lowercase letters in @enumerate; get a bigger alphabet}% \fi \char\lccode\itemno }% } % The starting (uppercase) letter is in \thearg. \def\uppercaseenumerate{% \itemno = \expandafter`\thearg \startenumeration{% % Be sure we're not beyond the end of the alphabet. \ifnum\itemno=0 \errmessage{No more uppercase letters in @enumerate; get a bigger alphabet} \fi \char\uccode\itemno }% } % Call itemizey, adding a period to the first argument and supplying the % common last two arguments. Also subtract one from the initial value in % \itemno, since @item increments \itemno. % \def\startenumeration#1{% \advance\itemno by -1 \itemizey{#1.}\Eenumerate\flushcr } % @alphaenumerate and @capsenumerate are abbreviations for giving an arg % to @enumerate. % \def\alphaenumerate{\enumerate{a}} \def\capsenumerate{\enumerate{A}} \def\Ealphaenumerate{\Eenumerate} \def\Ecapsenumerate{\Eenumerate} % Definition of @item while inside @itemize. \def\itemizeitem{% \advance\itemno by 1 {\let\par=\endgraf \smallbreak}% \ifhmode \errmessage{In hmode at itemizeitem}\fi {\parskip=0in \hskip 0pt \hbox to 0pt{\hss \itemcontents\hskip \itemmargin}% \vadjust{\penalty 1200}}% \flushcr} % @multitable macros % Amy Hendrickson, 8/18/94, 3/6/96 % % @multitable ... @end multitable will make as many columns as desired. % Contents of each column will wrap at width given in preamble. Width % can be specified either with sample text given in a template line, % or in percent of \hsize, the current width of text on page. % Table can continue over pages but will only break between lines. % To make preamble: % % Either define widths of columns in terms of percent of \hsize: % @multitable @columnfractions .25 .3 .45 % @item ... % % Numbers following @columnfractions are the percent of the total % current hsize to be used for each column. You may use as many % columns as desired. % Or use a template: % @multitable {Column 1 template} {Column 2 template} {Column 3 template} % @item ... % using the widest term desired in each column. % % For those who want to use more than one line's worth of words in % the preamble, break the line within one argument and it % will parse correctly, i.e., % % @multitable {Column 1 template} {Column 2 template} {Column 3 % template} % Not: % @multitable {Column 1 template} {Column 2 template} % {Column 3 template} % Each new table line starts with @item, each subsequent new column % starts with @tab. Empty columns may be produced by supplying @tab's % with nothing between them for as many times as empty columns are needed, % ie, @tab@tab@tab will produce two empty columns. % @item, @tab, @multitable or @end multitable do not need to be on their % own lines, but it will not hurt if they are. % Sample multitable: % @multitable {Column 1 template} {Column 2 template} {Column 3 template} % @item first col stuff @tab second col stuff @tab third col % @item % first col stuff % @tab % second col stuff % @tab % third col % @item first col stuff @tab second col stuff % @tab Many paragraphs of text may be used in any column. % % They will wrap at the width determined by the template. % @item@tab@tab This will be in third column. % @end multitable % Default dimensions may be reset by user. % @multitableparskip is vertical space between paragraphs in table. % @multitableparindent is paragraph indent in table. % @multitablecolmargin is horizontal space to be left between columns. % @multitablelinespace is space to leave between table items, baseline % to baseline. % 0pt means it depends on current normal line spacing. %%%% % Dimensions \newskip\multitableparskip \newskip\multitableparindent \newdimen\multitablecolspace \newskip\multitablelinespace \multitableparskip=0pt \multitableparindent=6pt \multitablecolspace=12pt \multitablelinespace=0pt %%%% % Macros used to set up halign preamble: \let\endsetuptable\relax \def\xendsetuptable{\endsetuptable} \let\columnfractions\relax \def\xcolumnfractions{\columnfractions} \newif\ifsetpercent %% 2/1/96, to allow fractions to be given with more than one digit. \def\pickupwholefraction#1 {\global\advance\colcount by1 % \expandafter\xdef\csname col\the\colcount\endcsname{.#1\hsize}% \setuptable} \newcount\colcount \def\setuptable#1{\def\firstarg{#1}% \ifx\firstarg\xendsetuptable\let\go\relax% \else \ifx\firstarg\xcolumnfractions\global\setpercenttrue% \else \ifsetpercent \let\go\pickupwholefraction % In this case arg of setuptable % is the decimal point before the % number given in percent of hsize. % We don't need this so we don't use it. \else \global\advance\colcount by1 \setbox0=\hbox{#1 }% Add a normal word space as a separator; % typically that is always in the input, anyway. \expandafter\xdef\csname col\the\colcount\endcsname{\the\wd0}% \fi% \fi% \ifx\go\pickupwholefraction\else\let\go\setuptable\fi% \fi\go} %%%% % multitable syntax \def\tab{&\hskip1sp\relax} % 2/2/96 % tiny skip here makes sure this column space is % maintained, even if it is never used. %%%% % @multitable ... @end multitable definitions: \def\multitable{\parsearg\dotable} \def\dotable#1{\bgroup \let\item\cr \tolerance=9500 \hbadness=9500 \setmultitablespacing \parskip=\multitableparskip \parindent=\multitableparindent \overfullrule=0pt \global\colcount=0\relax% \def\Emultitable{\global\setpercentfalse\global\everycr{}\cr\egroup\egroup}% % To parse everything between @multitable and @item : \setuptable#1 \endsetuptable % Need to reset this to 0 after \setuptable. \global\colcount=0\relax% % % This preamble sets up a generic column definition, which will % be used as many times as user calls for columns. % \vtop will set a single line and will also let text wrap and % continue for many paragraphs if desired. \halign\bgroup&\global\advance\colcount by 1\relax% \multistrut\vtop{\hsize=\expandafter\csname col\the\colcount\endcsname % In order to keep entries from bumping into each other % we will add a \leftskip of \multitablecolspace to all columns after % the first one. % If a template has been used, we will add \multitablecolspace % to the width of each template entry. % If user has set preamble in terms of percent of \hsize % we will use that dimension as the width of the column, and % the \leftskip will keep entries from bumping into each other. % Table will start at left margin and final column will justify at % right margin. \ifnum\colcount=1 \else \ifsetpercent \else % If user has set preamble in terms of percent of \hsize % we will advance \hsize by \multitablecolspace \advance\hsize by \multitablecolspace \fi % In either case we will make \leftskip=\multitablecolspace: \leftskip=\multitablecolspace \fi % Ignoring space at the beginning and end avoids an occasional spurious % blank line, when TeX decides to break the line at the space before the % box from the multistrut, so the strut ends up on a line by itself. % For example: % @multitable @columnfractions .11 .89 % @item @code{#} % @tab Legal holiday which is valid in major parts of the whole country. % Is automatically provided with highlighting sequences respectively marking % characters. \noindent\ignorespaces##\unskip\multistrut}\cr % \everycr will reset column counter, \colcount, at the end of % each line. Every column entry will cause \colcount to advance by one. % The table preamble % looks at the current \colcount to find the correct column width. \global\everycr{\noalign{% % \filbreak%% keeps underfull box messages off when table breaks over pages. % Maybe so, but it also creates really weird page breaks when the table % breaks over pages Wouldn't \vfil be better? Wait until the problem % manifests itself, so it can be fixed for real --karl. \global\colcount=0\relax}} } \def\setmultitablespacing{% test to see if user has set \multitablelinespace. % If so, do nothing. If not, give it an appropriate dimension based on % current baselineskip. \ifdim\multitablelinespace=0pt %% strut to put in table in case some entry doesn't have descenders, %% to keep lines equally spaced \let\multistrut = \strut %% Test to see if parskip is larger than space between lines of %% table. If not, do nothing. %% If so, set to same dimension as multitablelinespace. \else \gdef\multistrut{\vrule height\multitablelinespace depth\dp0 width0pt\relax} \fi \ifdim\multitableparskip>\multitablelinespace \global\multitableparskip=\multitablelinespace \global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller %% than skip between lines in the table. \fi% \ifdim\multitableparskip=0pt \global\multitableparskip=\multitablelinespace \global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller %% than skip between lines in the table. \fi} \message{indexing,} % Index generation facilities % Define \newwrite to be identical to plain tex's \newwrite % except not \outer, so it can be used within \newindex. {\catcode`\@=11 \gdef\newwrite{\alloc@7\write\chardef\sixt@@n}} % \newindex {foo} defines an index named foo. % It automatically defines \fooindex such that % \fooindex ...rest of line... puts an entry in the index foo. % It also defines \fooindfile to be the number of the output channel for % the file that accumulates this index. The file's extension is foo. % The name of an index should be no more than 2 characters long % for the sake of vms. \def\newindex #1{ \expandafter\newwrite \csname#1indfile\endcsname% Define number for output file \openout \csname#1indfile\endcsname \jobname.#1 % Open the file \expandafter\xdef\csname#1index\endcsname{% % Define \xxxindex \noexpand\doindex {#1}} } % @defindex foo == \newindex{foo} \def\defindex{\parsearg\newindex} % Define @defcodeindex, like @defindex except put all entries in @code. \def\newcodeindex #1{ \expandafter\newwrite \csname#1indfile\endcsname% Define number for output file \openout \csname#1indfile\endcsname \jobname.#1 % Open the file \expandafter\xdef\csname#1index\endcsname{% % Define \xxxindex \noexpand\docodeindex {#1}} } \def\defcodeindex{\parsearg\newcodeindex} % @synindex foo bar makes index foo feed into index bar. % Do this instead of @defindex foo if you don't want it as a separate index. \def\synindex #1 #2 {% \expandafter\let\expandafter\synindexfoo\expandafter=\csname#2indfile\endcsname \expandafter\let\csname#1indfile\endcsname=\synindexfoo \expandafter\xdef\csname#1index\endcsname{% % Define \xxxindex \noexpand\doindex {#2}}% } % @syncodeindex foo bar similar, but put all entries made for index foo % inside @code. \def\syncodeindex #1 #2 {% \expandafter\let\expandafter\synindexfoo\expandafter=\csname#2indfile\endcsname \expandafter\let\csname#1indfile\endcsname=\synindexfoo \expandafter\xdef\csname#1index\endcsname{% % Define \xxxindex \noexpand\docodeindex {#2}}% } % Define \doindex, the driver for all \fooindex macros. % Argument #1 is generated by the calling \fooindex macro, % and it is "foo", the name of the index. % \doindex just uses \parsearg; it calls \doind for the actual work. % This is because \doind is more useful to call from other macros. % There is also \dosubind {index}{topic}{subtopic} % which makes an entry in a two-level index such as the operation index. \def\doindex#1{\edef\indexname{#1}\parsearg\singleindexer} \def\singleindexer #1{\doind{\indexname}{#1}} % like the previous two, but they put @code around the argument. \def\docodeindex#1{\edef\indexname{#1}\parsearg\singlecodeindexer} \def\singlecodeindexer #1{\doind{\indexname}{\code{#1}}} \def\indexdummies{% % Take care of the plain tex accent commands. \def\"{\realbackslash "}% \def\`{\realbackslash `}% \def\'{\realbackslash '}% \def\^{\realbackslash ^}% \def\~{\realbackslash ~}% \def\={\realbackslash =}% \def\b{\realbackslash b}% \def\c{\realbackslash c}% \def\d{\realbackslash d}% \def\u{\realbackslash u}% \def\v{\realbackslash v}% \def\H{\realbackslash H}% % Take care of the plain tex special European modified letters. \def\oe{\realbackslash oe}% \def\ae{\realbackslash ae}% \def\aa{\realbackslash aa}% \def\OE{\realbackslash OE}% \def\AE{\realbackslash AE}% \def\AA{\realbackslash AA}% \def\o{\realbackslash o}% \def\O{\realbackslash O}% \def\l{\realbackslash l}% \def\L{\realbackslash L}% \def\ss{\realbackslash ss}% % Take care of texinfo commands likely to appear in an index entry. % (Must be a way to avoid doing expansion at all, and thus not have to % laboriously list every single command here.) \def\@{@}% will be @@ when we switch to @ as escape char. %\let\{ = \lbracecmd %\let\} = \rbracecmd \def\_{{\realbackslash _}}% \def\w{\realbackslash w }% \def\bf{\realbackslash bf }% %\def\rm{\realbackslash rm }% \def\sl{\realbackslash sl }% \def\sf{\realbackslash sf}% \def\tt{\realbackslash tt}% \def\gtr{\realbackslash gtr}% \def\less{\realbackslash less}% \def\hat{\realbackslash hat}% %\def\char{\realbackslash char}% \def\TeX{\realbackslash TeX}% \def\dots{\realbackslash dots }% \def\copyright{\realbackslash copyright }% \def\tclose##1{\realbackslash tclose {##1}}% \def\code##1{\realbackslash code {##1}}% \def\dotless##1{\realbackslash dotless {##1}}% \def\samp##1{\realbackslash samp {##1}}% \def\,##1{\realbackslash ,{##1}}% \def\t##1{\realbackslash t {##1}}% \def\r##1{\realbackslash r {##1}}% \def\i##1{\realbackslash i {##1}}% \def\b##1{\realbackslash b {##1}}% \def\sc##1{\realbackslash sc {##1}}% \def\cite##1{\realbackslash cite {##1}}% \def\key##1{\realbackslash key {##1}}% \def\file##1{\realbackslash file {##1}}% \def\var##1{\realbackslash var {##1}}% \def\kbd##1{\realbackslash kbd {##1}}% \def\dfn##1{\realbackslash dfn {##1}}% \def\emph##1{\realbackslash emph {##1}}% \unsepspaces } % If an index command is used in an @example environment, any spaces % therein should become regular spaces in the raw index file, not the % expansion of \tie (\\leavevmode \penalty \@M \ ). {\obeyspaces \gdef\unsepspaces{\obeyspaces\let =\space}} % \indexnofonts no-ops all font-change commands. % This is used when outputting the strings to sort the index by. \def\indexdummyfont#1{#1} \def\indexdummytex{TeX} \def\indexdummydots{...} \def\indexnofonts{% % Just ignore accents. \let\,=\indexdummyfont \let\"=\indexdummyfont \let\`=\indexdummyfont \let\'=\indexdummyfont \let\^=\indexdummyfont \let\~=\indexdummyfont \let\==\indexdummyfont \let\b=\indexdummyfont \let\c=\indexdummyfont \let\d=\indexdummyfont \let\u=\indexdummyfont \let\v=\indexdummyfont \let\H=\indexdummyfont \let\dotless=\indexdummyfont % Take care of the plain tex special European modified letters. \def\oe{oe}% \def\ae{ae}% \def\aa{aa}% \def\OE{OE}% \def\AE{AE}% \def\AA{AA}% \def\o{o}% \def\O{O}% \def\l{l}% \def\L{L}% \def\ss{ss}% \let\w=\indexdummyfont \let\t=\indexdummyfont \let\r=\indexdummyfont \let\i=\indexdummyfont \let\b=\indexdummyfont \let\emph=\indexdummyfont \let\strong=\indexdummyfont \let\cite=\indexdummyfont \let\sc=\indexdummyfont %Don't no-op \tt, since it isn't a user-level command % and is used in the definitions of the active chars like <, >, |... %\let\tt=\indexdummyfont \let\tclose=\indexdummyfont \let\code=\indexdummyfont \let\file=\indexdummyfont \let\samp=\indexdummyfont \let\kbd=\indexdummyfont \let\key=\indexdummyfont \let\var=\indexdummyfont \let\TeX=\indexdummytex \let\dots=\indexdummydots \def\@{@}% } % To define \realbackslash, we must make \ not be an escape. % We must first make another character (@) an escape % so we do not become unable to do a definition. {\catcode`\@=0 \catcode`\\=\other @gdef@realbackslash{\}} \let\indexbackslash=0 %overridden during \printindex. \let\SETmarginindex=\relax %initialize! % workhorse for all \fooindexes % #1 is name of index, #2 is stuff to put there \def\doind #1#2{% % Put the index entry in the margin if desired. \ifx\SETmarginindex\relax\else \insert\margin{\hbox{\vrule height8pt depth3pt width0pt #2}}% \fi {% \count255=\lastpenalty {% \indexdummies % Must do this here, since \bf, etc expand at this stage \escapechar=`\\ {% \let\folio=0% We will expand all macros now EXCEPT \folio. \def\rawbackslashxx{\indexbackslash}% \indexbackslash isn't defined now % so it will be output as is; and it will print as backslash. % % First process the index-string with all font commands turned off % to get the string to sort by. {\indexnofonts \xdef\indexsorttmp{#2}}% % % Now produce the complete index entry, with both the sort key and the % original text, including any font commands. \toks0 = {#2}% \edef\temp{% \write\csname#1indfile\endcsname{% \realbackslash entry{\indexsorttmp}{\folio}{\the\toks0}}% }% \temp }% }% \penalty\count255 }% } \def\dosubind #1#2#3{% {\count10=\lastpenalty % {\indexdummies % Must do this here, since \bf, etc expand at this stage \escapechar=`\\% {\let\folio=0% \def\rawbackslashxx{\indexbackslash}% % % Now process the index-string once, with all font commands turned off, % to get the string to sort the index by. {\indexnofonts \xdef\temp1{#2 #3}% }% % Now produce the complete index entry. We process the index-string again, % this time with font commands expanded, to get what to print in the index. \edef\temp{% \write \csname#1indfile\endcsname{% \realbackslash entry {\temp1}{\folio}{#2}{#3}}}% \temp }% }\penalty\count10}} % The index entry written in the file actually looks like % \entry {sortstring}{page}{topic} % or % \entry {sortstring}{page}{topic}{subtopic} % The texindex program reads in these files and writes files % containing these kinds of lines: % \initial {c} % before the first topic whose initial is c % \entry {topic}{pagelist} % for a topic that is used without subtopics % \primary {topic} % for the beginning of a topic that is used with subtopics % \secondary {subtopic}{pagelist} % for each subtopic. % Define the user-accessible indexing commands % @findex, @vindex, @kindex, @cindex. \def\findex {\fnindex} \def\kindex {\kyindex} \def\cindex {\cpindex} \def\vindex {\vrindex} \def\tindex {\tpindex} \def\pindex {\pgindex} \def\cindexsub {\begingroup\obeylines\cindexsub} {\obeylines % \gdef\cindexsub "#1" #2^^M{\endgroup % \dosubind{cp}{#2}{#1}}} % Define the macros used in formatting output of the sorted index material. % @printindex causes a particular index (the ??s file) to get printed. % It does not print any chapter heading (usually an @unnumbered). % \def\printindex{\parsearg\doprintindex} \def\doprintindex#1{\begingroup \dobreak \chapheadingskip{10000}% % \indexfonts \rm \tolerance = 9500 \indexbreaks % % See if the index file exists and is nonempty. \openin 1 \jobname.#1s \ifeof 1 % \enddoublecolumns gets confused if there is no text in the index, % and it loses the chapter title and the aux file entries for the % index. The easiest way to prevent this problem is to make sure % there is some text. (Index is nonexistent) \else % % If the index file exists but is empty, then \openin leaves \ifeof % false. We have to make TeX try to read something from the file, so % it can discover if there is anything in it. \read 1 to \temp \ifeof 1 (Index is empty) \else % Index files are almost Texinfo source, but we use \ as the escape % character. It would be better to use @, but that's too big a change % to make right now. \def\indexbackslash{\rawbackslashxx}% \catcode`\\ = 0 \catcode`\@ = 11 \escapechar = `\\ \begindoublecolumns \input \jobname.#1s \enddoublecolumns \fi \fi \closein 1 \endgroup} % These macros are used by the sorted index file itself. % Change them to control the appearance of the index. % Same as \bigskipamount except no shrink. % \balancecolumns gets confused if there is any shrink. \newskip\initialskipamount \initialskipamount 12pt plus4pt \def\initial #1{% {\let\tentt=\sectt \let\tt=\sectt \let\sf=\sectt \ifdim\lastskip<\initialskipamount \removelastskip \penalty-200 \vskip \initialskipamount\fi \line{\secbf#1\hfill}\kern 2pt\penalty10000}} % This typesets a paragraph consisting of #1, dot leaders, and then #2 % flush to the right margin. It is used for index and table of contents % entries. The paragraph is indented by \leftskip. % \def\entry #1#2{\begingroup % % Start a new paragraph if necessary, so our assignments below can't % affect previous text. \par % % Do not fill out the last line with white space. \parfillskip = 0in % % No extra space above this paragraph. \parskip = 0in % % Do not prefer a separate line ending with a hyphen to fewer lines. \finalhyphendemerits = 0 % % \hangindent is only relevant when the entry text and page number % don't both fit on one line. In that case, bob suggests starting the % dots pretty far over on the line. Unfortunately, a large % indentation looks wrong when the entry text itself is broken across % lines. So we use a small indentation and put up with long leaders. % % \hangafter is reset to 1 (which is the value we want) at the start % of each paragraph, so we need not do anything with that. \hangindent=2em % % When the entry text needs to be broken, just fill out the first line % with blank space. \rightskip = 0pt plus1fil % % Start a ``paragraph'' for the index entry so the line breaking % parameters we've set above will have an effect. \noindent % % Insert the text of the index entry. TeX will do line-breaking on it. #1% % The following is kludged to not output a line of dots in the index if % there are no page numbers. The next person who breaks this will be % cursed by a Unix daemon. \def\tempa{{\rm }}% \def\tempb{#2}% \edef\tempc{\tempa}% \edef\tempd{\tempb}% \ifx\tempc\tempd\ \else% % % If we must, put the page number on a line of its own, and fill out % this line with blank space. (The \hfil is overwhelmed with the % fill leaders glue in \indexdotfill if the page number does fit.) \hfil\penalty50 \null\nobreak\indexdotfill % Have leaders before the page number. % % The `\ ' here is removed by the implicit \unskip that TeX does as % part of (the primitive) \par. Without it, a spurious underfull % \hbox ensues. \ #2% The page number ends the paragraph. \fi% \par \endgroup} % Like \dotfill except takes at least 1 em. \def\indexdotfill{\cleaders \hbox{$\mathsurround=0pt \mkern1.5mu ${\it .}$ \mkern1.5mu$}\hskip 1em plus 1fill} \def\primary #1{\line{#1\hfil}} \newskip\secondaryindent \secondaryindent=0.5cm \def\secondary #1#2{ {\parfillskip=0in \parskip=0in \hangindent =1in \hangafter=1 \noindent\hskip\secondaryindent\hbox{#1}\indexdotfill #2\par }} % Define two-column mode, which we use to typeset indexes. % Adapted from the TeXbook, page 416, which is to say, % the manmac.tex format used to print the TeXbook itself. \catcode`\@=11 \newbox\partialpage \newdimen\doublecolumnhsize \def\begindoublecolumns{\begingroup % ended by \enddoublecolumns % Grab any single-column material above us. \output = {\global\setbox\partialpage = \vbox{% % % Here is a possibility not foreseen in manmac: if we accumulate a % whole lot of material, we might end up calling this \output % routine twice in a row (see the doublecol-lose test, which is % essentially a couple of indexes with @setchapternewpage off). In % that case, we must prevent the second \partialpage from % simply overwriting the first, causing us to lose the page. % This will preserve it until a real output routine can ship it % out. Generally, \partialpage will be empty when this runs and % this will be a no-op. \unvbox\partialpage % % Unvbox the main output page. \unvbox255 \kern-\topskip \kern\baselineskip }}% \eject % % Use the double-column output routine for subsequent pages. \output = {\doublecolumnout}% % % Change the page size parameters. We could do this once outside this % routine, in each of @smallbook, @afourpaper, and the default 8.5x11 % format, but then we repeat the same computation. Repeating a couple % of assignments once per index is clearly meaningless for the % execution time, so we may as well do it in one place. % % First we halve the line length, less a little for the gutter between % the columns. We compute the gutter based on the line length, so it % changes automatically with the paper format. The magic constant % below is chosen so that the gutter has the same value (well, +-<1pt) % as it did when we hard-coded it. % % We put the result in a separate register, \doublecolumhsize, so we % can restore it in \pagesofar, after \hsize itself has (potentially) % been clobbered. % \doublecolumnhsize = \hsize \advance\doublecolumnhsize by -.04154\hsize \divide\doublecolumnhsize by 2 \hsize = \doublecolumnhsize % % Double the \vsize as well. (We don't need a separate register here, % since nobody clobbers \vsize.) \vsize = 2\vsize } \def\doublecolumnout{% \splittopskip=\topskip \splitmaxdepth=\maxdepth % Get the available space for the double columns -- the normal % (undoubled) page height minus any material left over from the % previous page. \dimen@=\pageheight \advance\dimen@ by-\ht\partialpage % box0 will be the left-hand column, box2 the right. \setbox0=\vsplit255 to\dimen@ \setbox2=\vsplit255 to\dimen@ \onepageout\pagesofar \unvbox255 \penalty\outputpenalty } \def\pagesofar{% % Re-output the contents of the output page -- any previous material, % followed by the two boxes we just split. \unvbox\partialpage \hsize = \doublecolumnhsize \wd0=\hsize \wd2=\hsize \hbox to\pagewidth{\box0\hfil\box2}% } \def\enddoublecolumns{% \output = {\balancecolumns}\eject % split what we have \endgroup % started in \begindoublecolumns % % Back to normal single-column typesetting, but take account of the % fact that we just accumulated some stuff on the output page. \pagegoal = \vsize } \def\balancecolumns{% % Called at the end of the double column material. \setbox0 = \vbox{\unvbox255}% \dimen@ = \ht0 \advance\dimen@ by \topskip \advance\dimen@ by-\baselineskip \divide\dimen@ by 2 \splittopskip = \topskip % Loop until we get a decent breakpoint. {\vbadness=10000 \loop \global\setbox3=\copy0 \global\setbox1=\vsplit3 to\dimen@ \ifdim\ht3>\dimen@ \global\advance\dimen@ by1pt \repeat}% \setbox0=\vbox to\dimen@{\unvbox1}% \setbox2=\vbox to\dimen@{\unvbox3}% \pagesofar } \catcode`\@ = \other \message{sectioning,} % Define chapters, sections, etc. \newcount\chapno \newcount\secno \secno=0 \newcount\subsecno \subsecno=0 \newcount\subsubsecno \subsubsecno=0 % This counter is funny since it counts through charcodes of letters A, B, ... \newcount\appendixno \appendixno = `\@ \def\appendixletter{\char\the\appendixno} \newwrite\contentsfile % This is called from \setfilename. \def\opencontents{\openout\contentsfile = \jobname.toc } % Each @chapter defines this as the name of the chapter. % page headings and footings can use it. @section does likewise \def\thischapter{} \def\thissection{} \def\seccheck#1{\ifnum \pageno<0 \errmessage{@#1 not allowed after generating table of contents}% \fi} \def\chapternofonts{% \let\rawbackslash=\relax \let\frenchspacing=\relax \def\result{\realbackslash result}% \def\equiv{\realbackslash equiv}% \def\expansion{\realbackslash expansion}% \def\print{\realbackslash print}% \def\TeX{\realbackslash TeX}% \def\dots{\realbackslash dots}% \def\copyright{\realbackslash copyright}% \def\tt{\realbackslash tt}% \def\bf{\realbackslash bf}% \def\w{\realbackslash w}% \def\less{\realbackslash less}% \def\gtr{\realbackslash gtr}% \def\hat{\realbackslash hat}% \def\char{\realbackslash char}% \def\tclose##1{\realbackslash tclose{##1}}% \def\code##1{\realbackslash code{##1}}% \def\samp##1{\realbackslash samp{##1}}% \def\r##1{\realbackslash r{##1}}% \def\b##1{\realbackslash b{##1}}% \def\key##1{\realbackslash key{##1}}% \def\file##1{\realbackslash file{##1}}% \def\kbd##1{\realbackslash kbd{##1}}% % These are redefined because @smartitalic wouldn't work inside xdef. \def\i##1{\realbackslash i{##1}}% \def\cite##1{\realbackslash cite{##1}}% \def\var##1{\realbackslash var{##1}}% \def\emph##1{\realbackslash emph{##1}}% \def\dfn##1{\realbackslash dfn{##1}}% } \newcount\absseclevel % used to calculate proper heading level \newcount\secbase\secbase=0 % @raise/lowersections modify this count % @raisesections: treat @section as chapter, @subsection as section, etc. \def\raisesections{\global\advance\secbase by -1} \let\up=\raisesections % original BFox name % @lowersections: treat @chapter as section, @section as subsection, etc. \def\lowersections{\global\advance\secbase by 1} \let\down=\lowersections % original BFox name % Choose a numbered-heading macro % #1 is heading level if unmodified by @raisesections or @lowersections % #2 is text for heading \def\numhead#1#2{\absseclevel=\secbase\advance\absseclevel by #1 \ifcase\absseclevel \chapterzzz{#2} \or \seczzz{#2} \or \numberedsubseczzz{#2} \or \numberedsubsubseczzz{#2} \else \ifnum \absseclevel<0 \chapterzzz{#2} \else \numberedsubsubseczzz{#2} \fi \fi } % like \numhead, but chooses appendix heading levels \def\apphead#1#2{\absseclevel=\secbase\advance\absseclevel by #1 \ifcase\absseclevel \appendixzzz{#2} \or \appendixsectionzzz{#2} \or \appendixsubseczzz{#2} \or \appendixsubsubseczzz{#2} \else \ifnum \absseclevel<0 \appendixzzz{#2} \else \appendixsubsubseczzz{#2} \fi \fi } % like \numhead, but chooses numberless heading levels \def\unnmhead#1#2{\absseclevel=\secbase\advance\absseclevel by #1 \ifcase\absseclevel \unnumberedzzz{#2} \or \unnumberedseczzz{#2} \or \unnumberedsubseczzz{#2} \or \unnumberedsubsubseczzz{#2} \else \ifnum \absseclevel<0 \unnumberedzzz{#2} \else \unnumberedsubsubseczzz{#2} \fi \fi } \def\thischaptername{No Chapter Title} \outer\def\chapter{\parsearg\chapteryyy} \def\chapteryyy #1{\numhead0{#1}} % normally numhead0 calls chapterzzz \def\chapterzzz #1{\seccheck{chapter}% \secno=0 \subsecno=0 \subsubsecno=0 \global\advance \chapno by 1 \message{\putwordChapter \the\chapno}% \chapmacro {#1}{\the\chapno}% \gdef\thissection{#1}% \gdef\thischaptername{#1}% % We don't substitute the actual chapter name into \thischapter % because we don't want its macros evaluated now. \xdef\thischapter{\putwordChapter{} \the\chapno: \noexpand\thischaptername}% {\chapternofonts% \toks0 = {#1}% \edef\temp{{\realbackslash chapentry{\the\toks0}{\the\chapno}{\noexpand\folio}}}% \escapechar=`\\% \write \contentsfile \temp % \donoderef % \global\let\section = \numberedsec \global\let\subsection = \numberedsubsec \global\let\subsubsection = \numberedsubsubsec }} \outer\def\appendix{\parsearg\appendixyyy} \def\appendixyyy #1{\apphead0{#1}} % normally apphead0 calls appendixzzz \def\appendixzzz #1{\seccheck{appendix}% \secno=0 \subsecno=0 \subsubsecno=0 \global\advance \appendixno by 1 \message{Appendix \appendixletter}% \chapmacro {#1}{\putwordAppendix{} \appendixletter}% \gdef\thissection{#1}% \gdef\thischaptername{#1}% \xdef\thischapter{\putwordAppendix{} \appendixletter: \noexpand\thischaptername}% {\chapternofonts% \toks0 = {#1}% \edef\temp{{\realbackslash chapentry{\the\toks0}% {\putwordAppendix{} \appendixletter}{\noexpand\folio}}}% \escapechar=`\\% \write \contentsfile \temp % \appendixnoderef % \global\let\section = \appendixsec \global\let\subsection = \appendixsubsec \global\let\subsubsection = \appendixsubsubsec }} % @centerchap is like @unnumbered, but the heading is centered. \outer\def\centerchap{\parsearg\centerchapyyy} \def\centerchapyyy #1{{\let\unnumbchapmacro=\centerchapmacro \unnumberedyyy{#1}}} \outer\def\top{\parsearg\unnumberedyyy} \outer\def\unnumbered{\parsearg\unnumberedyyy} \def\unnumberedyyy #1{\unnmhead0{#1}} % normally unnmhead0 calls unnumberedzzz \def\unnumberedzzz #1{\seccheck{unnumbered}% \secno=0 \subsecno=0 \subsubsecno=0 % % This used to be simply \message{#1}, but TeX fully expands the % argument to \message. Therefore, if #1 contained @-commands, TeX % expanded them. For example, in `@unnumbered The @cite{Book}', TeX % expanded @cite (which turns out to cause errors because \cite is meant % to be executed, not expanded). % % Anyway, we don't want the fully-expanded definition of @cite to appear % as a result of the \message, we just want `@cite' itself. We use % \the to achieve this: TeX expands \the only once, % simply yielding the contents of the . \toks0 = {#1}\message{(\the\toks0)}% % \unnumbchapmacro {#1}% \gdef\thischapter{#1}\gdef\thissection{#1}% {\chapternofonts% \toks0 = {#1}% \edef\temp{{\realbackslash unnumbchapentry{\the\toks0}{\noexpand\folio}}}% \escapechar=`\\% \write \contentsfile \temp % \unnumbnoderef % \global\let\section = \unnumberedsec \global\let\subsection = \unnumberedsubsec \global\let\subsubsection = \unnumberedsubsubsec }} \outer\def\numberedsec{\parsearg\secyyy} \def\secyyy #1{\numhead1{#1}} % normally calls seczzz \def\seczzz #1{\seccheck{section}% \subsecno=0 \subsubsecno=0 \global\advance \secno by 1 % \gdef\thissection{#1}\secheading {#1}{\the\chapno}{\the\secno}% {\chapternofonts% \toks0 = {#1}% \edef\temp{{\realbackslash secentry % {\the\toks0}{\the\chapno}{\the\secno}{\noexpand\folio}}}% \escapechar=`\\% \write \contentsfile \temp % \donoderef % \penalty 10000 % }} \outer\def\appendixsection{\parsearg\appendixsecyyy} \outer\def\appendixsec{\parsearg\appendixsecyyy} \def\appendixsecyyy #1{\apphead1{#1}} % normally calls appendixsectionzzz \def\appendixsectionzzz #1{\seccheck{appendixsection}% \subsecno=0 \subsubsecno=0 \global\advance \secno by 1 % \gdef\thissection{#1}\secheading {#1}{\appendixletter}{\the\secno}% {\chapternofonts% \toks0 = {#1}% \edef\temp{{\realbackslash secentry % {\the\toks0}{\appendixletter}{\the\secno}{\noexpand\folio}}}% \escapechar=`\\% \write \contentsfile \temp % \appendixnoderef % \penalty 10000 % }} \outer\def\unnumberedsec{\parsearg\unnumberedsecyyy} \def\unnumberedsecyyy #1{\unnmhead1{#1}} % normally calls unnumberedseczzz \def\unnumberedseczzz #1{\seccheck{unnumberedsec}% \plainsecheading {#1}\gdef\thissection{#1}% {\chapternofonts% \toks0 = {#1}% \edef\temp{{\realbackslash unnumbsecentry{\the\toks0}{\noexpand\folio}}}% \escapechar=`\\% \write \contentsfile \temp % \unnumbnoderef % \penalty 10000 % }} \outer\def\numberedsubsec{\parsearg\numberedsubsecyyy} \def\numberedsubsecyyy #1{\numhead2{#1}} % normally calls numberedsubseczzz \def\numberedsubseczzz #1{\seccheck{subsection}% \gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 % \subsecheading {#1}{\the\chapno}{\the\secno}{\the\subsecno}% {\chapternofonts% \toks0 = {#1}% \edef\temp{{\realbackslash subsecentry % {\the\toks0}{\the\chapno}{\the\secno}{\the\subsecno}{\noexpand\folio}}}% \escapechar=`\\% \write \contentsfile \temp % \donoderef % \penalty 10000 % }} \outer\def\appendixsubsec{\parsearg\appendixsubsecyyy} \def\appendixsubsecyyy #1{\apphead2{#1}} % normally calls appendixsubseczzz \def\appendixsubseczzz #1{\seccheck{appendixsubsec}% \gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 % \subsecheading {#1}{\appendixletter}{\the\secno}{\the\subsecno}% {\chapternofonts% \toks0 = {#1}% \edef\temp{{\realbackslash subsecentry % {\the\toks0}{\appendixletter}{\the\secno}{\the\subsecno}{\noexpand\folio}}}% \escapechar=`\\% \write \contentsfile \temp % \appendixnoderef % \penalty 10000 % }} \outer\def\unnumberedsubsec{\parsearg\unnumberedsubsecyyy} \def\unnumberedsubsecyyy #1{\unnmhead2{#1}} %normally calls unnumberedsubseczzz \def\unnumberedsubseczzz #1{\seccheck{unnumberedsubsec}% \plainsubsecheading {#1}\gdef\thissection{#1}% {\chapternofonts% \toks0 = {#1}% \edef\temp{{\realbackslash unnumbsubsecentry{\the\toks0}{\noexpand\folio}}}% \escapechar=`\\% \write \contentsfile \temp % \unnumbnoderef % \penalty 10000 % }} \outer\def\numberedsubsubsec{\parsearg\numberedsubsubsecyyy} \def\numberedsubsubsecyyy #1{\numhead3{#1}} % normally numberedsubsubseczzz \def\numberedsubsubseczzz #1{\seccheck{subsubsection}% \gdef\thissection{#1}\global\advance \subsubsecno by 1 % \subsubsecheading {#1} {\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}% {\chapternofonts% \toks0 = {#1}% \edef\temp{{\realbackslash subsubsecentry{\the\toks0} {\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno} {\noexpand\folio}}}% \escapechar=`\\% \write \contentsfile \temp % \donoderef % \penalty 10000 % }} \outer\def\appendixsubsubsec{\parsearg\appendixsubsubsecyyy} \def\appendixsubsubsecyyy #1{\apphead3{#1}} % normally appendixsubsubseczzz \def\appendixsubsubseczzz #1{\seccheck{appendixsubsubsec}% \gdef\thissection{#1}\global\advance \subsubsecno by 1 % \subsubsecheading {#1} {\appendixletter}{\the\secno}{\the\subsecno}{\the\subsubsecno}% {\chapternofonts% \toks0 = {#1}% \edef\temp{{\realbackslash subsubsecentry{\the\toks0}% {\appendixletter} {\the\secno}{\the\subsecno}{\the\subsubsecno}{\noexpand\folio}}}% \escapechar=`\\% \write \contentsfile \temp % \appendixnoderef % \penalty 10000 % }} \outer\def\unnumberedsubsubsec{\parsearg\unnumberedsubsubsecyyy} \def\unnumberedsubsubsecyyy #1{\unnmhead3{#1}} %normally unnumberedsubsubseczzz \def\unnumberedsubsubseczzz #1{\seccheck{unnumberedsubsubsec}% \plainsubsubsecheading {#1}\gdef\thissection{#1}% {\chapternofonts% \toks0 = {#1}% \edef\temp{{\realbackslash unnumbsubsubsecentry{\the\toks0}{\noexpand\folio}}}% \escapechar=`\\% \write \contentsfile \temp % \unnumbnoderef % \penalty 10000 % }} % These are variants which are not "outer", so they can appear in @ifinfo. % Actually, they should now be obsolete; ordinary section commands should work. \def\infotop{\parsearg\unnumberedzzz} \def\infounnumbered{\parsearg\unnumberedzzz} \def\infounnumberedsec{\parsearg\unnumberedseczzz} \def\infounnumberedsubsec{\parsearg\unnumberedsubseczzz} \def\infounnumberedsubsubsec{\parsearg\unnumberedsubsubseczzz} \def\infoappendix{\parsearg\appendixzzz} \def\infoappendixsec{\parsearg\appendixseczzz} \def\infoappendixsubsec{\parsearg\appendixsubseczzz} \def\infoappendixsubsubsec{\parsearg\appendixsubsubseczzz} \def\infochapter{\parsearg\chapterzzz} \def\infosection{\parsearg\sectionzzz} \def\infosubsection{\parsearg\subsectionzzz} \def\infosubsubsection{\parsearg\subsubsectionzzz} % These macros control what the section commands do, according % to what kind of chapter we are in (ordinary, appendix, or unnumbered). % Define them by default for a numbered chapter. \global\let\section = \numberedsec \global\let\subsection = \numberedsubsec \global\let\subsubsection = \numberedsubsubsec % Define @majorheading, @heading and @subheading % NOTE on use of \vbox for chapter headings, section headings, and % such: % 1) We use \vbox rather than the earlier \line to permit % overlong headings to fold. % 2) \hyphenpenalty is set to 10000 because hyphenation in a % heading is obnoxious; this forbids it. % 3) Likewise, headings look best if no \parindent is used, and % if justification is not attempted. Hence \raggedright. \def\majorheading{\parsearg\majorheadingzzz} \def\majorheadingzzz #1{% {\advance\chapheadingskip by 10pt \chapbreak }% {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 \parindent=0pt\raggedright \rm #1\hfill}}\bigskip \par\penalty 200} \def\chapheading{\parsearg\chapheadingzzz} \def\chapheadingzzz #1{\chapbreak % {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 \parindent=0pt\raggedright \rm #1\hfill}}\bigskip \par\penalty 200} % @heading, @subheading, @subsubheading. \def\heading{\parsearg\plainsecheading} \def\subheading{\parsearg\plainsubsecheading} \def\subsubheading{\parsearg\plainsubsubsecheading} % These macros generate a chapter, section, etc. heading only % (including whitespace, linebreaking, etc. around it), % given all the information in convenient, parsed form. %%% Args are the skip and penalty (usually negative) \def\dobreak#1#2{\par\ifdim\lastskip<#1\removelastskip\penalty#2\vskip#1\fi} \def\setchapterstyle #1 {\csname CHAPF#1\endcsname} %%% Define plain chapter starts, and page on/off switching for it % Parameter controlling skip before chapter headings (if needed) \newskip\chapheadingskip \def\chapbreak{\dobreak \chapheadingskip {-4000}} \def\chappager{\par\vfill\supereject} \def\chapoddpage{\chappager \ifodd\pageno \else \hbox to 0pt{} \chappager\fi} \def\setchapternewpage #1 {\csname CHAPPAG#1\endcsname} \def\CHAPPAGoff{ \global\let\contentsalignmacro = \chappager \global\let\pchapsepmacro=\chapbreak \global\let\pagealignmacro=\chappager} \def\CHAPPAGon{ \global\let\contentsalignmacro = \chappager \global\let\pchapsepmacro=\chappager \global\let\pagealignmacro=\chappager \global\def\HEADINGSon{\HEADINGSsingle}} \def\CHAPPAGodd{ \global\let\contentsalignmacro = \chapoddpage \global\let\pchapsepmacro=\chapoddpage \global\let\pagealignmacro=\chapoddpage \global\def\HEADINGSon{\HEADINGSdouble}} \CHAPPAGon \def\CHAPFplain{ \global\let\chapmacro=\chfplain \global\let\unnumbchapmacro=\unnchfplain \global\let\centerchapmacro=\centerchfplain} % Plain chapter opening. % #1 is the text, #2 the chapter number or empty if unnumbered. \def\chfplain#1#2{% \pchapsepmacro {% \chapfonts \rm \def\chapnum{#2}% \setbox0 = \hbox{#2\ifx\chapnum\empty\else\enspace\fi}% \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright \hangindent = \wd0 \centerparametersmaybe \unhbox0 #1\par}% }% \nobreak\bigskip % no page break after a chapter title \nobreak } % Plain opening for unnumbered. \def\unnchfplain#1{\chfplain{#1}{}} % @centerchap -- centered and unnumbered. \let\centerparametersmaybe = \relax \def\centerchfplain#1{{% \def\centerparametersmaybe{% \advance\rightskip by 3\rightskip \leftskip = \rightskip \parfillskip = 0pt }% \chfplain{#1}{}% }} \CHAPFplain % The default \def\unnchfopen #1{% \chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 \parindent=0pt\raggedright \rm #1\hfill}}\bigskip \par\penalty 10000 % } \def\chfopen #1#2{\chapoddpage {\chapfonts \vbox to 3in{\vfil \hbox to\hsize{\hfil #2} \hbox to\hsize{\hfil #1} \vfil}}% \par\penalty 5000 % } \def\centerchfopen #1{% \chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 \parindent=0pt \hfill {\rm #1}\hfill}}\bigskip \par\penalty 10000 % } \def\CHAPFopen{ \global\let\chapmacro=\chfopen \global\let\unnumbchapmacro=\unnchfopen \global\let\centerchapmacro=\centerchfopen} % Section titles. \newskip\secheadingskip \def\secheadingbreak{\dobreak \secheadingskip {-1000}} \def\secheading#1#2#3{\sectionheading{sec}{#2.#3}{#1}} \def\plainsecheading#1{\sectionheading{sec}{}{#1}} % Subsection titles. \newskip \subsecheadingskip \def\subsecheadingbreak{\dobreak \subsecheadingskip {-500}} \def\subsecheading#1#2#3#4{\sectionheading{subsec}{#2.#3.#4}{#1}} \def\plainsubsecheading#1{\sectionheading{subsec}{}{#1}} % Subsubsection titles. \let\subsubsecheadingskip = \subsecheadingskip \let\subsubsecheadingbreak = \subsecheadingbreak \def\subsubsecheading#1#2#3#4#5{\sectionheading{subsubsec}{#2.#3.#4.#5}{#1}} \def\plainsubsubsecheading#1{\sectionheading{subsubsec}{}{#1}} % Print any size section title. % % #1 is the section type (sec/subsec/subsubsec), #2 is the section % number (maybe empty), #3 the text. \def\sectionheading#1#2#3{% {% \expandafter\advance\csname #1headingskip\endcsname by \parskip \csname #1headingbreak\endcsname }% {% % Switch to the right set of fonts. \csname #1fonts\endcsname \rm % % Only insert the separating space if we have a section number. \def\secnum{#2}% \setbox0 = \hbox{#2\ifx\secnum\empty\else\enspace\fi}% % \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright \hangindent = \wd0 % zero if no section number \unhbox0 #3}% }% \ifdim\parskip<10pt \nobreak\kern10pt\nobreak\kern-\parskip\fi \nobreak } \message{toc printing,} % Finish up the main text and prepare to read what we've written % to \contentsfile. \newskip\contentsrightmargin \contentsrightmargin=1in \def\startcontents#1{% % If @setchapternewpage on, and @headings double, the contents should % start on an odd page, unlike chapters. Thus, we maintain % \contentsalignmacro in parallel with \pagealignmacro. % From: Torbjorn Granlund \contentsalignmacro \immediate\closeout \contentsfile \ifnum \pageno>0 \pageno = -1 % Request roman numbered pages. \fi % Don't need to put `Contents' or `Short Contents' in the headline. % It is abundantly clear what they are. \unnumbchapmacro{#1}\def\thischapter{}% \begingroup % Set up to handle contents files properly. \catcode`\\=0 \catcode`\{=1 \catcode`\}=2 \catcode`\@=11 \catcode`\^=7 % to see ^^e4 as \"a etc. juha@piuha.ydi.vtt.fi \raggedbottom % Worry more about breakpoints than the bottom. \advance\hsize by -\contentsrightmargin % Don't use the full line length. } % Normal (long) toc. \outer\def\contents{% \startcontents{\putwordTableofContents}% \input \jobname.toc \endgroup \vfill \eject } % And just the chapters. \outer\def\summarycontents{% \startcontents{\putwordShortContents}% % \let\chapentry = \shortchapentry \let\unnumbchapentry = \shortunnumberedentry % We want a true roman here for the page numbers. \secfonts \let\rm=\shortcontrm \let\bf=\shortcontbf \let\sl=\shortcontsl \rm \hyphenpenalty = 10000 \advance\baselineskip by 1pt % Open it up a little. \def\secentry ##1##2##3##4{} \def\unnumbsecentry ##1##2{} \def\subsecentry ##1##2##3##4##5{} \def\unnumbsubsecentry ##1##2{} \def\subsubsecentry ##1##2##3##4##5##6{} \def\unnumbsubsubsecentry ##1##2{} \input \jobname.toc \endgroup \vfill \eject } \let\shortcontents = \summarycontents % These macros generate individual entries in the table of contents. % The first argument is the chapter or section name. % The last argument is the page number. % The arguments in between are the chapter number, section number, ... % Chapter-level things, for both the long and short contents. \def\chapentry#1#2#3{\dochapentry{#2\labelspace#1}{#3}} % See comments in \dochapentry re vbox and related settings \def\shortchapentry#1#2#3{% \tocentry{\shortchaplabel{#2}\labelspace #1}{\doshortpageno{#3}}% } % Typeset the label for a chapter or appendix for the short contents. % The arg is, e.g. `Appendix A' for an appendix, or `3' for a chapter. % We could simplify the code here by writing out an \appendixentry % command in the toc file for appendices, instead of using \chapentry % for both, but it doesn't seem worth it. \setbox0 = \hbox{\shortcontrm \putwordAppendix } \newdimen\shortappendixwidth \shortappendixwidth = \wd0 \def\shortchaplabel#1{% % We typeset #1 in a box of constant width, regardless of the text of % #1, so the chapter titles will come out aligned. \setbox0 = \hbox{#1}% \dimen0 = \ifdim\wd0 > \shortappendixwidth \shortappendixwidth \else 0pt \fi % % This space should be plenty, since a single number is .5em, and the % widest letter (M) is 1em, at least in the Computer Modern fonts. % (This space doesn't include the extra space that gets added after % the label; that gets put in by \shortchapentry above.) \advance\dimen0 by 1.1em \hbox to \dimen0{#1\hfil}% } \def\unnumbchapentry#1#2{\dochapentry{#1}{#2}} \def\shortunnumberedentry#1#2{\tocentry{#1}{\doshortpageno{#2}}} % Sections. \def\secentry#1#2#3#4{\dosecentry{#2.#3\labelspace#1}{#4}} \def\unnumbsecentry#1#2{\dosecentry{#1}{#2}} % Subsections. \def\subsecentry#1#2#3#4#5{\dosubsecentry{#2.#3.#4\labelspace#1}{#5}} \def\unnumbsubsecentry#1#2{\dosubsecentry{#1}{#2}} % And subsubsections. \def\subsubsecentry#1#2#3#4#5#6{% \dosubsubsecentry{#2.#3.#4.#5\labelspace#1}{#6}} \def\unnumbsubsubsecentry#1#2{\dosubsubsecentry{#1}{#2}} % This parameter controls the indentation of the various levels. \newdimen\tocindent \tocindent = 3pc % Now for the actual typesetting. In all these, #1 is the text and #2 is the % page number. % % If the toc has to be broken over pages, we want it to be at chapters % if at all possible; hence the \penalty. \def\dochapentry#1#2{% \penalty-300 \vskip1\baselineskip plus.33\baselineskip minus.25\baselineskip \begingroup \chapentryfonts \tocentry{#1}{\dopageno{#2}}% \endgroup \nobreak\vskip .25\baselineskip plus.1\baselineskip } \def\dosecentry#1#2{\begingroup \secentryfonts \leftskip=\tocindent \tocentry{#1}{\dopageno{#2}}% \endgroup} \def\dosubsecentry#1#2{\begingroup \subsecentryfonts \leftskip=2\tocindent \tocentry{#1}{\dopageno{#2}}% \endgroup} \def\dosubsubsecentry#1#2{\begingroup \subsubsecentryfonts \leftskip=3\tocindent \tocentry{#1}{\dopageno{#2}}% \endgroup} % Final typesetting of a toc entry; we use the same \entry macro as for % the index entries, but we want to suppress hyphenation here. (We % can't do that in the \entry macro, since index entries might consist % of hyphenated-identifiers-that-do-not-fit-on-a-line-and-nothing-else.) % % \turnoffactive is for the sake of @" used for umlauts. \def\tocentry#1#2{\begingroup \vskip 0pt plus1pt % allow a little stretch for the sake of nice page breaks \entry{\turnoffactive #1}{\turnoffactive #2}% \endgroup} % Space between chapter (or whatever) number and the title. \def\labelspace{\hskip1em \relax} \def\dopageno#1{{\rm #1}} \def\doshortpageno#1{{\rm #1}} \def\chapentryfonts{\secfonts \rm} \def\secentryfonts{\textfonts} \let\subsecentryfonts = \textfonts \let\subsubsecentryfonts = \textfonts \message{environments,} % Since these characters are used in examples, it should be an even number of % \tt widths. Each \tt character is 1en, so two makes it 1em. % Furthermore, these definitions must come after we define our fonts. \newbox\dblarrowbox \newbox\longdblarrowbox \newbox\pushcharbox \newbox\bullbox \newbox\equivbox \newbox\errorbox %{\tentt %\global\setbox\dblarrowbox = \hbox to 1em{\hfil$\Rightarrow$\hfil} %\global\setbox\longdblarrowbox = \hbox to 1em{\hfil$\mapsto$\hfil} %\global\setbox\pushcharbox = \hbox to 1em{\hfil$\dashv$\hfil} %\global\setbox\equivbox = \hbox to 1em{\hfil$\ptexequiv$\hfil} % Adapted from the manmac format (p.420 of TeXbook) %\global\setbox\bullbox = \hbox to 1em{\kern.15em\vrule height .75ex width .85ex % depth .1ex\hfil} %} % @point{}, @result{}, @expansion{}, @print{}, @equiv{}. \def\point{$\star$} \def\result{\leavevmode\raise.15ex\hbox to 1em{\hfil$\Rightarrow$\hfil}} \def\expansion{\leavevmode\raise.1ex\hbox to 1em{\hfil$\mapsto$\hfil}} \def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}} \def\equiv{\leavevmode\lower.1ex\hbox to 1em{\hfil$\ptexequiv$\hfil}} % Adapted from the TeXbook's \boxit. {\tentt \global\dimen0 = 3em}% Width of the box. \dimen2 = .55pt % Thickness of rules % The text. (`r' is open on the right, `e' somewhat less so on the left.) \setbox0 = \hbox{\kern-.75pt \tensf error\kern-1.5pt} \global\setbox\errorbox=\hbox to \dimen0{\hfil \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right. \advance\hsize by -2\dimen2 % Rules. \vbox{ \hrule height\dimen2 \hbox{\vrule width\dimen2 \kern3pt % Space to left of text. \vtop{\kern2.4pt \box0 \kern2.4pt}% Space above/below. \kern3pt\vrule width\dimen2}% Space to right. \hrule height\dimen2} \hfil} % The @error{} command. \def\error{\leavevmode\lower.7ex\copy\errorbox} % @tex ... @end tex escapes into raw Tex temporarily. % One exception: @ is still an escape character, so that @end tex works. % But \@ or @@ will get a plain tex @ character. \def\tex{\begingroup \catcode `\\=0 \catcode `\{=1 \catcode `\}=2 \catcode `\$=3 \catcode `\&=4 \catcode `\#=6 \catcode `\^=7 \catcode `\_=8 \catcode `\~=13 \let~=\tie \catcode `\%=14 \catcode 43=12 % plus \catcode`\"=12 \catcode`\==12 \catcode`\|=12 \catcode`\<=12 \catcode`\>=12 \escapechar=`\\ % \let\,=\ptexcomma \let\{=\ptexlbrace \let\}=\ptexrbrace \let\.=\ptexdot \let\*=\ptexstar \let\dots=\ptexdots \def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}% \def\enddots{\relax\ifmmode\endldots\else$\mathsurround=0pt \endldots\,$\fi}% \def\@{@}% \let\bullet=\ptexbullet \let\b=\ptexb \let\c=\ptexc \let\i=\ptexi \let\t=\ptext % \let\Etex=\endgroup} % Define @lisp ... @endlisp. % @lisp does a \begingroup so it can rebind things, % including the definition of @endlisp (which normally is erroneous). % Amount to narrow the margins by for @lisp. \newskip\lispnarrowing \lispnarrowing=0.4in % This is the definition that ^^M gets inside @lisp, @example, and other % such environments. \null is better than a space, since it doesn't % have any width. \def\lisppar{\null\endgraf} % Make each space character in the input produce a normal interword % space in the output. Don't allow a line break at this space, as this % is used only in environments like @example, where each line of input % should produce a line of output anyway. % {\obeyspaces % \gdef\sepspaces{\obeyspaces\let =\tie}} % Define \obeyedspace to be our active space, whatever it is. This is % for use in \parsearg. {\sepspaces% \global\let\obeyedspace= } % This space is always present above and below environments. \newskip\envskipamount \envskipamount = 0pt % Make spacing and below environment symmetrical. We use \parskip here % to help in doing that, since in @example-like environments \parskip % is reset to zero; thus the \afterenvbreak inserts no space -- but the % start of the next paragraph will insert \parskip % \def\aboveenvbreak{{\advance\envskipamount by \parskip \endgraf \ifdim\lastskip<\envskipamount \removelastskip \penalty-50 \vskip\envskipamount \fi}} \let\afterenvbreak = \aboveenvbreak % \nonarrowing is a flag. If "set", @lisp etc don't narrow margins. \let\nonarrowing=\relax %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % \cartouche: draw rectangle w/rounded corners around argument \font\circle=lcircle10 \newdimen\circthick \newdimen\cartouter\newdimen\cartinner \newskip\normbskip\newskip\normpskip\newskip\normlskip \circthick=\fontdimen8\circle % \def\ctl{{\circle\char'013\hskip -6pt}}% 6pt from pl file: 1/2charwidth \def\ctr{{\hskip 6pt\circle\char'010}} \def\cbl{{\circle\char'012\hskip -6pt}} \def\cbr{{\hskip 6pt\circle\char'011}} \def\carttop{\hbox to \cartouter{\hskip\lskip \ctl\leaders\hrule height\circthick\hfil\ctr \hskip\rskip}} \def\cartbot{\hbox to \cartouter{\hskip\lskip \cbl\leaders\hrule height\circthick\hfil\cbr \hskip\rskip}} % \newskip\lskip\newskip\rskip \long\def\cartouche{% \begingroup \lskip=\leftskip \rskip=\rightskip \leftskip=0pt\rightskip=0pt %we want these *outside*. \cartinner=\hsize \advance\cartinner by-\lskip \advance\cartinner by-\rskip \cartouter=\hsize \advance\cartouter by 18pt % allow for 3pt kerns on either % side, and for 6pt waste from % each corner char \normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip % Flag to tell @lisp, etc., not to narrow margin. \let\nonarrowing=\comment \vbox\bgroup \baselineskip=0pt\parskip=0pt\lineskip=0pt \carttop \hbox\bgroup \hskip\lskip \vrule\kern3pt \vbox\bgroup \hsize=\cartinner \kern3pt \begingroup \baselineskip=\normbskip \lineskip=\normlskip \parskip=\normpskip \vskip -\parskip \def\Ecartouche{% \endgroup \kern3pt \egroup \kern3pt\vrule \hskip\rskip \egroup \cartbot \egroup \endgroup }} % This macro is called at the beginning of all the @example variants, % inside a group. \def\nonfillstart{% \aboveenvbreak \inENV % This group ends at the end of the body \hfuzz = 12pt % Don't be fussy \sepspaces % Make spaces be word-separators rather than space tokens. \singlespace \let\par = \lisppar % don't ignore blank lines \obeylines % each line of input is a line of output \parskip = 0pt \parindent = 0pt \emergencystretch = 0pt % don't try to avoid overfull boxes % @cartouche defines \nonarrowing to inhibit narrowing % at next level down. \ifx\nonarrowing\relax \advance \leftskip by \lispnarrowing \exdentamount=\lispnarrowing \let\exdent=\nofillexdent \let\nonarrowing=\relax \fi } % To ending an @example-like environment, we first end the paragraph % (via \afterenvbreak's vertical glue), and then the group. That way we % keep the zero \parskip that the environments set -- \parskip glue % will be inserted at the beginning of the next paragraph in the % document, after the environment. % \def\nonfillfinish{\afterenvbreak\endgroup}% % This macro is \def\lisp{\begingroup \nonfillstart \let\Elisp = \nonfillfinish \tt \rawbackslash % have \ input char produce \ char from current font \gobble } % Define the \E... control sequence only if we are inside the % environment, so the error checking in \end will work. % % We must call \lisp last in the definition, since it reads the % return following the @example (or whatever) command. % \def\example{\begingroup \def\Eexample{\nonfillfinish\endgroup}\lisp} \def\smallexample{\begingroup \def\Esmallexample{\nonfillfinish\endgroup}\lisp} \def\smalllisp{\begingroup \def\Esmalllisp{\nonfillfinish\endgroup}\lisp} % @smallexample and @smalllisp. This is not used unless the @smallbook % command is given. Originally contributed by Pavel@xerox. % \def\smalllispx{\begingroup \nonfillstart \let\Esmalllisp = \nonfillfinish \let\Esmallexample = \nonfillfinish % % Smaller fonts for small examples. \indexfonts \tt \rawbackslash % make \ output the \ character from the current font (tt) \gobble } % This is @display; same as @lisp except use roman font. % \def\display{\begingroup \nonfillstart \let\Edisplay = \nonfillfinish \gobble } % This is @format; same as @display except don't narrow margins. % \def\format{\begingroup \let\nonarrowing = t \nonfillstart \let\Eformat = \nonfillfinish \gobble } % @flushleft (same as @format) and @flushright. % \def\flushleft{\begingroup \let\nonarrowing = t \nonfillstart \let\Eflushleft = \nonfillfinish \gobble } \def\flushright{\begingroup \let\nonarrowing = t \nonfillstart \let\Eflushright = \nonfillfinish \advance\leftskip by 0pt plus 1fill \gobble} % @quotation does normal linebreaking (hence we can't use \nonfillstart) % and narrows the margins. % \def\quotation{% \begingroup\inENV %This group ends at the end of the @quotation body {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip \singlespace \parindent=0pt % We have retained a nonzero parskip for the environment, since we're % doing normal filling. So to avoid extra space below the environment... \def\Equotation{\parskip = 0pt \nonfillfinish}% % % @cartouche defines \nonarrowing to inhibit narrowing at next level down. \ifx\nonarrowing\relax \advance\leftskip by \lispnarrowing \advance\rightskip by \lispnarrowing \exdentamount = \lispnarrowing \let\nonarrowing = \relax \fi } \message{defuns,} % Define formatter for defuns % First, allow user to change definition object font (\df) internally \def\setdeffont #1 {\csname DEF#1\endcsname} \newskip\defbodyindent \defbodyindent=.4in \newskip\defargsindent \defargsindent=50pt \newskip\deftypemargin \deftypemargin=12pt \newskip\deflastargmargin \deflastargmargin=18pt \newcount\parencount % define \functionparens, which makes ( and ) and & do special things. % \functionparens affects the group it is contained in. \def\activeparens{% \catcode`\(=\active \catcode`\)=\active \catcode`\&=\active \catcode`\[=\active \catcode`\]=\active} % Make control sequences which act like normal parenthesis chars. \let\lparen = ( \let\rparen = ) {\activeparens % Now, smart parens don't turn on until &foo (see \amprm) % Be sure that we always have a definition for `(', etc. For example, % if the fn name has parens in it, \boldbrax will not be in effect yet, % so TeX would otherwise complain about undefined control sequence. \global\let(=\lparen \global\let)=\rparen \global\let[=\lbrack \global\let]=\rbrack \gdef\functionparens{\boldbrax\let&=\amprm\parencount=0 } \gdef\boldbrax{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb} % This is used to turn on special parens % but make & act ordinary (given that it's active). \gdef\boldbraxnoamp{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb\let&=\ampnr} % Definitions of (, ) and & used in args for functions. % This is the definition of ( outside of all parentheses. \gdef\oprm#1 {{\rm\char`\(}#1 \bf \let(=\opnested \global\advance\parencount by 1 } % % This is the definition of ( when already inside a level of parens. \gdef\opnested{\char`\(\global\advance\parencount by 1 } % \gdef\clrm{% Print a paren in roman if it is taking us back to depth of 0. % also in that case restore the outer-level definition of (. \ifnum \parencount=1 {\rm \char `\)}\sl \let(=\oprm \else \char `\) \fi \global\advance \parencount by -1 } % If we encounter &foo, then turn on ()-hacking afterwards \gdef\amprm#1 {{\rm\}\let(=\oprm \let)=\clrm\ } % \gdef\normalparens{\boldbrax\let&=\ampnr} } % End of definition inside \activeparens %% These parens (in \boldbrax) actually are a little bolder than the %% contained text. This is especially needed for [ and ] \def\opnr{{\sf\char`\(}\global\advance\parencount by 1 } \def\clnr{{\sf\char`\)}\global\advance\parencount by -1 } \def\ampnr{\&} \def\lbrb{{\bf\char`\[}} \def\rbrb{{\bf\char`\]}} % First, defname, which formats the header line itself. % #1 should be the function name. % #2 should be the type of definition, such as "Function". \def\defname #1#2{% % Get the values of \leftskip and \rightskip as they were % outside the @def... \dimen2=\leftskip \advance\dimen2 by -\defbodyindent \dimen3=\rightskip \advance\dimen3 by -\defbodyindent \noindent % \setbox0=\hbox{\hskip \deflastargmargin{\rm #2}\hskip \deftypemargin}% \dimen0=\hsize \advance \dimen0 by -\wd0 % compute size for first line \dimen1=\hsize \advance \dimen1 by -\defargsindent %size for continuations \parshape 2 0in \dimen0 \defargsindent \dimen1 % % Now output arg 2 ("Function" or some such) % ending at \deftypemargin from the right margin, % but stuck inside a box of width 0 so it does not interfere with linebreaking {% Adjust \hsize to exclude the ambient margins, % so that \rightline will obey them. \advance \hsize by -\dimen2 \advance \hsize by -\dimen3 \rlap{\rightline{{\rm #2}\hskip \deftypemargin}}}% % Make all lines underfull and no complaints: \tolerance=10000 \hbadness=10000 \advance\leftskip by -\defbodyindent \exdentamount=\defbodyindent {\df #1}\enskip % Generate function name } % Actually process the body of a definition % #1 should be the terminating control sequence, such as \Edefun. % #2 should be the "another name" control sequence, such as \defunx. % #3 should be the control sequence that actually processes the header, % such as \defunheader. \def\defparsebody #1#2#3{\begingroup\inENV% Environment for definitionbody \medbreak % % Define the end token that this defining construct specifies % so that it will exit this group. \def#1{\endgraf\endgroup\medbreak}% \def#2{\begingroup\obeylines\activeparens\spacesplit#3}% \parindent=0in \advance\leftskip by \defbodyindent \advance \rightskip by \defbodyindent \exdentamount=\defbodyindent \begingroup % \catcode 61=\active % 61 is `=' \obeylines\activeparens\spacesplit#3} \def\defmethparsebody #1#2#3#4 {\begingroup\inENV % \medbreak % % Define the end token that this defining construct specifies % so that it will exit this group. \def#1{\endgraf\endgroup\medbreak}% \def#2##1 {\begingroup\obeylines\activeparens\spacesplit{#3{##1}}}% \parindent=0in \advance\leftskip by \defbodyindent \advance \rightskip by \defbodyindent \exdentamount=\defbodyindent \begingroup\obeylines\activeparens\spacesplit{#3{#4}}} \def\defopparsebody #1#2#3#4#5 {\begingroup\inENV % \medbreak % % Define the end token that this defining construct specifies % so that it will exit this group. \def#1{\endgraf\endgroup\medbreak}% \def#2##1 ##2 {\def#4{##1}% \begingroup\obeylines\activeparens\spacesplit{#3{##2}}}% \parindent=0in \advance\leftskip by \defbodyindent \advance \rightskip by \defbodyindent \exdentamount=\defbodyindent \begingroup\obeylines\activeparens\spacesplit{#3{#5}}} % These parsing functions are similar to the preceding ones % except that they do not make parens into active characters. % These are used for "variables" since they have no arguments. \def\defvarparsebody #1#2#3{\begingroup\inENV% Environment for definitionbody \medbreak % % Define the end token that this defining construct specifies % so that it will exit this group. \def#1{\endgraf\endgroup\medbreak}% \def#2{\begingroup\obeylines\spacesplit#3}% \parindent=0in \advance\leftskip by \defbodyindent \advance \rightskip by \defbodyindent \exdentamount=\defbodyindent \begingroup % \catcode 61=\active % \obeylines\spacesplit#3} % This is used for \def{tp,vr}parsebody. It could probably be used for % some of the others, too, with some judicious conditionals. % \def\parsebodycommon#1#2#3{% \begingroup\inENV % \medbreak % % Define the end token that this defining construct specifies % so that it will exit this group. \def#1{\endgraf\endgroup\medbreak}% \def#2##1 {\begingroup\obeylines\spacesplit{#3{##1}}}% \parindent=0in \advance\leftskip by \defbodyindent \advance \rightskip by \defbodyindent \exdentamount=\defbodyindent \begingroup\obeylines } \def\defvrparsebody#1#2#3#4 {% \parsebodycommon{#1}{#2}{#3}% \spacesplit{#3{#4}}% } % This loses on `@deftp {Data Type} {struct termios}' -- it thinks the % type is just `struct', because we lose the braces in `{struct % termios}' when \spacesplit reads its undelimited argument. Sigh. % \let\deftpparsebody=\defvrparsebody % % So, to get around this, we put \empty in with the type name. That % way, TeX won't find exactly `{...}' as an undelimited argument, and % won't strip off the braces. % \def\deftpparsebody #1#2#3#4 {% \parsebodycommon{#1}{#2}{#3}% \spacesplit{\parsetpheaderline{#3{#4}}}\empty } % Fine, but then we have to eventually remove the \empty *and* the % braces (if any). That's what this does. % \def\removeemptybraces\empty#1\relax{#1} % After \spacesplit has done its work, this is called -- #1 is the final % thing to call, #2 the type name (which starts with \empty), and #3 % (which might be empty) the arguments. % \def\parsetpheaderline#1#2#3{% #1{\removeemptybraces#2\relax}{#3}% }% \def\defopvarparsebody #1#2#3#4#5 {\begingroup\inENV % \medbreak % % Define the end token that this defining construct specifies % so that it will exit this group. \def#1{\endgraf\endgroup\medbreak}% \def#2##1 ##2 {\def#4{##1}% \begingroup\obeylines\spacesplit{#3{##2}}}% \parindent=0in \advance\leftskip by \defbodyindent \advance \rightskip by \defbodyindent \exdentamount=\defbodyindent \begingroup\obeylines\spacesplit{#3{#5}}} % Split up #2 at the first space token. % call #1 with two arguments: % the first is all of #2 before the space token, % the second is all of #2 after that space token. % If #2 contains no space token, all of it is passed as the first arg % and the second is passed as empty. {\obeylines \gdef\spacesplit#1#2^^M{\endgroup\spacesplitfoo{#1}#2 \relax\spacesplitfoo}% \long\gdef\spacesplitfoo#1#2 #3#4\spacesplitfoo{% \ifx\relax #3% #1{#2}{}\else #1{#2}{#3#4}\fi}} % So much for the things common to all kinds of definitions. % Define @defun. % First, define the processing that is wanted for arguments of \defun % Use this to expand the args and terminate the paragraph they make up \def\defunargs #1{\functionparens \sl % Expand, preventing hyphenation at `-' chars. % Note that groups don't affect changes in \hyphenchar. \hyphenchar\tensl=0 #1% \hyphenchar\tensl=45 \ifnum\parencount=0 \else \errmessage{Unbalanced parentheses in @def}\fi% \interlinepenalty=10000 \advance\rightskip by 0pt plus 1fil \endgraf\penalty 10000\vskip -\parskip\penalty 10000% } \def\deftypefunargs #1{% % Expand, preventing hyphenation at `-' chars. % Note that groups don't affect changes in \hyphenchar. % Use \boldbraxnoamp, not \functionparens, so that & is not special. \boldbraxnoamp \tclose{#1}% avoid \code because of side effects on active chars \interlinepenalty=10000 \advance\rightskip by 0pt plus 1fil \endgraf\penalty 10000\vskip -\parskip\penalty 10000% } % Do complete processing of one @defun or @defunx line already parsed. % @deffn Command forward-char nchars \def\deffn{\defmethparsebody\Edeffn\deffnx\deffnheader} \def\deffnheader #1#2#3{\doind {fn}{\code{#2}}% \begingroup\defname {#2}{#1}\defunargs{#3}\endgroup % \catcode 61=\other % Turn off change made in \defparsebody } % @defun == @deffn Function \def\defun{\defparsebody\Edefun\defunx\defunheader} \def\defunheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index \begingroup\defname {#1}{Function}% \defunargs {#2}\endgroup % \catcode 61=\other % Turn off change made in \defparsebody } % @deftypefun int foobar (int @var{foo}, float @var{bar}) \def\deftypefun{\defparsebody\Edeftypefun\deftypefunx\deftypefunheader} % #1 is the data type. #2 is the name and args. \def\deftypefunheader #1#2{\deftypefunheaderx{#1}#2 \relax} % #1 is the data type, #2 the name, #3 the args. \def\deftypefunheaderx #1#2 #3\relax{% \doind {fn}{\code{#2}}% Make entry in function index \begingroup\defname {\defheaderxcond#1\relax$$$#2}{Function}% \deftypefunargs {#3}\endgroup % \catcode 61=\other % Turn off change made in \defparsebody } % @deftypefn {Library Function} int foobar (int @var{foo}, float @var{bar}) \def\deftypefn{\defmethparsebody\Edeftypefn\deftypefnx\deftypefnheader} % \defheaderxcond#1\relax$$$ % puts #1 in @code, followed by a space, but does nothing if #1 is null. \def\defheaderxcond#1#2$$${\ifx#1\relax\else\code{#1#2} \fi} % #1 is the classification. #2 is the data type. #3 is the name and args. \def\deftypefnheader #1#2#3{\deftypefnheaderx{#1}{#2}#3 \relax} % #1 is the classification, #2 the data type, #3 the name, #4 the args. \def\deftypefnheaderx #1#2#3 #4\relax{% \doind {fn}{\code{#3}}% Make entry in function index \begingroup \normalparens % notably, turn off `&' magic, which prevents % at least some C++ text from working \defname {\defheaderxcond#2\relax$$$#3}{#1}% \deftypefunargs {#4}\endgroup % \catcode 61=\other % Turn off change made in \defparsebody } % @defmac == @deffn Macro \def\defmac{\defparsebody\Edefmac\defmacx\defmacheader} \def\defmacheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index \begingroup\defname {#1}{Macro}% \defunargs {#2}\endgroup % \catcode 61=\other % Turn off change made in \defparsebody } % @defspec == @deffn Special Form \def\defspec{\defparsebody\Edefspec\defspecx\defspecheader} \def\defspecheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index \begingroup\defname {#1}{Special Form}% \defunargs {#2}\endgroup % \catcode 61=\other % Turn off change made in \defparsebody } % This definition is run if you use @defunx % anywhere other than immediately after a @defun or @defunx. \def\deffnx #1 {\errmessage{@deffnx in invalid context}} \def\defunx #1 {\errmessage{@defunx in invalid context}} \def\defmacx #1 {\errmessage{@defmacx in invalid context}} \def\defspecx #1 {\errmessage{@defspecx in invalid context}} \def\deftypefnx #1 {\errmessage{@deftypefnx in invalid context}} \def\deftypemethodx #1 {\errmessage{@deftypemethodx in invalid context}} \def\deftypeunx #1 {\errmessage{@deftypeunx in invalid context}} % @defmethod, and so on % @defop {Funny Method} foo-class frobnicate argument \def\defop #1 {\def\defoptype{#1}% \defopparsebody\Edefop\defopx\defopheader\defoptype} \def\defopheader #1#2#3{% \dosubind {fn}{\code{#2}}{on #1}% Make entry in function index \begingroup\defname {#2}{\defoptype{} on #1}% \defunargs {#3}\endgroup % } % @deftypemethod foo-class return-type foo-method args % \def\deftypemethod{% \defmethparsebody\Edeftypemethod\deftypemethodx\deftypemethodheader} % % #1 is the class name, #2 the data type, #3 the method name, #4 the args. \def\deftypemethodheader#1#2#3#4{% \deftypefnheaderx{Method on #1}{#2}#3 #4\relax } % @defmethod == @defop Method \def\defmethod{\defmethparsebody\Edefmethod\defmethodx\defmethodheader} \def\defmethodheader #1#2#3{% \dosubind {fn}{\code{#2}}{on #1}% entry in function index \begingroup\defname {#2}{Method on #1}% \defunargs {#3}\endgroup % } % @defcv {Class Option} foo-class foo-flag \def\defcv #1 {\def\defcvtype{#1}% \defopvarparsebody\Edefcv\defcvx\defcvarheader\defcvtype} \def\defcvarheader #1#2#3{% \dosubind {vr}{\code{#2}}{of #1}% Make entry in var index \begingroup\defname {#2}{\defcvtype{} of #1}% \defvarargs {#3}\endgroup % } % @defivar == @defcv {Instance Variable} \def\defivar{\defvrparsebody\Edefivar\defivarx\defivarheader} \def\defivarheader #1#2#3{% \dosubind {vr}{\code{#2}}{of #1}% Make entry in var index \begingroup\defname {#2}{Instance Variable of #1}% \defvarargs {#3}\endgroup % } % These definitions are run if you use @defmethodx, etc., % anywhere other than immediately after a @defmethod, etc. \def\defopx #1 {\errmessage{@defopx in invalid context}} \def\defmethodx #1 {\errmessage{@defmethodx in invalid context}} \def\defcvx #1 {\errmessage{@defcvx in invalid context}} \def\defivarx #1 {\errmessage{@defivarx in invalid context}} % Now @defvar % First, define the processing that is wanted for arguments of @defvar. % This is actually simple: just print them in roman. % This must expand the args and terminate the paragraph they make up \def\defvarargs #1{\normalparens #1% \interlinepenalty=10000 \endgraf\penalty 10000\vskip -\parskip\penalty 10000} % @defvr Counter foo-count \def\defvr{\defvrparsebody\Edefvr\defvrx\defvrheader} \def\defvrheader #1#2#3{\doind {vr}{\code{#2}}% \begingroup\defname {#2}{#1}\defvarargs{#3}\endgroup} % @defvar == @defvr Variable \def\defvar{\defvarparsebody\Edefvar\defvarx\defvarheader} \def\defvarheader #1#2{\doind {vr}{\code{#1}}% Make entry in var index \begingroup\defname {#1}{Variable}% \defvarargs {#2}\endgroup % } % @defopt == @defvr {User Option} \def\defopt{\defvarparsebody\Edefopt\defoptx\defoptheader} \def\defoptheader #1#2{\doind {vr}{\code{#1}}% Make entry in var index \begingroup\defname {#1}{User Option}% \defvarargs {#2}\endgroup % } % @deftypevar int foobar \def\deftypevar{\defvarparsebody\Edeftypevar\deftypevarx\deftypevarheader} % #1 is the data type. #2 is the name, perhaps followed by text that % is actually part of the data type, which should not be put into the index. \def\deftypevarheader #1#2{% \dovarind#2 \relax% Make entry in variables index \begingroup\defname {\defheaderxcond#1\relax$$$#2}{Variable}% \interlinepenalty=10000 \endgraf\penalty 10000\vskip -\parskip\penalty 10000 \endgroup} \def\dovarind#1 #2\relax{\doind{vr}{\code{#1}}} % @deftypevr {Global Flag} int enable \def\deftypevr{\defvrparsebody\Edeftypevr\deftypevrx\deftypevrheader} \def\deftypevrheader #1#2#3{\dovarind#3 \relax% \begingroup\defname {\defheaderxcond#2\relax$$$#3}{#1} \interlinepenalty=10000 \endgraf\penalty 10000\vskip -\parskip\penalty 10000 \endgroup} % This definition is run if you use @defvarx % anywhere other than immediately after a @defvar or @defvarx. \def\defvrx #1 {\errmessage{@defvrx in invalid context}} \def\defvarx #1 {\errmessage{@defvarx in invalid context}} \def\defoptx #1 {\errmessage{@defoptx in invalid context}} \def\deftypevarx #1 {\errmessage{@deftypevarx in invalid context}} \def\deftypevrx #1 {\errmessage{@deftypevrx in invalid context}} % Now define @deftp % Args are printed in bold, a slight difference from @defvar. \def\deftpargs #1{\bf \defvarargs{#1}} % @deftp Class window height width ... \def\deftp{\deftpparsebody\Edeftp\deftpx\deftpheader} \def\deftpheader #1#2#3{\doind {tp}{\code{#2}}% \begingroup\defname {#2}{#1}\deftpargs{#3}\endgroup} % This definition is run if you use @deftpx, etc % anywhere other than immediately after a @deftp, etc. \def\deftpx #1 {\errmessage{@deftpx in invalid context}} \message{cross reference,} % Define cross-reference macros \newwrite \auxfile \newif\ifhavexrefs % True if xref values are known. \newif\ifwarnedxrefs % True if we warned once that they aren't known. % @inforef is simple. \def\inforef #1{\inforefzzz #1,,,,**} \def\inforefzzz #1,#2,#3,#4**{\putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}}, node \samp{\ignorespaces#1{}}} % \setref{foo} defines a cross-reference point named foo. \def\setref#1{% \dosetq{#1-title}{Ytitle}% \dosetq{#1-pg}{Ypagenumber}% \dosetq{#1-snt}{Ysectionnumberandtype}} \def\unnumbsetref#1{% \dosetq{#1-title}{Ytitle}% \dosetq{#1-pg}{Ypagenumber}% \dosetq{#1-snt}{Ynothing}} \def\appendixsetref#1{% \dosetq{#1-title}{Ytitle}% \dosetq{#1-pg}{Ypagenumber}% \dosetq{#1-snt}{Yappendixletterandtype}} % \xref, \pxref, and \ref generate cross-references to specified points. % For \xrefX, #1 is the node name, #2 the name of the Info % cross-reference, #3 the printed node name, #4 the name of the Info % file, #5 the name of the printed manual. All but the node name can be % omitted. % \def\pxref#1{\putwordsee{} \xrefX[#1,,,,,,,]} \def\xref#1{\putwordSee{} \xrefX[#1,,,,,,,]} \def\ref#1{\xrefX[#1,,,,,,,]} \def\xrefX[#1,#2,#3,#4,#5,#6]{\begingroup \def\printedmanual{\ignorespaces #5}% \def\printednodename{\ignorespaces #3}% \setbox1=\hbox{\printedmanual}% \setbox0=\hbox{\printednodename}% \ifdim \wd0 = 0pt % No printed node name was explicitly given. \expandafter\ifx\csname SETxref-automatic-section-title\endcsname\relax % Use the node name inside the square brackets. \def\printednodename{\ignorespaces #1}% \else % Use the actual chapter/section title appear inside % the square brackets. Use the real section title if we have it. \ifdim \wd1>0pt% % It is in another manual, so we don't have it. \def\printednodename{\ignorespaces #1}% \else \ifhavexrefs % We know the real title if we have the xref values. \def\printednodename{\refx{#1-title}{}}% \else % Otherwise just copy the Info node name. \def\printednodename{\ignorespaces #1}% \fi% \fi \fi \fi % % If we use \unhbox0 and \unhbox1 to print the node names, TeX does not % insert empty discretionaries after hyphens, which means that it will % not find a line break at a hyphen in a node names. Since some manuals % are best written with fairly long node names, containing hyphens, this % is a loss. Therefore, we give the text of the node name again, so it % is as if TeX is seeing it for the first time. \ifdim \wd1 > 0pt \putwordsection{} ``\printednodename'' in \cite{\printedmanual}% \else % _ (for example) has to be the character _ for the purposes of the % control sequence corresponding to the node, but it has to expand % into the usual \leavevmode...\vrule stuff for purposes of % printing. So we \turnoffactive for the \refx-snt, back on for the % printing, back off for the \refx-pg. {\turnoffactive \refx{#1-snt}{}}% \space [\printednodename],\space \turnoffactive \putwordpage\tie\refx{#1-pg}{}% \fi \endgroup} % \dosetq is the interface for calls from other macros % Use \turnoffactive so that punctuation chars such as underscore % work in node names. \def\dosetq #1#2{{\let\folio=0 \turnoffactive \edef\next{\write\auxfile{\internalsetq {#1}{#2}}}% \next}} % \internalsetq {foo}{page} expands into % CHARACTERS 'xrdef {foo}{...expansion of \Ypage...} % When the aux file is read, ' is the escape character \def\internalsetq #1#2{'xrdef {#1}{\csname #2\endcsname}} % Things to be expanded by \internalsetq \def\Ypagenumber{\folio} \def\Ytitle{\thissection} \def\Ynothing{} \def\Ysectionnumberandtype{% \ifnum\secno=0 \putwordChapter\xreftie\the\chapno % \else \ifnum \subsecno=0 \putwordSection\xreftie\the\chapno.\the\secno % \else \ifnum \subsubsecno=0 % \putwordSection\xreftie\the\chapno.\the\secno.\the\subsecno % \else % \putwordSection\xreftie\the\chapno.\the\secno.\the\subsecno.\the\subsubsecno % \fi \fi \fi } \def\Yappendixletterandtype{% \ifnum\secno=0 \putwordAppendix\xreftie'char\the\appendixno{}% \else \ifnum \subsecno=0 \putwordSection\xreftie'char\the\appendixno.\the\secno % \else \ifnum \subsubsecno=0 % \putwordSection\xreftie'char\the\appendixno.\the\secno.\the\subsecno % \else % \putwordSection\xreftie'char\the\appendixno.\the\secno.\the\subsecno.\the\subsubsecno % \fi \fi \fi } \gdef\xreftie{'tie} % Use TeX 3.0's \inputlineno to get the line number, for better error % messages, but if we're using an old version of TeX, don't do anything. % \ifx\inputlineno\thisisundefined \let\linenumber = \empty % Non-3.0. \else \def\linenumber{\the\inputlineno:\space} \fi % Define \refx{NAME}{SUFFIX} to reference a cross-reference string named NAME. % If its value is nonempty, SUFFIX is output afterward. \def\refx#1#2{% \expandafter\ifx\csname X#1\endcsname\relax % If not defined, say something at least. $\langle$un\-de\-fined$\rangle$% \ifhavexrefs \message{\linenumber Undefined cross reference `#1'.}% \else \ifwarnedxrefs\else \global\warnedxrefstrue \message{Cross reference values unknown; you must run TeX again.}% \fi \fi \else % It's defined, so just use it. \csname X#1\endcsname \fi #2% Output the suffix in any case. } % This is the macro invoked by entries in the aux file. \def\xrdef #1#2{{% \catcode`\'=\other \expandafter\gdef\csname X#1\endcsname{#2}% }} % Read the last existing aux file, if any. No error if none exists. \def\readauxfile{\begingroup \catcode`\^^@=\other \catcode`\=\other \catcode`\=\other \catcode`\^^C=\other \catcode`\^^D=\other \catcode`\^^E=\other \catcode`\^^F=\other \catcode`\^^G=\other \catcode`\^^H=\other \catcode`\ =\other \catcode`\^^L=\other \catcode`\=\other \catcode`\=\other \catcode`\=\other \catcode`\=\other \catcode`\=\other \catcode`\=\other \catcode`\=\other \catcode`\=\other \catcode`\=\other \catcode`\=\other \catcode`\=\other \catcode`\=\other \catcode26=\other \catcode`\^^[=\other \catcode`\^^\=\other \catcode`\^^]=\other \catcode`\^^^=\other \catcode`\^^_=\other \catcode`\@=\other \catcode`\^=\other % It was suggested to define this as 7, which would allow ^^e4 etc. % in xref tags, i.e., node names. But since ^^e4 notation isn't % supported in the main text, it doesn't seem desirable. Furthermore, % that is not enough: for node names that actually contain a ^ % character, we would end up writing a line like this: 'xrdef {'hat % b-title}{'hat b} and \xrdef does a \csname...\endcsname on the first % argument, and \hat is not an expandable control sequence. It could % all be worked out, but why? Either we support ^^ or we don't. % % The other change necessary for this was to define \auxhat: % \def\auxhat{\def^{'hat }}% extra space so ok if followed by letter % and then to call \auxhat in \setq. % \catcode`\~=\other \catcode`\[=\other \catcode`\]=\other \catcode`\"=\other \catcode`\_=\other \catcode`\|=\other \catcode`\<=\other \catcode`\>=\other \catcode`\$=\other \catcode`\#=\other \catcode`\&=\other % `\+ does not work, so use 43. \catcode43=\other % Make the characters 128-255 be printing characters {% \count 1=128 \def\loop{% \catcode\count 1=\other \advance\count 1 by 1 \ifnum \count 1<256 \loop \fi }% }% % The aux file uses ' as the escape (for now). % Turn off \ as an escape so we do not lose on % entries which were dumped with control sequences in their names. % For example, 'xrdef {$\leq $-fun}{page ...} made by @defun ^^ % Reference to such entries still does not work the way one would wish, % but at least they do not bomb out when the aux file is read in. \catcode`\{=1 \catcode`\}=2 \catcode`\%=\other \catcode`\'=0 \catcode`\\=\other % \openin 1 \jobname.aux \ifeof 1 \else \closein 1 \input \jobname.aux \global\havexrefstrue \global\warnedobstrue \fi % Open the new aux file. TeX will close it automatically at exit. \openout\auxfile=\jobname.aux \endgroup} % Footnotes. \newcount \footnoteno % The trailing space in the following definition for supereject is % vital for proper filling; pages come out unaligned when you do a % pagealignmacro call if that space before the closing brace is % removed. (Generally, numeric constants should always be followed by a % space to prevent strange expansion errors.) \def\supereject{\par\penalty -20000\footnoteno =0 } % @footnotestyle is meaningful for info output only.. \let\footnotestyle=\comment \let\ptexfootnote=\footnote {\catcode `\@=11 % % Auto-number footnotes. Otherwise like plain. \gdef\footnote{% \global\advance\footnoteno by \@ne \edef\thisfootno{$^{\the\footnoteno}$}% % % In case the footnote comes at the end of a sentence, preserve the % extra spacing after we do the footnote number. \let\@sf\empty \ifhmode\edef\@sf{\spacefactor\the\spacefactor}\/\fi % % Remove inadvertent blank space before typesetting the footnote number. \unskip \thisfootno\@sf \footnotezzz }% % Don't bother with the trickery in plain.tex to not require the % footnote text as a parameter. Our footnotes don't need to be so general. % % Oh yes, they do; otherwise, @ifset and anything else that uses % \parseargline fail inside footnotes because the tokens are fixed when % the footnote is read. --karl, 16nov96. % \long\gdef\footnotezzz{\insert\footins\bgroup % We want to typeset this text as a normal paragraph, even if the % footnote reference occurs in (for example) a display environment. % So reset some parameters. \interlinepenalty\interfootnotelinepenalty \splittopskip\ht\strutbox % top baseline for broken footnotes \splitmaxdepth\dp\strutbox \floatingpenalty\@MM \leftskip\z@skip \rightskip\z@skip \spaceskip\z@skip \xspaceskip\z@skip \parindent\defaultparindent % % Hang the footnote text off the number. \hang \textindent{\thisfootno}% % % Don't crash into the line above the footnote text. Since this % expands into a box, it must come within the paragraph, lest it % provide a place where TeX can split the footnote. \footstrut \futurelet\next\fo@t } \def\fo@t{\ifcat\bgroup\noexpand\next \let\next\f@@t \else\let\next\f@t\fi \next} \def\f@@t{\bgroup\aftergroup\@foot\let\next} \def\f@t#1{#1\@foot} \def\@foot{\strut\egroup} }%end \catcode `\@=11 % Set the baselineskip to #1, and the lineskip and strut size % correspondingly. There is no deep meaning behind these magic numbers % used as factors; they just match (closely enough) what Knuth defined. % \def\lineskipfactor{.08333} \def\strutheightpercent{.70833} \def\strutdepthpercent {.29167} % \def\setleading#1{% \normalbaselineskip = #1\relax \normallineskip = \lineskipfactor\normalbaselineskip \normalbaselines \setbox\strutbox =\hbox{% \vrule width0pt height\strutheightpercent\baselineskip depth \strutdepthpercent \baselineskip }% } % @| inserts a changebar to the left of the current line. It should % surround any changed text. This approach does *not* work if the % change spans more than two lines of output. To handle that, we would % have adopt a much more difficult approach (putting marks into the main % vertical list for the beginning and end of each change). % \def\|{% % \vadjust can only be used in horizontal mode. \leavevmode % % Append this vertical mode material after the current line in the output. \vadjust{% % We want to insert a rule with the height and depth of the current % leading; that is exactly what \strutbox is supposed to record. \vskip-\baselineskip % % \vadjust-items are inserted at the left edge of the type. So % the \llap here moves out into the left-hand margin. \llap{% % % For a thicker or thinner bar, change the `1pt'. \vrule height\baselineskip width1pt % % This is the space between the bar and the text. \hskip 12pt }% }% } % For a final copy, take out the rectangles % that mark overfull boxes (in case you have decided % that the text looks ok even though it passes the margin). % \def\finalout{\overfullrule=0pt} % End of control word definitions. \message{and turning on texinfo input format.} \def\openindices{% \newindex{cp}% \newcodeindex{fn}% \newcodeindex{vr}% \newcodeindex{tp}% \newcodeindex{ky}% \newcodeindex{pg}% } % Set some numeric style parameters, for 8.5 x 11 format. \hsize = 6in \hoffset = .25in \newdimen\defaultparindent \defaultparindent = 15pt \parindent = \defaultparindent \parskip 3pt plus 2pt minus 1pt \setleading{13.2pt} \advance\topskip by 1.2cm \chapheadingskip = 15pt plus 4pt minus 2pt \secheadingskip = 12pt plus 3pt minus 2pt \subsecheadingskip = 9pt plus 2pt minus 2pt % Prevent underfull vbox error messages. \vbadness=10000 % Following George Bush, just get rid of widows and orphans. \widowpenalty=10000 \clubpenalty=10000 % Use TeX 3.0's \emergencystretch to help line breaking, but if we're % using an old version of TeX, don't do anything. We want the amount of % stretch added to depend on the line length, hence the dependence on % \hsize. This makes it come to about 9pt for the 8.5x11 format. % \ifx\emergencystretch\thisisundefined % Allow us to assign to \emergencystretch anyway. \def\emergencystretch{\dimen0}% \else \emergencystretch = \hsize \divide\emergencystretch by 45 \fi % Use @smallbook to reset parameters for 7x9.5 format (or else 7x9.25) \def\smallbook{ \global\chapheadingskip = 15pt plus 4pt minus 2pt \global\secheadingskip = 12pt plus 3pt minus 2pt \global\subsecheadingskip = 9pt plus 2pt minus 2pt % \global\lispnarrowing = 0.3in \setleading{12pt} \advance\topskip by -1cm \global\parskip 2pt plus 1pt \global\hsize = 5in \global\vsize=7.5in \global\tolerance=700 \global\hfuzz=1pt \global\contentsrightmargin=0pt \global\deftypemargin=0pt \global\defbodyindent=.5cm % \global\pagewidth=\hsize \global\pageheight=\vsize % \global\let\smalllisp=\smalllispx \global\let\smallexample=\smalllispx \global\def\Esmallexample{\Esmalllisp} } % Use @afourpaper to print on European A4 paper. \def\afourpaper{ \global\tolerance=700 \global\hfuzz=1pt \setleading{12pt} \global\parskip 15pt plus 1pt \global\vsize= 53\baselineskip \advance\vsize by \topskip %\global\hsize= 5.85in % A4 wide 10pt \global\hsize= 6.5in \global\outerhsize=\hsize \global\advance\outerhsize by 0.5in \global\outervsize=\vsize \global\advance\outervsize by 0.6in \global\pagewidth=\hsize \global\pageheight=\vsize } \bindingoffset=0pt \normaloffset=\hoffset \pagewidth=\hsize \pageheight=\vsize % Allow control of the text dimensions. Parameters in order: textheight; % textwidth; voffset; hoffset; binding offset; topskip. % All require a dimension; % header is additional; added length extends the bottom of the page. \def\changepagesizes#1#2#3#4#5#6{ \global\vsize= #1 \global\topskip= #6 \advance\vsize by \topskip \global\voffset= #3 \global\hsize= #2 \global\outerhsize=\hsize \global\advance\outerhsize by 0.5in \global\outervsize=\vsize \global\advance\outervsize by 0.6in \global\pagewidth=\hsize \global\pageheight=\vsize \global\normaloffset= #4 \global\bindingoffset= #5} % A specific text layout, 24x15cm overall, intended for A4 paper. Top margin % 29mm, hence bottom margin 28mm, nominal side margin 3cm. \def\afourlatex {\global\tolerance=700 \global\hfuzz=1pt \setleading{12pt} \global\parskip 15pt plus 1pt \advance\baselineskip by 1.6pt \changepagesizes{237mm}{150mm}{3.6mm}{3.6mm}{3mm}{7mm} } % Use @afourwide to print on European A4 paper in wide format. \def\afourwide{\afourpaper \changepagesizes{9.5in}{6.5in}{\hoffset}{\normaloffset}{\bindingoffset}{7mm}} % Define macros to output various characters with catcode for normal text. \catcode`\"=\other \catcode`\~=\other \catcode`\^=\other \catcode`\_=\other \catcode`\|=\other \catcode`\<=\other \catcode`\>=\other \catcode`\+=\other \def\normaldoublequote{"} \def\normaltilde{~} \def\normalcaret{^} \def\normalunderscore{_} \def\normalverticalbar{|} \def\normalless{<} \def\normalgreater{>} \def\normalplus{+} % This macro is used to make a character print one way in ttfont % where it can probably just be output, and another way in other fonts, % where something hairier probably needs to be done. % % #1 is what to print if we are indeed using \tt; #2 is what to print % otherwise. Since all the Computer Modern typewriter fonts have zero % interword stretch (and shrink), and it is reasonable to expect all % typewriter fonts to have this, we can check that font parameter. % \def\ifusingtt#1#2{\ifdim \fontdimen3\the\font=0pt #1\else #2\fi} % Turn off all special characters except @ % (and those which the user can use as if they were ordinary). % Most of these we simply print from the \tt font, but for some, we can % use math or other variants that look better in normal text. \catcode`\"=\active \def\activedoublequote{{\tt \char '042}} \let"=\activedoublequote \catcode`\~=\active \def~{{\tt \char '176}} \chardef\hat=`\^ \catcode`\^=\active \def^{{\tt \hat}} \catcode`\_=\active \def_{\ifusingtt\normalunderscore\_} % Subroutine for the previous macro. \def\_{\leavevmode \kern.06em \vbox{\hrule width.3em height.1ex}} \catcode`\|=\active \def|{{\tt \char '174}} \chardef \less=`\< \catcode`\<=\active \def<{{\tt \less}} \chardef \gtr=`\> \catcode`\>=\active \def>{{\tt \gtr}} \catcode`\+=\active \def+{{\tt \char 43}} %\catcode 27=\active %\def^^[{$\diamondsuit$} % Set up an active definition for =, but don't enable it most of the time. {\catcode`\==\active \global\def={{\tt \char 61}}} \catcode`+=\active \catcode`\_=\active % If a .fmt file is being used, characters that might appear in a file % name cannot be active until we have parsed the command line. % So turn them off again, and have \everyjob (or @setfilename) turn them on. % \otherifyactive is called near the end of this file. \def\otherifyactive{\catcode`+=\other \catcode`\_=\other} \catcode`\@=0 % \rawbackslashxx output one backslash character in current font \global\chardef\rawbackslashxx=`\\ %{\catcode`\\=\other %@gdef@rawbackslashxx{\}} % \rawbackslash redefines \ as input to do \rawbackslashxx. {\catcode`\\=\active @gdef@rawbackslash{@let\=@rawbackslashxx }} % \normalbackslash outputs one backslash in fixed width font. \def\normalbackslash{{\tt\rawbackslashxx}} % Say @foo, not \foo, in error messages. \escapechar=`\@ % \catcode 17=0 % Define control-q \catcode`\\=\active % Used sometimes to turn off (effectively) the active characters % even after parsing them. @def@turnoffactive{@let"=@normaldoublequote @let\=@realbackslash @let~=@normaltilde @let^=@normalcaret @let_=@normalunderscore @let|=@normalverticalbar @let<=@normalless @let>=@normalgreater @let+=@normalplus} @def@normalturnoffactive{@let"=@normaldoublequote @let\=@normalbackslash @let~=@normaltilde @let^=@normalcaret @let_=@normalunderscore @let|=@normalverticalbar @let<=@normalless @let>=@normalgreater @let+=@normalplus} % Make _ and + \other characters, temporarily. % This is canceled by @fixbackslash. @otherifyactive % If a .fmt file is being used, we don't want the `\input texinfo' to show up. % That is what \eatinput is for; after that, the `\' should revert to printing % a backslash. % @gdef@eatinput input texinfo{@fixbackslash} @global@let\ = @eatinput % On the other hand, perhaps the file did not have a `\input texinfo'. Then % the first `\{ in the file would cause an error. This macro tries to fix % that, assuming it is called before the first `\' could plausibly occur. % Also back turn on active characters that might appear in the input % file name, in case not using a pre-dumped format. % @gdef@fixbackslash{@ifx\@eatinput @let\ = @normalbackslash @fi @catcode`+=@active @catcode`@_=@active} %% These look ok in all fonts, so just make them not special. The @rm below %% makes sure that the current font starts out as the newly loaded cmr10 @catcode`@$=@other @catcode`@%=@other @catcode`@&=@other @catcode`@#=@other @textfonts @rm @c Local variables: @c page-delimiter: "^\\\\message" @c End: aalib-1.4.0/README.OS20000644000766200001440000000304607272031253007537 What is this? ============= This is the official AA-lib for OS/2 - the great ascii-art library by Jan Hubicka & Kamil Toman. The official OS/2 driver is developed and maintained by Thomas A. K. Kjaer(takjaer@imv.aau.dk). AA-lib is compiled using emx/gcc version 0.9c+fix 02 and works on OS/2 Warp 3.x & 4.x - maybe on OS/2 2.x too, but I haven't tested that. It makes use of the old VIO, KBD & MOU api, but everything else is pure 32-bits code. AA-lib programs works in either fullscreen or windowed OS/2 sessions, and supports a wide range of resolutions. What resolutions is supported? ============================== AA-lib programs can be run in fullscreen or windowed OS/2 seesions. The resolutions supported, and the font used in rendering are: Full screen OS/2 session: cols X Rows ----------- 132 x N, where 7<=N<=50 80 x N, where 7<=N<=50 Fonts used in rendering: Rows | Font name ---------------- 50 vga8 43 vga9 28 mda14 25 vga16 default vga16 Windowed OS/2 session: Only your imagination sets the limit! Fonts used in rendering: Rows | Font name ---------------- 50 vga8 43 vga9 28 mda14 25 vga16 default vga16 Where to find AA-lib ******************** Just join our mailing list: `aa-project-discuss@lists.sourceforge.net'. Or just browse our homepage at `http://aa-project.sourceforge.net'. A ton of examples of ascii-art generated by aalib, pointers to other AA-Project resources etc. What else? ========== For more info, see README & aalib.info. aalib-1.4.0/ANNOUNCE0000644000766200001440000000625607272031253007414 Why such library? ================= I vote for simplicity. There are many problems of various kinds with video cards, low frequency monitors, crashing graphical apps... AA-lib IS the solution. It works on a terminal of any kind, it is fast and portable, it gives to you standard API. It gives to your old hardware more power! Supports: dos (VGA + MDA), stdio, curses, slang, X11, gpm, linux-console, OS/2 What does this software do then ? ================================= AA-lib is a low level gfx library just as many other libraries are. The main difference is that AA-lib does not require graphics device. In fact, there is no graphical output possible. AA-lib replaces those old-fashioned output methods with powerful ascii-art renderer. Now my linux boots with a nice penguin logo at secondary display (yes! Like Win95 does:) AA-lib API is designed to be similar to other graphics libraries. Learning a new API would be a piece of cake! Where to find AA-lib ==================== Just join our mailing list: `aa-project-discuss@lists.sourceforge.net'. Or just browse our homepage at `http://aa-project.sourceforge.net'. A ton of examples of ascii-art generated by aalib, pointers to other AA-Project resources etc. How this all started ==================== Once upon a time we've (my friend Kamil and I) bought two old Herculeses as secondary monitors. We didn't know for that time that our Diamond Stealths 64 cards would become obsolete soon. The next day we downloaded the logo of Linux Texas Users Group - nice silly penguin looking like a cowboy! It was so exciting logo ... we decided that we couldn't live without it and we wanted to see it at boot time as a logo on our secondary monitors. There was a small problem - Hercules doesn't support color graphics. So we decided to convert the penguin image to ascii art using netpbm tools. The output was very ugly because the converting algorithm was absolutly stupid. During the night I designed a new convertor that used a font bitmap to creat an aproximation table. The output wasn't very good since the algorithm wasn't tuned so well. Many months this small piece of code was waiting on my disc for the day "D". Meanwhile I started a new project XaoS (a fractal zoomer) with my friend Thomas. And then I got an idea: Ascii Art Mandelbrots! I was really impressed by the result! XaoS was faster, portable and looking much better than ever before. I found a new way to go ... AA-Project ********** dT8 8Tb dT 8 8 Tb dT 8 8 Tb dT 8 8 Tb dT 8 8 Tb Three goals of AA-Project: 1. Port all important software (like Doom, Second Reality, X windows etc..) on AA-lib. 2. Port AA-lib on all available platforms (mainly ZX-Spectrum and Sharp). 3. Force IBM to start manufacturing MDA cards again. AA-project was started by Jan Hubicka. In that times just a few people knew about it. Then a new demo named BB has been relased to show the power of AA-lib technology. Now the project is freely available and anyone can help. aalib-1.4.0/aalib.lsm0000644000766200001440000000204007272031253010033 Begin3 Title: AA-lib - an ascii art library Version: 1.4 Entered-date: Apr 17 2001 Description: AA-lib is a low level gfx library just as many other libraries are. The main difference is that AA-lib does not require graphics device. In fact, there is no graphical output possible. AA-lib replaces those old-fashioned output methods with powerful ascii-art renderer. Now my linux boots with a nice penguin logo at secondary display (yes! Like Win95 does:) AA-lib API is designed to be similar to other graphics libraries. Learning a new API would be a piece of cake! Keywords: X11 ascii-art text cool art ironing cooking fire library c GNU Author: hubicka@freesoft.cz (Jan Hubicka) toman@artax.karlin.mff.cuni.cz (Kamil Toman) Maintained-by: hubicka@freesoft.cz (Jan Hubicka) Primary-site: ftp.debian.org /pub/sourceforge/aa-project/ aalib-1.4.tar.gz Platform: any UNIX with X11 with ansi-c compiler, Dos, stdio, GNU operating system Copying-policy: GNU LIBRARY GENERAL PUBLIC LICENSE End aalib-1.4.0/aalib.m40000644000766200001440000001422607272031253007571 # Configure paths for AALIB # Jan Hubicka 4/22/2001 # stolen from Sam Lantinga 9/21/99 # stolen from Manish Singh # stolen back from Frank Belew # stolen from Manish Singh # Shamelessly stolen from Owen Taylor dnl AM_PATH_AALIB([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) dnl Test for AALIB, and define AALIB_CFLAGS and AALIB_LIBS dnl AC_DEFUN(AM_PATH_AALIB, [dnl dnl Get the cflags and libraries from the aalib-config script dnl AC_ARG_WITH(aalib-prefix,[ --with-aalib-prefix=PFX Prefix where AALIB is installed (optional)], aalib_prefix="$withval", aalib_prefix="") AC_ARG_WITH(aalib-exec-prefix,[ --with-aalib-exec-prefix=PFX Exec prefix where AALIB is installed (optional)], aalib_exec_prefix="$withval", aalib_exec_prefix="") AC_ARG_ENABLE(aalibtest, [ --disable-aalibtest Do not try to compile and run a test AALIB program], , enable_aalibtest=yes) if test x$aalib_exec_prefix != x ; then aalib_args="$aalib_args --exec-prefix=$aalib_exec_prefix" if test x${AALIB_CONFIG+set} != xset ; then AALIB_CONFIG=$aalib_exec_prefix/bin/aalib-config fi fi if test x$aalib_prefix != x ; then aalib_args="$aalib_args --prefix=$aalib_prefix" if test x${AALIB_CONFIG+set} != xset ; then AALIB_CONFIG=$aalib_prefix/bin/aalib-config fi fi AC_PATH_PROG(AALIB_CONFIG, aalib-config, no) min_aalib_version=ifelse([$1], ,0.11.0,$1) AC_MSG_CHECKING(for AALIB - version >= $min_aalib_version) no_aalib="" if test "$AALIB_CONFIG" = "no" ; then no_aalib=yes else AALIB_CFLAGS=`$AALIB_CONFIG $aalibconf_args --cflags` AALIB_LIBS=`$AALIB_CONFIG $aalibconf_args --libs` aalib_major_version=`$AALIB_CONFIG $aalib_args --version | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` aalib_minor_version=`$AALIB_CONFIG $aalib_args --version | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` aalib_micro_version=`$AALIB_CONFIG $aalib_config_args --version | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` if test "x$enable_aalibtest" = "xyes" ; then ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $AALIB_CFLAGS" LIBS="$LIBS $AALIB_LIBS" dnl dnl Now check if the installed AALIB is sufficiently new. (Also sanity dnl checks the results of aalib-config to some extent dnl rm -f conf.aalibtest AC_TRY_RUN([ #include #include #include #include "aalib.h" char* my_strdup (char *str) { char *new_str; if (str) { new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char)); strcpy (new_str, str); } else new_str = NULL; return new_str; } int main (int argc, char *argv[]) { int major, minor, micro; char *tmp_version; /* This hangs on some systems (?) system ("touch conf.aalibtest"); */ { FILE *fp = fopen("conf.aalibtest", "a"); if ( fp ) fclose(fp); } /* HP/UX 9 (%@#!) writes to sscanf strings */ tmp_version = my_strdup("$min_aalib_version"); if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { printf("%s, bad version string\n", "$min_aalib_version"); exit(1); } if (($aalib_major_version > major) || (($aalib_major_version == major) && ($aalib_minor_version > minor)) || (($aalib_major_version == major) && ($aalib_minor_version == minor) && ($aalib_micro_version >= micro))) { return 0; } else { printf("\n*** 'aalib-config --version' returned %d.%d.%d, but the minimum version\n", $aalib_major_version, $aalib_minor_version, $aalib_micro_version); printf("*** of AALIB required is %d.%d.%d. If aalib-config is correct, then it is\n", major, minor, micro); printf("*** best to upgrade to the required version.\n"); printf("*** If aalib-config was wrong, set the environment variable AALIB_CONFIG\n"); printf("*** to point to the correct copy of aalib-config, and remove the file\n"); printf("*** config.cache before re-running configure\n"); return 1; } } ],, no_aalib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi if test "x$no_aalib" = x ; then AC_MSG_RESULT(yes) ifelse([$2], , :, [$2]) else AC_MSG_RESULT(no) if test "$AALIB_CONFIG" = "no" ; then echo "*** The aalib-config script installed by AALIB could not be found" echo "*** If AALIB was installed in PREFIX, make sure PREFIX/bin is in" echo "*** your path, or set the AALIB_CONFIG environment variable to the" echo "*** full path to aalib-config." else if test -f conf.aalibtest ; then : else echo "*** Could not run AALIB test program, checking why..." CFLAGS="$CFLAGS $AALIB_CFLAGS" LIBS="$LIBS $AALIB_LIBS" AC_TRY_LINK([ #include #include "AALIB.h" ], [ return 0; ], [ echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding AALIB or finding the wrong" echo "*** version of AALIB. If it is not finding AALIB, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" echo "*** to the installed location Also, make sure you have run ldconfig if that" echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"], [ echo "*** The test program failed to compile or link. See the file config.log for the" echo "*** exact error that occured. This usually means AALIB was incorrectly installed" echo "*** or that you have moved AALIB since it was installed. In the latter case, you" echo "*** may want to edit the aalib-config script: $AALIB_CONFIG" ]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi AALIB_CFLAGS="" AALIB_LIBS="" ifelse([$3], , :, [$3]) fi AC_SUBST(AALIB_CFLAGS) AC_SUBST(AALIB_LIBS) rm -f conf.aalibtest ]) aalib-1.4.0/src/0000777000766200001440000000000007272037665007142 5aalib-1.4.0/src/Makefile.in0000644000766200001440000003350407272037665011130 # 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@ AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_LIBS = @AALIB_LIBS@ AALIB_RLD_FLAGS = @AALIB_RLD_FLAGS@ AS = @AS@ CC = @CC@ DLLTOOL = @DLLTOOL@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ MAKEINFO = @MAKEINFO@ OBJDUMP = @OBJDUMP@ PACKAGE = @PACKAGE@ RANLIB = @RANLIB@ VERSION = @VERSION@ XCURSES = @XCURSES@ machine = @machine@ system = @system@ AUTOMAKE_OPTIONS = foreign #include-deps EXTRA_DIST = config.dos config.os2 Makefile.dos Makefile.os2 aados.c aadoskbd.c aadosmou.c aaos2.c aaos2kbd.c aaos2mou.c aaint.h aamktabl.h aaxint.h toc.c lib_LTLIBRARIES = libaa.la libaa_la_SOURCES = aafont.c aafonts.c aavyhen.c aamktabl.c aamem.c aaprintf.c aahelp.c aaslnkbd.c aaslang.c aafastre.c aalinux.c aalinuxkbd.c aax.c aaxkbd.c aaxmouse.c fontgl.c font16.c font14.c fontx16.c fontx13.c fontx13b.c fontcour.c aarec.c font9.c font8.c fontline.c aacurses.c aacurkbd.c aacurmou.c aalib.c aaflush.c aarender.c aaout.c aain.c aaedit.c aaregist.c aakbdreg.c aagpm.c aamoureg.c aasave.c aastdout.c aastdin.c aaparse.c aaimgwidth.c aaimgheight.c aascrwidth.c aascrheight.c aammwidth.c aammheight.c aaimage.c aatext.c aacurrfnt.c aaattrs.c aaputpixel.c aarecfunc.c libaa_la_LDFLAGS = @LDFLAGS@ -version-info 1:4:0 bin_PROGRAMS = aainfo aatest aafire aasavefont aainfo_LDADD = libaa.la aainfo_LDFLAGS = @LDFLAGS@ aatest_LDADD = libaa.la aatest_LDFLAGS = @LDFLAGS@ aafire_LDADD = libaa.la aafire_LDFLAGS = @LDFLAGS@ aasavefont_LDADD = libaa.la aasavefont_LDFLAGS = @LDFLAGS@ include_HEADERS = aalib.h mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = LTLIBRARIES = $(lib_LTLIBRARIES) 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@ libaa_la_LIBADD = libaa_la_OBJECTS = aafont.lo aafonts.lo aavyhen.lo aamktabl.lo aamem.lo \ aaprintf.lo aahelp.lo aaslnkbd.lo aaslang.lo aafastre.lo aalinux.lo \ aalinuxkbd.lo aax.lo aaxkbd.lo aaxmouse.lo fontgl.lo font16.lo \ font14.lo fontx16.lo fontx13.lo fontx13b.lo fontcour.lo aarec.lo \ font9.lo font8.lo fontline.lo aacurses.lo aacurkbd.lo aacurmou.lo \ aalib.lo aaflush.lo aarender.lo aaout.lo aain.lo aaedit.lo aaregist.lo \ aakbdreg.lo aagpm.lo aamoureg.lo aasave.lo aastdout.lo aastdin.lo \ aaparse.lo aaimgwidth.lo aaimgheight.lo aascrwidth.lo aascrheight.lo \ aammwidth.lo aammheight.lo aaimage.lo aatext.lo aacurrfnt.lo aaattrs.lo \ aaputpixel.lo aarecfunc.lo PROGRAMS = $(bin_PROGRAMS) aainfo_SOURCES = aainfo.c aainfo_OBJECTS = aainfo.o aainfo_DEPENDENCIES = libaa.la aatest_SOURCES = aatest.c aatest_OBJECTS = aatest.o aatest_DEPENDENCIES = libaa.la aafire_SOURCES = aafire.c aafire_OBJECTS = aafire.o aafire_DEPENDENCIES = libaa.la aasavefont_SOURCES = aasavefont.c aasavefont_OBJECTS = aasavefont.o aasavefont_DEPENDENCIES = libaa.la 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 $@ HEADERS = $(include_HEADERS) DIST_COMMON = ./stamp-h.in Makefile.am Makefile.in config.h.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) TAR = tar GZIP_ENV = --best SOURCES = $(libaa_la_SOURCES) aainfo.c aatest.c aafire.c aasavefont.c OBJECTS = $(libaa_la_OBJECTS) aainfo.o aatest.o aafire.o aasavefont.o 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 --include-deps src/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status 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=src/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) 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: 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: libaa.la: $(libaa_la_OBJECTS) $(libaa_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(libaa_la_LDFLAGS) $(libaa_la_OBJECTS) $(libaa_la_LIBADD) $(LIBS) mostlyclean-binPROGRAMS: clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) distclean-binPROGRAMS: maintainer-clean-binPROGRAMS: install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(bindir) @list='$(bin_PROGRAMS)'; for p in $$list; do \ if test -f $$p; then \ echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ else :; fi; \ done 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 aainfo: $(aainfo_OBJECTS) $(aainfo_DEPENDENCIES) @rm -f aainfo $(LINK) $(aainfo_LDFLAGS) $(aainfo_OBJECTS) $(aainfo_LDADD) $(LIBS) aatest: $(aatest_OBJECTS) $(aatest_DEPENDENCIES) @rm -f aatest $(LINK) $(aatest_LDFLAGS) $(aatest_OBJECTS) $(aatest_LDADD) $(LIBS) aafire: $(aafire_OBJECTS) $(aafire_DEPENDENCIES) @rm -f aafire $(LINK) $(aafire_LDFLAGS) $(aafire_OBJECTS) $(aafire_LDADD) $(LIBS) aasavefont: $(aasavefont_OBJECTS) $(aasavefont_DEPENDENCIES) @rm -f aasavefont $(LINK) $(aasavefont_LDFLAGS) $(aasavefont_OBJECTS) $(aasavefont_LDADD) $(LIBS) install-includeHEADERS: $(include_HEADERS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(includedir) @list='$(include_HEADERS)'; for p in $$list; do \ if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \ echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(includedir)/$$p"; \ $(INSTALL_DATA) $$d$$p $(DESTDIR)$(includedir)/$$p; \ done uninstall-includeHEADERS: @$(NORMAL_UNINSTALL) list='$(include_HEADERS)'; for p in $$list; do \ rm -f $(DESTDIR)$(includedir)/$$p; \ done tags: TAGS ID: $(HEADERS) $(SOURCES) $(LISP) list='$(SOURCES) $(HEADERS)'; \ unique=`for i in $$list; do echo $$i; done | \ awk ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ here=`pwd` && cd $(srcdir) \ && mkid -f$$here/ID $$unique $(LISP) TAGS: $(HEADERS) $(SOURCES) config.h.in $(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)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 = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) subdir = src distdir: $(DISTFILES) @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ cp -pr $$d/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ || cp -p $$d/$$file $(distdir)/$$file || :; \ fi; \ done aacurkbd.lo aacurkbd.o : aacurkbd.c config.h aalib.h aaint.h aafire.o: aafire.c aalib.h aaslnkbd.lo aaslnkbd.o : aaslnkbd.c config.h info-am: info: info-am dvi-am: dvi: dvi-am check-am: all-am check: check-am installcheck-am: installcheck: installcheck-am all-recursive-am: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive 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) config.h all-redirect: all-am install-strip: $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install installdirs: $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(bindir) \ $(DESTDIR)$(includedir) mostlyclean-generic: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) -rm -f config.cache config.log stamp-h stamp-h[0-9]* maintainer-clean-generic: mostlyclean-am: mostlyclean-hdr mostlyclean-libLTLIBRARIES \ mostlyclean-compile mostlyclean-libtool \ mostlyclean-binPROGRAMS mostlyclean-tags \ mostlyclean-generic mostlyclean: mostlyclean-am clean-am: clean-hdr clean-libLTLIBRARIES clean-compile clean-libtool \ clean-binPROGRAMS clean-tags clean-generic \ mostlyclean-am clean: clean-am distclean-am: distclean-hdr distclean-libLTLIBRARIES distclean-compile \ distclean-libtool distclean-binPROGRAMS distclean-tags \ distclean-generic clean-am -rm -f libtool distclean: distclean-am maintainer-clean-am: maintainer-clean-hdr \ maintainer-clean-libLTLIBRARIES \ maintainer-clean-compile maintainer-clean-libtool \ maintainer-clean-binPROGRAMS 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-hdr distclean-hdr clean-hdr maintainer-clean-hdr \ 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 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 all-recursive-am install-exec-am install-exec \ install-data-am install-data install-am install uninstall-am uninstall \ all-redirect all-am all installdirs mostlyclean-generic \ distclean-generic clean-generic maintainer-clean-generic clean \ mostlyclean distclean maintainer-clean # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: aalib-1.4.0/src/stamp-h.in0000644000766200001440000000001207272034667010747 timestamp aalib-1.4.0/src/Makefile.am0000644000766200001440000000313207272031253011074 AUTOMAKE_OPTIONS = foreign #include-deps EXTRA_DIST = config.dos config.os2 Makefile.dos Makefile.os2 aados.c aadoskbd.c aadosmou.c aaos2.c aaos2kbd.c aaos2mou.c aaint.h aamktabl.h aaxint.h toc.c lib_LTLIBRARIES=libaa.la libaa_la_SOURCES= \ aafont.c \ aafonts.c \ aavyhen.c \ aamktabl.c \ aamem.c \ aaprintf.c \ aahelp.c \ aaslnkbd.c \ aaslang.c \ aafastre.c \ aalinux.c \ aalinuxkbd.c \ aax.c \ aaxkbd.c \ aaxmouse.c \ fontgl.c \ font16.c \ font14.c \ fontx16.c \ fontx13.c \ fontx13b.c \ fontcour.c \ aarec.c \ font9.c \ font8.c \ fontline.c \ aacurses.c \ aacurkbd.c \ aacurmou.c \ aalib.c \ aaflush.c \ aarender.c \ aaout.c \ aain.c \ aaedit.c \ aaregist.c \ aakbdreg.c \ aagpm.c \ aamoureg.c \ aasave.c \ aastdout.c \ aastdin.c \ aaparse.c \ aaimgwidth.c \ aaimgheight.c \ aascrwidth.c \ aascrheight.c \ aammwidth.c \ aammheight.c \ aaimage.c \ aatext.c \ aacurrfnt.c \ aaattrs.c \ aaputpixel.c \ aarecfunc.c libaa_la_LDFLAGS=@LDFLAGS@ -version-info 1:4:0 bin_PROGRAMS=aainfo aatest aafire aasavefont aainfo_LDADD= libaa.la aainfo_LDFLAGS= @LDFLAGS@ aatest_LDADD= libaa.la aatest_LDFLAGS= @LDFLAGS@ aafire_LDADD= libaa.la aafire_LDFLAGS= @LDFLAGS@ aasavefont_LDADD= libaa.la aasavefont_LDFLAGS= @LDFLAGS@ include_HEADERS=aalib.h aalib-1.4.0/src/config.h.in0000644000766200001440000000416307272031253011070 /* src/config.h.in. Generated automatically from configure.in by autoheader. */ /* Define if your struct stat has st_rdev. */ #undef HAVE_ST_RDEV /* Define as the return type of signal handlers (int or void). */ #undef RETSIGTYPE /* Define if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define if you can safely include both and . */ #undef TIME_WITH_SYS_TIME /* Define if the X Window System is missing or not being used. */ #undef X_DISPLAY_MISSING #undef CURSES_DRIVER #undef X11_DRIVER #undef SLANG_DRIVER #undef LINUX_DRIVER #undef CURSES_KBDDRIVER #undef X11_KBDDRIVER #undef SLANG_KBDDRIVER #undef LINUX_KBDDRIVER #undef CURSES_MOUSEDRIVER #undef GPM_MOUSEDRIVER #undef X11_MOUSEDRIVER #undef PACKAGE #undef VERSION #undef SUNOS_CURSES #undef NO_COLOR_SUPPORT #undef USE_CURSES #undef USE_NCURSES #undef USE_SYSV_CURSES /* Define if you have the curs_set function. */ #undef HAVE_CURS_SET /* Define if you have the mousemask function. */ #undef HAVE_MOUSEMASK /* Define if you have the redrawwin function. */ #undef HAVE_REDRAWWIN /* Define if you have the strdup function. */ #undef HAVE_STRDUP /* Define if you have the termattrs function. */ #undef HAVE_TERMATTRS /* Define if you have the wredrawln function. */ #undef HAVE_WREDRAWLN /* Define if you have the header file. */ #undef HAVE_FCNTL_H /* Define if you have the header file. */ #undef HAVE_LIMITS_H /* Define if you have the header file. */ #undef HAVE_MALLOC_H /* Define if you have the header file. */ #undef HAVE_SYS_IOCTL_H /* Define if you have the header file. */ #undef HAVE_SYS_TIME_H /* Define if you have the header file. */ #undef HAVE_UNISTD_H /* Define if you have the curses library (-lcurses). */ #undef HAVE_LIBCURSES /* Define if you have the m library (-lm). */ #undef HAVE_LIBM /* Define if you have the ncurses library (-lncurses). */ #undef HAVE_LIBNCURSES /* Define if you have the slang library (-lslang). */ #undef HAVE_LIBSLANG /* Name of package */ #undef PACKAGE /* Version number of package */ #undef VERSION aalib-1.4.0/src/aafont.c0000644000766200001440000001022107272031253010451 #include #include #include "config.h" #include "aalib.h" #include "aaint.h" static double DIMC,CONSTANT; #define isset(n,i) (((i)&1<<(n))!=0) #define canset(n,i) (!isset(n,i)&&isset(n-1,i)) #define MUL 8 __AA_CONST static struct aa_font *currfont; static void values(int c, int *v1, int *v2, int *v3, int *v4) { int i; int attr = c / 256; unsigned const char *font; font = currfont->data; font = currfont->data; c = c % 256; c = c * currfont->height; *v1 = 0; *v2 = 0; *v3 = 0; *v4 = 0; for (i = 0; i < currfont->height / 2; i++) { *v1 += (isset(0, font[c + i]) + isset(1, font[c + i]) + isset(2, font[c + i]) + isset(3, font[c + i])); *v2 += (isset(4, font[c + i]) + isset(5, font[c + i]) + isset(6, font[c + i]) + isset(7, font[c + i])); } for (; i < currfont->height; i++) { *v3 += (isset(0, font[c + i]) + isset(1, font[c + i]) + isset(2, font[c + i]) + isset(3, font[c + i])); *v4 += (isset(4, font[c + i]) + isset(5, font[c + i]) + isset(6, font[c + i]) + isset(7, font[c + i])); } (*v1) *= MUL; (*v2) *= MUL; (*v3) *= MUL; (*v4) *= MUL; switch (attr) { case AA_REVERSE: *v1 = currfont->height * 2 * MUL - *v1; *v2 = currfont->height * 2 * MUL - *v2; *v3 = currfont->height * 2 * MUL - *v3; *v4 = currfont->height * 2 * MUL - *v4; break; case AA_DIM: *v1 = (*v1 + 1) / DIMC; *v2 = (*v2 + 1) / DIMC; *v3 = (*v3 + 1) / DIMC; *v4 = (*v4 + 1) / DIMC; break; case AA_BOLD: *v1 = *v1 * CONSTANT; *v2 = *v2 * CONSTANT; *v3 = *v3 * CONSTANT; *v4 = *v4 * CONSTANT; break; case AA_BOLDFONT: for (i = 0; i < currfont->height / 2; i++) { *v1 += ((isset(0, font[c + i]) + canset(1, font[c + i]) + canset(2, font[c + i]) + canset(3, font[c + i]))) * MUL; *v2 += ((isset(4, font[c + i]) + canset(5, font[c + i]) + canset(6, font[c + i]) + canset(7, font[c + i]))) * MUL; } for (; i < currfont->height; i++) { *v3 += ((isset(0, font[c + i]) + canset(1, font[c + i]) + canset(2, font[c + i]) + canset(3, font[c + i]))) * MUL; *v4 += ((isset(4, font[c + i]) + canset(5, font[c + i]) + canset(6, font[c + i]) + canset(7, font[c + i]))) * MUL; } } } void __aa_calcparams(__AA_CONST struct aa_font *font, struct parameters *parameters, int supported,double dimmul, double boldmul) { int i; int ma1 = 0, ma2 = 0, ma3 = 0, ma4 = 0, msum = 0; int mi1 = 50000, mi2 = 50000, mi3 = 50000, mi4 = 50000, misum = 50000; int v1, v2, v3, v4, sum; DIMC=dimmul; CONSTANT=boldmul; currfont = font; for (i = 0; i < NCHARS; i++) { if (!ALOWED(i, supported)) continue; values(i, &v1, &v2, &v3, &v4); if (v1 > ma1) ma1 = v1; if (v2 > ma2) ma2 = v2; if (v3 > ma3) ma3 = v3; if (v4 > ma4) ma4 = v4; if (v1 + v2 + v3 + v4 > msum) msum = v1 + v2 + v3 + v4; if (v1 < mi1) mi1 = v1; if (v2 < mi2) mi2 = v2; if (v3 < mi3) mi3 = v3; if (v4 < mi4) mi4 = v4; if (v1 + v2 + v3 + v4 < misum) misum = v1 + v2 + v3 + v4; } msum -= misum; #if 0 ma1 -= mi1; ma2 -= mi2; ma3 -= mi3; ma4 -= mi4; #else mi1 = misum / 4; mi2 = misum / 4; mi3 = misum / 4; mi4 = misum / 4; ma1 = msum / 4; ma2 = msum / 4; ma3 = msum / 4; ma4 = msum / 4; #endif for (i = 0; i < NCHARS; i++) { if (!ALOWED1(i, supported)) continue; values(i, &v1, &v2, &v3, &v4); sum = ((double) (v1 + v2 + v3 + v4 - misum) * (1020 / (double) msum) + 0.5); v1 = ((double) (v1 - mi1) * (255 / (double) ma1) + 0.5); v2 = ((double) (v2 - mi2) * (255 / (double) ma2) + 0.5); v3 = ((double) (v3 - mi3) * (255 / (double) ma3) + 0.5); v4 = ((double) (v4 - mi4) * (255 / (double) ma4) + 0.5); #if 0 sum = v1 + v2 + v3 + v4; #endif if (v1 > 255) v1 = 255; if (v2 > 255) v2 = 255; if (v3 > 255) v3 = 255; if (v4 > 255) v4 = 255; if (v1 < 0) v1 = 0; if (v2 < 0) v2 = 0; if (v3 < 0) v3 = 0; if (v4 < 0) v4 = 0; parameters[i].p[0] = v1; parameters[i].p[1] = v2; parameters[i].p[2] = v3; parameters[i].p[3] = v4; parameters[i].p[4] = sum; } } aalib-1.4.0/src/aafonts.c0000644000766200001440000000106607272031253010643 #include #include "config.h" #include "aalib.h" #include "aaint.h" #define MAXFONTS 246 __AA_CONST struct aa_font *aa_fonts[MAXFONTS + 1] = { #ifdef VYHEN_SUPPORT &aa_fontvyhen, #endif &aa_font8, &aa_font9, &aa_font14, &aa_font16, &aa_fontX13, &aa_fontX13B, &aa_fontX16, &aa_fontline, &aa_fontgl, &aa_fontcourier, NULL }; int aa_registerfont(__AA_CONST struct aa_font *f) { int i; for (i = 0; i < MAXFONTS && aa_fonts[i] != NULL; i++); if (i == MAXFONTS) return 0; aa_fonts[i] = f; aa_fonts[i + 1] = 0; return (1); } aalib-1.4.0/src/aavyhen.c0000644000766200001440000006606207272031253010652 #ifdef VYHEN_SUPPORT #include "aalib.h" __AA_CONST static char FONT_DATA [] = { 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7e, 0x81, 0xa5, 0x81, 0x81, 0xbd, 0x99, 0x81, 0x81, 0x7e, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7e, 0xff, 0xdb, 0xff, 0xff, 0xc3, 0xe7, 0xff, 0xff, 0x7e, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x6c, 0xfe, 0xfe, 0xfe, 0xfe, 0x7c, 0x38, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x10, 0x38, 0x7c, 0xfe, 0x7c, 0x38, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x18, 0x3c, 0x3c, 0xe7, 0xe7, 0xe7, 0x18, 0x18, 0x3c, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x18, 0x3c, 0x7e, 0xff, 0xff, 0x7e, 0x18, 0x18, 0x3c, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x18, 0x3c, 0x3c, 0x18, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe7, 0xc3, 0xc3, 0xe7, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3c, 0x66, 0x42, 0x42, 0x66, 0x3c, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc3, 0x99, 0xbd, 0xbd, 0x99, 0xc3, 0xff, 0xff, 0xff, 0x0, 0x0, 0x1e, 0xe, 0x1a, 0x1a, 0x30, 0x78, 0xcc, 0xcc, 0xcc, 0xcc, 0x78, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3c, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x18, 0x7e, 0x18, 0x18, 0x0, 0x0, 0x0, 0x0, 0x3f, 0x33, 0x33, 0x3f, 0x30, 0x30, 0x30, 0x30, 0x70, 0xf0, 0xe0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7f, 0x63, 0x7f, 0x63, 0x63, 0x63, 0x63, 0x67, 0xe7, 0xe6, 0xc0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x10, 0x92, 0x54, 0x38, 0xee, 0x38, 0x54, 0x92, 0x10, 0x0, 0x0, 0x0, 0x0, 0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc, 0xfe, 0xfc, 0xf8, 0xf0, 0xe0, 0xc0, 0x80, 0x0, 0x0, 0x0, 0x2, 0x6, 0xe, 0x1e, 0x3e, 0x7e, 0xfe, 0x7e, 0x3e, 0x1e, 0xe, 0x6, 0x2, 0x0, 0x0, 0x0, 0x0, 0x18, 0x3c, 0x7e, 0x18, 0x18, 0x18, 0x18, 0x18, 0x7e, 0x3c, 0x18, 0x0, 0x0, 0x0, 0x0, 0x0, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x0, 0x66, 0x66, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7f, 0xdb, 0xdb, 0xdb, 0xdb, 0x7b, 0x1b, 0x1b, 0x1b, 0x1b, 0x1b, 0x0, 0x0, 0x0, 0x0, 0x7c, 0xc6, 0x60, 0x38, 0x6c, 0xc6, 0xc6, 0x6c, 0x38, 0xc, 0xc6, 0x7c, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0x0, 0x0, 0x0, 0x0, 0x0, 0x18, 0x3c, 0x7e, 0x18, 0x18, 0x18, 0x18, 0x7e, 0x3c, 0x18, 0x7e, 0x0, 0x0, 0x0, 0x0, 0x0, 0x18, 0x3c, 0x7e, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x0, 0x0, 0x0, 0x0, 0x0, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x7e, 0x3c, 0x18, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x30, 0x18, 0xc, 0xfe, 0xc, 0x18, 0x30, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x18, 0x30, 0x60, 0xfe, 0x60, 0x30, 0x18, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc0, 0xc0, 0xc0, 0xfe, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x28, 0x6c, 0xfe, 0x6c, 0x28, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x10, 0x38, 0x38, 0x7c, 0x7c, 0xfe, 0xfe, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xfe, 0xfe, 0x7c, 0x7c, 0x38, 0x38, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x18, 0x3c, 0x3c, 0x3c, 0x3c, 0x18, 0x18, 0x18, 0x0, 0x18, 0x18, 0x0, 0x0, 0x0, 0x0, 0x66, 0x66, 0x66, 0x24, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x6c, 0x6c, 0xfe, 0x6c, 0x6c, 0x6c, 0xfe, 0x6c, 0x6c, 0x0, 0x0, 0x0, 0x0, 0x0, 0x18, 0x18, 0x7c, 0xc6, 0xc2, 0xc0, 0x7c, 0x6, 0x6, 0x86, 0xc6, 0x7c, 0x18, 0x18, 0x0, 0x0, 0x0, 0x0, 0xcc, 0xcc, 0x18, 0x18, 0x30, 0x30, 0x60, 0x60, 0xcc, 0xcc, 0x0, 0x0, 0x0, 0x0, 0x0, 0x38, 0x6c, 0x6c, 0x6c, 0x38, 0x76, 0xdc, 0xcc, 0xcc, 0xcc, 0x76, 0x0, 0x0, 0x0, 0x0, 0x30, 0x30, 0x30, 0x60, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc, 0x18, 0x18, 0x30, 0x30, 0x30, 0x30, 0x30, 0x18, 0x18, 0xc, 0x0, 0x0, 0x0, 0x0, 0x0, 0x30, 0x18, 0x18, 0xc, 0xc, 0xc, 0xc, 0xc, 0x18, 0x18, 0x30, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x44, 0x6c, 0x38, 0xfe, 0x38, 0x6c, 0x44, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x10, 0x10, 0x10, 0xfe, 0x10, 0x10, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x18, 0x18, 0x18, 0x30, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xfe, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x18, 0x18, 0x0, 0x0, 0x0, 0x0, 0x0, 0x6, 0xc, 0xc, 0x18, 0x18, 0x30, 0x30, 0x60, 0x60, 0xc0, 0xc0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x38, 0x6c, 0xc6, 0xc6, 0xc6, 0xd6, 0xc6, 0xc6, 0xc6, 0x6c, 0x38, 0x0, 0x0, 0x0, 0x0, 0x0, 0x18, 0x38, 0x78, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x7e, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7c, 0xc6, 0xc6, 0x6, 0xc, 0x18, 0x30, 0x60, 0xc0, 0xc6, 0xfe, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7c, 0xc6, 0x86, 0x6, 0x6, 0x3c, 0x6, 0x6, 0x86, 0xc6, 0x7c, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1c, 0x3c, 0x3c, 0x6c, 0x6c, 0xcc, 0xcc, 0xfe, 0xc, 0xc, 0x1e, 0x0, 0x0, 0x0, 0x0, 0x0, 0xfe, 0xc0, 0xc0, 0xfc, 0x86, 0x6, 0x6, 0x6, 0xc6, 0xc6, 0x7c, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3c, 0x60, 0xc0, 0xc0, 0xfc, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x0, 0x0, 0x0, 0x0, 0x0, 0xfe, 0xc6, 0x6, 0x6, 0xc, 0x18, 0x18, 0x30, 0x30, 0x30, 0x30, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7e, 0x6, 0x6, 0xc, 0x78, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x18, 0x18, 0x0, 0x0, 0x0, 0x18, 0x18, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x18, 0x18, 0x0, 0x0, 0x0, 0x18, 0x18, 0x18, 0x30, 0x0, 0x0, 0x0, 0x0, 0x0, 0x6, 0xc, 0x18, 0x30, 0x60, 0x30, 0x18, 0xc, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7e, 0x0, 0x0, 0x0, 0x7e, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x60, 0x30, 0x18, 0xc, 0x6, 0xc, 0x18, 0x30, 0x60, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7c, 0xc6, 0xc6, 0x6, 0xc, 0x18, 0x18, 0x18, 0x0, 0x18, 0x18, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7c, 0xc6, 0xc6, 0xc6, 0xde, 0xde, 0xde, 0xdc, 0xc0, 0xc0, 0x7c, 0x0, 0x0, 0x0, 0x0, 0x0, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0x0, 0x0, 0x0, 0x0, 0x0, 0xfc, 0x66, 0x66, 0x66, 0x66, 0x7c, 0x66, 0x66, 0x66, 0x66, 0xfc, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3a, 0x66, 0xc2, 0xc2, 0xc0, 0xc0, 0xc0, 0xc0, 0xc2, 0x66, 0x3c, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x6c, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x6c, 0xf8, 0x0, 0x0, 0x0, 0x0, 0x0, 0xfe, 0x66, 0x62, 0x60, 0x68, 0x78, 0x68, 0x60, 0x62, 0x66, 0xfe, 0x0, 0x0, 0x0, 0x0, 0x0, 0xfe, 0x66, 0x62, 0x60, 0x68, 0x78, 0x68, 0x60, 0x60, 0x60, 0xf0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3c, 0x66, 0xc2, 0xc0, 0xc0, 0xc0, 0xde, 0xc6, 0xc6, 0x66, 0x3a, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1e, 0xc, 0xc, 0xc, 0xc, 0xc, 0xc, 0xcc, 0xcc, 0xcc, 0x78, 0x0, 0x0, 0x0, 0x0, 0x0, 0xe6, 0x66, 0x6c, 0x6c, 0x78, 0x70, 0x78, 0x6c, 0x6c, 0x66, 0xe6, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf0, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x62, 0x66, 0xfe, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc6, 0xc6, 0xee, 0xfe, 0xfe, 0xd6, 0xd6, 0xc6, 0xc6, 0xc6, 0xc6, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc6, 0xc6, 0xe6, 0xe6, 0xf6, 0xd6, 0xde, 0xce, 0xce, 0xc6, 0xc6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x0, 0x0, 0x0, 0x0, 0x0, 0xfc, 0x66, 0x66, 0x66, 0x66, 0x7c, 0x60, 0x60, 0x60, 0x60, 0xf0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xd6, 0xde, 0x7c, 0xc, 0xe, 0x0, 0x0, 0x0, 0xfc, 0x66, 0x66, 0x66, 0x66, 0x7c, 0x78, 0x6c, 0x6c, 0x66, 0xe6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7c, 0xc6, 0xc6, 0xc0, 0x60, 0x38, 0xc, 0x6, 0xc6, 0xc6, 0x7c, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7e, 0x7e, 0x5a, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x6c, 0x6c, 0x28, 0x38, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc6, 0xc6, 0xc6, 0xc6, 0xd6, 0xd6, 0xd6, 0xfe, 0xfe, 0x6c, 0x44, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc6, 0xc6, 0x6c, 0x7c, 0x38, 0x10, 0x38, 0x7c, 0x6c, 0xc6, 0xc6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x0, 0x0, 0x0, 0x0, 0x0, 0xfe, 0xc6, 0x86, 0xc, 0x18, 0x30, 0x60, 0xc0, 0xc2, 0xc6, 0xfe, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3c, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x3c, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc0, 0x60, 0x60, 0x30, 0x30, 0x18, 0x18, 0xc, 0xc, 0x6, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3c, 0xc, 0xc, 0xc, 0xc, 0xc, 0xc, 0xc, 0xc, 0xc, 0x3c, 0x0, 0x0, 0x0, 0x0, 0x0, 0x10, 0x38, 0x6c, 0xc6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0x0, 0x0, 0x30, 0x18, 0xc, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x78, 0xc, 0xc, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x0, 0x0, 0x0, 0x0, 0x0, 0xe0, 0x60, 0x60, 0x78, 0x6c, 0x66, 0x66, 0x66, 0x66, 0x66, 0xdc, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7c, 0xc6, 0xc2, 0xc0, 0xc0, 0xc0, 0xc6, 0x7c, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1c, 0xc, 0xc, 0x3c, 0x6c, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7c, 0xc6, 0xc6, 0xfe, 0xc0, 0xc0, 0xc6, 0x7c, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1c, 0x36, 0x32, 0x30, 0x78, 0x30, 0x30, 0x30, 0x30, 0x30, 0x78, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x76, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x7c, 0xc, 0x78, 0x0, 0x0, 0x0, 0xe0, 0x60, 0x60, 0x6c, 0x76, 0x66, 0x66, 0x66, 0x66, 0x66, 0xe6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x18, 0x18, 0x0, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x0, 0x0, 0x0, 0x0, 0x0, 0x6, 0x6, 0x0, 0xe, 0x6, 0x6, 0x6, 0x6, 0x6, 0x6, 0x6, 0x66, 0x3c, 0x0, 0x0, 0x0, 0xe0, 0x60, 0x60, 0x66, 0x66, 0x6c, 0x78, 0x78, 0x6c, 0x66, 0xe6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xec, 0xfe, 0xd6, 0xd6, 0xd6, 0xd6, 0xc6, 0xc6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xdc, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xdc, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x7c, 0x60, 0xf0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x76, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x7c, 0xc, 0x1e, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xdc, 0x76, 0x66, 0x60, 0x60, 0x60, 0x60, 0xf0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7c, 0xc6, 0xc0, 0x70, 0x1c, 0x6, 0xc6, 0x7c, 0x0, 0x0, 0x0, 0x0, 0x0, 0x10, 0x30, 0x30, 0xfc, 0x30, 0x30, 0x30, 0x30, 0x30, 0x36, 0x1c, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc6, 0xc6, 0xc6, 0x6c, 0x6c, 0x38, 0x38, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc6, 0xc6, 0xd6, 0xd6, 0xd6, 0xfe, 0x6c, 0x6c, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc6, 0xc6, 0x6c, 0x38, 0x38, 0x6c, 0xc6, 0xc6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7e, 0x6, 0xfc, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xfe, 0xc6, 0xc, 0x18, 0x30, 0x60, 0xc6, 0xfe, 0x0, 0x0, 0x0, 0x0, 0x0, 0xe, 0x18, 0x18, 0x18, 0x30, 0x70, 0x30, 0x18, 0x18, 0x18, 0xe, 0x0, 0x0, 0x0, 0x0, 0x0, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x0, 0x0, 0x0, 0x0, 0x0, 0x70, 0x18, 0x18, 0x18, 0xc, 0xe, 0xc, 0x18, 0x18, 0x18, 0x70, 0x0, 0x0, 0x0, 0x0, 0x76, 0xdc, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xc6, 0xfe, 0x0, 0x0, 0x0, 0x44, 0x38, 0x0, 0x3a, 0x66, 0xc2, 0xc2, 0xc0, 0xc0, 0xc0, 0xc0, 0xc2, 0x66, 0x3c, 0x0, 0x0, 0x0, 0x0, 0x0, 0xcc, 0x0, 0x0, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x0, 0x0, 0x0, 0x0, 0x6, 0xc, 0x18, 0x0, 0x7c, 0xc6, 0xc6, 0xfe, 0xc0, 0xc0, 0xc6, 0x7c, 0x0, 0x0, 0x12, 0xc, 0x0, 0x1c, 0xc, 0xc, 0x3c, 0x6c, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x0, 0x0, 0x0, 0x0, 0x0, 0xcc, 0x0, 0x0, 0x78, 0xc, 0xc, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x0, 0x0, 0x88, 0x70, 0x0, 0xf8, 0x6c, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x6c, 0xf8, 0x0, 0x0, 0x24, 0x18, 0x0, 0x7e, 0x7e, 0x5a, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x0, 0x0, 0x0, 0x0, 0x0, 0x44, 0x38, 0x0, 0x7c, 0xc6, 0xc2, 0xc0, 0xc0, 0xc0, 0xc6, 0x7c, 0x0, 0x0, 0x0, 0x0, 0x0, 0x44, 0x38, 0x0, 0x7c, 0xc6, 0xc6, 0xfe, 0xc0, 0xc0, 0xc6, 0x7c, 0x0, 0x0, 0x44, 0x38, 0x0, 0xfe, 0x66, 0x62, 0x60, 0x68, 0x78, 0x68, 0x60, 0x62, 0x66, 0xfe, 0x0, 0x0, 0x1, 0x3, 0x6, 0xf0, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x62, 0x66, 0xfe, 0x0, 0x0, 0xc, 0x18, 0x0, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x0, 0x0, 0x0, 0x0, 0x3, 0x39, 0x19, 0x1a, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x0, 0x0, 0xc, 0x18, 0x0, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x0, 0x0, 0x0, 0xc6, 0x0, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0x0, 0x0, 0x6, 0xc, 0x0, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0x0, 0x0, 0x6, 0xc, 0x0, 0xfe, 0x66, 0x62, 0x60, 0x68, 0x78, 0x68, 0x60, 0x62, 0x66, 0xfe, 0x0, 0x0, 0x0, 0x0, 0x0, 0x44, 0x38, 0x0, 0xfe, 0xc6, 0xc, 0x18, 0x30, 0x60, 0xc6, 0xfe, 0x0, 0x0, 0x44, 0x38, 0x0, 0xfe, 0xc6, 0x86, 0xc, 0x18, 0x30, 0x60, 0xc0, 0xc2, 0xc6, 0xfe, 0x0, 0x0, 0x0, 0x0, 0x10, 0x38, 0x6c, 0x0, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc6, 0x0, 0x0, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x0, 0x0, 0x6, 0xc, 0x0, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x0, 0x0, 0x0, 0x0, 0x38, 0x44, 0x38, 0x0, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x0, 0x0, 0x6, 0xc, 0x0, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x0, 0x0, 0x0, 0x0, 0x6, 0xc, 0x18, 0x0, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7e, 0x6, 0xfc, 0x0, 0xc6, 0x0, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x0, 0x0, 0x0, 0xc6, 0x0, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x0, 0x0, 0x44, 0x38, 0x0, 0x7c, 0xc6, 0xc6, 0xc0, 0x60, 0x38, 0xc, 0x6, 0xc6, 0xc6, 0x7c, 0x0, 0x0, 0x0, 0x0, 0x6, 0xf2, 0x62, 0x64, 0x60, 0x60, 0x60, 0x60, 0x60, 0x62, 0x66, 0xfe, 0x0, 0x0, 0x6, 0xc, 0x0, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x0, 0x0, 0x44, 0x38, 0x0, 0xfc, 0x66, 0x66, 0x66, 0x66, 0x7c, 0x78, 0x6c, 0x6c, 0x66, 0xe6, 0x0, 0x0, 0x0, 0x6, 0x2, 0x32, 0x34, 0x30, 0xfc, 0x30, 0x30, 0x30, 0x30, 0x30, 0x36, 0x1c, 0x0, 0x0, 0x0, 0x0, 0x6, 0xc, 0x18, 0x0, 0x78, 0xc, 0xc, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x0, 0x0, 0x0, 0x0, 0x6, 0xc, 0x18, 0x0, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x0, 0x0, 0x0, 0x0, 0x6, 0xc, 0x18, 0x0, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x0, 0x0, 0x0, 0x0, 0xc, 0x18, 0x30, 0x0, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x0, 0x0, 0x0, 0x0, 0x0, 0x44, 0x38, 0x0, 0xdc, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x0, 0x0, 0x44, 0x38, 0x0, 0xc6, 0xc6, 0xe6, 0xe6, 0xf6, 0xd6, 0xde, 0xce, 0xce, 0xc6, 0xc6, 0x0, 0x0, 0x38, 0x44, 0x38, 0x82, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x0, 0x0, 0x38, 0x44, 0x0, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x0, 0x0, 0x0, 0x0, 0x0, 0x44, 0x38, 0x0, 0x7c, 0xc6, 0xc0, 0x70, 0x1c, 0x6, 0xc6, 0x7c, 0x0, 0x0, 0x0, 0x0, 0x0, 0x44, 0x38, 0x0, 0xdc, 0x76, 0x66, 0x60, 0x60, 0x60, 0x60, 0xf0, 0x0, 0x0, 0x0, 0x0, 0xc, 0x18, 0x30, 0x0, 0xdc, 0x76, 0x66, 0x60, 0x60, 0x60, 0x60, 0xf0, 0x0, 0x0, 0xc, 0x18, 0x0, 0xfc, 0x66, 0x66, 0x66, 0x66, 0x7c, 0x78, 0x6c, 0x6c, 0x66, 0xe6, 0x0, 0x0, 0x60, 0xe0, 0x62, 0x66, 0x6c, 0x18, 0x30, 0x66, 0xce, 0x9a, 0x3f, 0x6, 0x6, 0x0, 0x0, 0x0, 0x0, 0x18, 0x18, 0x0, 0x18, 0x18, 0x18, 0x3c, 0x3c, 0x3c, 0x3c, 0x18, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x12, 0x36, 0x6c, 0xd8, 0x6c, 0x36, 0x12, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x90, 0xd8, 0x6c, 0x36, 0x6c, 0xd8, 0x90, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x11, 0x44, 0x11, 0x44, 0x11, 0x44, 0x11, 0x44, 0x11, 0x44, 0x11, 0x44, 0x11, 0x44, 0x11, 0x44, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0xdd, 0x77, 0xdd, 0x77, 0xdd, 0x77, 0xdd, 0x77, 0xdd, 0x77, 0xdd, 0x77, 0xdd, 0x77, 0xdd, 0x77, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xf8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xf8, 0x18, 0xf8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0xf6, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xfe, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x18, 0xf8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x36, 0x36, 0x36, 0x36, 0x36, 0xf6, 0x6, 0xf6, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x0, 0x0, 0x0, 0x0, 0x0, 0xfe, 0x6, 0xf6, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0xf6, 0x6, 0xfe, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0xfe, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x18, 0x18, 0x18, 0x18, 0x18, 0xf8, 0x18, 0xf8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1f, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1f, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1f, 0x18, 0x1f, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x37, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x37, 0x30, 0x3f, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3f, 0x30, 0x37, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0xf7, 0x0, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0x0, 0xf7, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x37, 0x30, 0x37, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0x0, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x36, 0x36, 0x36, 0x36, 0x36, 0xf7, 0x0, 0xf7, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0x0, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0x0, 0xff, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x3f, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1f, 0x18, 0x1f, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1f, 0x18, 0x1f, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3f, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0xff, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0x18, 0xff, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xf8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1f, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x76, 0xdc, 0xd8, 0xd8, 0xd8, 0xdc, 0x76, 0x0, 0x0, 0x0, 0x0, 0x0, 0x78, 0xcc, 0xcc, 0xcc, 0xd8, 0xcc, 0xc6, 0xc6, 0xc6, 0xc6, 0xcc, 0x18, 0x0, 0x0, 0x0, 0x0, 0x0, 0xfe, 0xc6, 0xc6, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xfe, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xfe, 0xc6, 0x60, 0x30, 0x18, 0x30, 0x60, 0xc6, 0xfe, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7e, 0xd8, 0xd8, 0xd8, 0xd8, 0xd8, 0x70, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x7c, 0x60, 0xc0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x76, 0xdc, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7e, 0x18, 0x3c, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x7e, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0x6c, 0x38, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x38, 0x6c, 0xc6, 0xc6, 0xc6, 0x6c, 0x6c, 0x6c, 0x6c, 0xee, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1e, 0x30, 0x18, 0xc, 0x3e, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7e, 0xdb, 0xdb, 0xdb, 0x7e, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x6, 0x7e, 0xdb, 0xdb, 0xf3, 0x7e, 0x60, 0xc0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1c, 0x30, 0x60, 0x60, 0x7c, 0x60, 0x60, 0x60, 0x30, 0x1c, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xfe, 0x0, 0x0, 0xfe, 0x0, 0x0, 0xfe, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x18, 0x18, 0x7e, 0x18, 0x18, 0x0, 0x0, 0x7e, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x30, 0x18, 0xc, 0x6, 0xc, 0x18, 0x30, 0x0, 0x7e, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc, 0x18, 0x30, 0x60, 0x30, 0x18, 0xc, 0x0, 0x7e, 0x0, 0x0, 0x0, 0x0, 0xe, 0x1b, 0x1b, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xd8, 0xd8, 0xd8, 0x70, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x18, 0x0, 0x7e, 0x0, 0x18, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x76, 0xdc, 0x0, 0x76, 0xdc, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x38, 0x6c, 0x6c, 0x38, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x18, 0x18, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x18, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf, 0xc, 0xc, 0xc, 0xc, 0xc, 0xec, 0x6c, 0x6c, 0x3c, 0xc, 0x0, 0x0, 0x0, 0x0, 0x0, 0xd8, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3c, 0x66, 0xc, 0x18, 0x32, 0x7e, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 }; __AA_CONST struct aa_font aa_fontvyhen = {FONT_DATA, 16, "Standard vga 8x16 font used by vyhen", "vyhen"}; #endif aalib-1.4.0/src/aamktabl.c0000644000766200001440000001207607272031253010767 #include #include #include #include #include #include "aalib.h" #include "aaint.h" #include "aamktabl.h" #include "config.h" #define TABLESIZE 65536 #define pow2(i) ((i)*(i)) /*#define pow2(i) (abs(i)) */ #define add(i) if(next[(i)]==(i)&&last!=(i)) {if(last!=-1) next[last]=(i),last=(i); else last=first=(i);} #define dist(i1,i2,i3,i4,i5,y1,y2,y3,y4,y5) (2*(pow2((int)(i1)-(int)(y1))+pow2((int)(i2)-(int)(y2))+(pow2((int)(i3)-(int)(y3))+pow2((int)(i4)-(int)(y4))))+1*pow2((int)(i5)-(int)(y5))) #define dist1(i1,i2,i3,i4,i5,y1,y2,y3,y4,y5) ((pow2((int)(i1)-(int)(y1))+pow2((int)(i2)-(int)(y2))+(pow2((int)(i3)-(int)(y3))+pow2((int)(i4)-(int)(y4))))+2*pow2((int)(i5)-(int)(y5))) #define pos(i1,i2,i3,i4) (((int)(i1)<<12)+((int)(i2)<<8)+((int)(i3)<<4)+(int)(i4)) #define postoparams(pos,i1,i2,i3,i4) \ ((i1)=(pos)>>12),((i2)=((pos)>>8)&15),((i3)=((pos)>>4)&15),((i4)=((pos))&15) static __AA_CONST int priority[]={4,5,3,2,1}; unsigned short *aa_mktable(aa_context * c) { int i; int i1, i2, i3, i4; int sum, pos; __AA_CONST struct aa_font *currfont = c->params.font; int supported = c->params.supported; unsigned short *next; int first = -1; int last = -1; unsigned short *table; unsigned short *filltable; static struct parameters *parameters; next = (unsigned short *) malloc(sizeof(*next) * TABLESIZE); parameters = (struct parameters *) calloc(1, sizeof(struct parameters) * (NCHARS + 1)); table = (unsigned short *) calloc(1, TABLESIZE * sizeof(*table)); filltable = (unsigned short *) calloc(1, 256 * sizeof(*filltable)); first = -1; last = -1; for (i = 0; i < TABLESIZE; i++) next[i] = i, table[i] = 0; __aa_calcparams(currfont, parameters, supported,c->params.dimmul, c->params.boldmul); for (i = 0; i < NCHARS; i++) { if (ALOWED(i, supported)) { int p1, p2, p3, p4; i1 = parameters[i].p[0]; i2 = parameters[i].p[1]; i3 = parameters[i].p[2]; i4 = parameters[i].p[3]; p1 = i1 >> 4; p2 = i2 >> 4; p3 = i3 >> 4; p4 = i4 >> 4; /* if(p1>15) p1=15; if(p2>15) p2=15; if(p3>15) p3=15; if(p4>15) p4=15; */ sum = parameters[i].p[4]; pos = pos(p1, p2, p3, p4); if (table[pos]) { int sum; p1 = (p1 << 4) + p1; p2 = (p2 << 4) + p2; p3 = (p3 << 4) + p3; p4 = (p4 << 4) + p4; sum = p1 + p2 + p3 + p4; if ((p1=dist(parameters[i].p[0], parameters[i].p[1], parameters[i].p[2], parameters[i].p[3], parameters[i].p[4], p1, p2, p3, p4, sum)) >= (p1=dist(parameters[table[pos]].p[0], parameters[table[pos]].p[1], parameters[table[pos]].p[2], parameters[table[pos]].p[3], parameters[table[pos]].p[4], p1, p2, p3, p4, sum))&&(p1!=p2||priority[i/256]<=priority[table[pos]/256])) goto skip; } table[pos] = i; add(pos); skip:; } } for (pos = 0; pos < 256; pos++) { int mindist = INT_MAX, d1; for (i = 0; i < NCHARS; i++) { if (ALOWED(i, supported)) { if ((d1 = dist1(parameters[i].p[0], parameters[i].p[1], parameters[i].p[2], parameters[i].p[3], parameters[i].p[4], pos, pos, pos, pos, pos*4)) <= mindist&&(d1!=mindist||priority[i/256]>priority[filltable[pos]/256])) filltable[pos] = i, mindist = d1; } } } do { int blocked; if (last != -1) next[last] = last; else break; blocked = last; i = first; if (i == -1) break; first = last = -1; do { int m1, m2, m3, m4, ii, dm; unsigned short c = table[i]; /* printf ("%c\n", c); */ postoparams(i, m1, m2, m3, m4); for (dm = 0; dm < 4; dm++) for (ii = -1; ii <= 1; ii += 2) { int dist, dist1, index; unsigned short ch; i1 = m1; i2 = m2; i3 = m3; i4 = m4; switch (dm) { case 0: i1 += ii; if (i1 < 0 || i1 >= 16) continue; break; case 1: i2 += ii; if (i2 < 0 || i2 >= 16) continue; break; case 2: i3 += ii; if (i3 < 0 || i3 >= 16) continue; break; case 3: i4 += ii; if (i4 < 0 || i4 >= 16) continue; break; } index = pos(i1, i2, i3, i4); ch = table[index]; if (ch == c || index == blocked) continue; if (ch) { int ii1 = (i1 << 4) + i1; int ii2 = (i2 << 4) + i2; int ii3 = (i3 << 4) + i3; int ii4 = (i4 << 4) + i4; int iisum = ii1 + ii2 + ii3 + ii4; dist = dist( ii1, ii2, ii3, ii4, iisum, parameters[c].p[0], parameters[c].p[1], parameters[c].p[2], parameters[c].p[3], parameters[c].p[4]); dist1 = dist( ii1, ii2, ii3, ii4, iisum, parameters[ch].p[0], parameters[ch].p[1], parameters[ch].p[2], parameters[ch].p[3], parameters[ch].p[4]); } if (!ch || dist < dist1) { table[index] = c; add(index); } } i1 = i; i = next[i]; next[i1] = i1; } while (i != i1); } while (last != -1); c->table = table; c->filltable = filltable; c->parameters = parameters; free(next); return (table); } aalib-1.4.0/src/aamem.c0000644000766200001440000000133507272031253010267 #include "config.h" #include "aalib.h" #include "aaint.h" static int mem_init(__AA_CONST struct aa_hardware_params *p,__AA_CONST void *none, struct aa_hardware_params *dest, void **params) { struct aa_hardware_params def={NULL, AA_DIM_MASK | AA_REVERSE_MASK | AA_NORMAL_MASK | AA_BOLD_MASK | AA_EXTENDED}; *dest=def; return 1; } static void mem_uninit(aa_context * c) { } static void mem_getsize(aa_context * c, int *width, int *height) { } static void mem_flush(aa_context * c) { } static void mem_gotoxy(aa_context * c, int x, int y) { } __AA_CONST struct aa_driver mem_d = { "mem", "Dummy memory driver 1.0", mem_init, mem_uninit, mem_getsize, NULL, NULL, mem_gotoxy, mem_flush, }; aalib-1.4.0/src/aaprintf.c0000644000766200001440000000046007272031253011011 #include #include "aalib.h" #include "aaint.h" int aa_printf(aa_context *c, int x, int y, enum aa_attribute attr, __AA_CONST char *fmt, ...) { va_list args; char buf[1025]; int i; va_start(args,fmt); i=vsprintf(buf,fmt,args); va_end(args); aa_puts(c,x,y,attr,buf); return i; } aalib-1.4.0/src/aahelp.c0000644000766200001440000000577607272031253010456 #include "config.h" #include "aalib.h" #include "aaint.h" __AA_CONST char * __AA_CONST aa_help = " -driver select driver\n" " available drivers:" #ifndef __DJGPP__ #ifdef LINUX_DRIVER "linux " #endif #ifdef SLANG_DRIVER "slang " #endif #ifdef CURSES_DRIVER "curses " #endif #ifdef X11_DRIVER "X11 " #endif #ifdef OS2_DRIVER "os2 " #endif #else "dos " #endif "stdout stderr\n" " -kbddriver select keyboard driver\n" " available drivers:" #ifndef __DJGPP__ #ifdef SLANG_KBDDRIVER "slang " #endif #ifdef CURSES_KBDDRIVER "curses " #endif #ifdef X11_KBDDRIVER "X11 " #endif #ifdef OS2_DRIVER "os2 " #endif #else "dos " #endif "stdin\n" " -mousedriver select mouse driver\n" " available drivers:" #ifndef __DJGPP #ifdef X11_MOUSEDRIVER "X11 " #endif #ifdef OS2_DRIVER "os2 " #endif #ifdef GPM_MOUSEDRIVER "gpm " #endif #ifdef CURSES_MOUSEDRIVER "curses" #endif "dos " #endif "\n\n" "Size options:\n" " -width set width\n" " -height set height\n" " -minwidth set minimal width\n" " -minheight set minimal height\n" " -maxwidth set maximal width\n" " -maxheight set maximal height\n" " -recwidth set recomended width\n" " -recheight set recomended height\n\n" "Attributes:\n" " -dim enable usage of dim (half bright) attribute\n" " -bold enable usage of bold (double bright) attribute\n" " -reverse enable usage of reverse attribute\n" " -normal enable usage of normal attribute\n" " -boldfont enable usage of boldfont attrubute\n" " -no disable (i.e -nobold)\n\n" "Font rendering options:\n" " -extended use all 256 characters\n" " -eight use eight bit ascii\n" " -font select font(This option have effect just on hardwares\n" " where aalib is unable to determine current font\n" " available fonts:vga8 vga9 mda14 vga14 X8x13 X8x16 \n" " X8x13bold vgagl8 line\n\n" "Rendering options:\n" " -inverse enable inverse rendering\n" " -noinverse disable inverse rendering\n" " -bright set bright (0-255)\n" " -contrast set contrast (0-255)\n" " -gamma set gamma correction value(0-1)\n\n" "Ditherng options:\n" " -nodither disable dithering\n" " -floyd_steinberg floyd steinberg dithering\n" " -error_distribution error distribution dithering\n" " -random set random dithering value(0-inf)\n" "Monitor parameters:\n" " -dimmul multiply factor for dim color (5.3)\n" " -boldmul multiply factor for dim color (2.7)\n" " The default parameters are set to fit my monitor (15\" goldstar)\n" " With contrast set to maximum and bright set to make black black\n" " This values depends at quality of your monitor (and setting of controls\n" " Defaultd settings should be OK for most PC monitors. But ideal monitor\n" " Needs dimmul=1.71 boldmul=1.43. For example monitor used by SGI is very\n" " close to this values. Also old 14\" vga monitors needs higher values.\n"; aalib-1.4.0/src/aaslnkbd.c0000644000766200001440000000664607272034320010776 #include #include #include #include #include #include #include "config.h" #ifdef SLANG_KBDDRIVER #include #ifdef GPM_MOUSEDRIVER #include #endif #include "aalib.h" #include "aaint.h" static int iswaiting; static FILE *f; static jmp_buf buf; int __slang_keyboard; extern int __slang_is_up; extern volatile int __resized_slang; /*extern int __curses_usegpm; */ static int uninitslang; #if 0 int __curses_x, __curses_y, __curses_buttons; int __curses_keyboard; #endif #ifdef SIGWINCH static void handler(int i) { __resized_slang = 2; signal(SIGWINCH, handler); if (iswaiting) longjmp(buf, 1); } #endif static int slang_init(struct aa_context *context, int mode) { if (!__slang_is_up) { fflush(stdout); SLtt_get_terminfo(); __slang_is_up = 1; uninitslang = 1; } f = fopen("/dev/null", "r"); if (SLang_init_tty(-1, 0, 0) == -1) { return 0; } if (-1 == SLkp_init()) { return 0; } __slang_keyboard = 1; #ifdef GPM_MOUSEDRIVER aa_recommendlowmouse("gpm"); #endif #ifdef SIGWINCH signal(SIGWINCH, handler); #endif return 1; } static void slang_uninit(aa_context * c) { if (uninitslang) { uninitslang = 0; __slang_is_up = 0; } SLang_reset_tty(); } static int slang_getchar(aa_context * c1, int wait) { int c; volatile int flag = 0; #ifdef GPM_MOUSEDRIVER static Gpm_Event ev; #endif struct timeval tv; fd_set readfds; if (wait) { setjmp(buf); iswaiting = 1; } else iswaiting = 0; if (__resized_slang == 2) { iswaiting = 0; __resized_slang = 1; return (AA_RESIZE); } /*non-gpm way */ if (!wait) { #ifdef GPM_MOUSEDRIVER if (gpm_fd == -1) { #endif if (!SLang_input_pending(0)) return AA_NONE; #ifdef GPM_MOUSEDRIVER } else { GPM_DRAWPOINTER(&ev); tv.tv_sec = 0; tv.tv_usec = 0; FD_ZERO(&readfds); if (gpm_fd != -2) FD_SET(gpm_fd, &readfds); FD_SET(STDIN_FILENO, &readfds); if (!(flag = select( ((gpm_fd == -2)?STDIN_FILENO:gpm_fd) + 1, &readfds, NULL, NULL, &tv))) return AA_NONE; } #endif } #ifdef GPM_MOUSEDRIVER if (gpm_fd != -1) { GPM_DRAWPOINTER(&ev); while (!flag) { FD_ZERO(&readfds); if (gpm_fd != -2) FD_SET(gpm_fd, &readfds); FD_SET(STDIN_FILENO, &readfds); tv.tv_sec = 60; flag = select( ((gpm_fd == -2)?STDIN_FILENO:gpm_fd) + 1, &readfds, NULL, NULL, &tv); } if (flag == -1) { printf("error!\n"); return (AA_NONE); } if ((gpm_fd > -1) && (FD_ISSET(gpm_fd, &readfds))) { if (Gpm_GetEvent(&ev) && gpm_handler && ((*gpm_handler) (&ev, gpm_data))) { gpm_hflag = 1; return AA_MOUSE; } } } if (gpm_fd == -2) c = Gpm_Getchar(); else #endif c = SLkp_getkey(); iswaiting = 0; if (__resized_slang == 2) { __resized_slang = 1; return (AA_RESIZE); } if (c == 27) return (AA_ESC); if (c > 0 && c < 128 && c != 127) return (c); switch (c) { case SL_KEY_ERR: return (AA_NONE); case SL_KEY_LEFT: return (AA_LEFT); case SL_KEY_RIGHT: return (AA_RIGHT); case SL_KEY_UP: return (AA_UP); case SL_KEY_DOWN: return (AA_DOWN); case SL_KEY_BACKSPACE: case 127: return (AA_BACKSPACE); } return (AA_UNKNOWN); } __AA_CONST struct aa_kbddriver kbd_slang_d = { "slang", "Slang keyboard driver 1.0", 0, slang_init, slang_uninit, slang_getchar, }; #endif aalib-1.4.0/src/aaslang.c0000644000766200001440000000540707272031253010621 #include #include #include #include "config.h" #ifdef SLANG_DRIVER #include #ifdef GPM_MOUSEDRIVER #include #endif #include "aalib.h" #include "aaint.h" __AA_CONST struct aa_driver slang_d; int __slang_is_up = 0; int __resized_slang = 0; static int uninitslang; static int slang_init(__AA_CONST struct aa_hardware_params *p,__AA_CONST void *none, struct aa_hardware_params *dest, void **params) { struct aa_hardware_params def={NULL, AA_NORMAL_MASK | AA_BOLD_MASK | AA_REVERSE_MASK | AA_BOLDFONT_MASK | AA_DIM_MASK}; *dest=def; fflush(stdout); if (!__slang_is_up) { SLtt_get_terminfo(); __slang_is_up = 1; uninitslang = 1; } if (SLsmg_init_smg() != 0) return 0; if (SLtt_Use_Ansi_Colors) { dest->supported &= ~AA_BOLDFONT_MASK; } SLsmg_Display_Eight_Bit = 128; dest->supported |= AA_EIGHT; #ifdef GPM_MOUSEDRIVER aa_recommendlowmouse("gpm"); #endif aa_recommendlowkbd ("linux"); aa_recommendlowkbd("slang"); return 1; } static void slang_uninit(aa_context * c) { SLsmg_reset_smg(); if (uninitslang) { uninitslang = 0; __slang_is_up = 0; } } static void slang_getsize(aa_context * c, int *width, int *height) { SLtt_get_screen_size(); SLsmg_reset_smg(); if (SLsmg_init_smg() != 0) printf("Internal error!\n"); SLtt_set_mono(AA_NORMAL, "normal", 0); SLtt_set_mono(AA_BOLD, "bold", SLTT_BOLD_MASK); SLtt_set_mono(AA_DIM, "dim", SLTT_ALTC_MASK); SLtt_set_mono(AA_REVERSE, "reverse", SLTT_REV_MASK); SLtt_set_mono(AA_SPECIAL, "special", 0); SLtt_set_mono(AA_BOLDFONT, "boldfont", SLTT_BOLD_MASK); SLtt_set_color(AA_NORMAL, "normal", "lightgray", "black"); SLtt_set_color(AA_BOLD, "bold", "white", "black"); SLtt_set_color(AA_DIM, "dim", "gray", "black"); SLtt_set_color(AA_REVERSE, "bold", "black", "lightgray"); SLtt_set_color(AA_SPECIAL, "dim", "lightgray", "blue"); SLtt_set_color(AA_BOLDFONT, "bold", "white", "black"); *width = SLtt_Screen_Cols; *height = SLtt_Screen_Rows; /*if(i==2) exit(1); */ #ifdef GPM_MOUSEDRIVER gpm_mx = *width; gpm_my = *height; #endif } static void slang_setattr(aa_context * c, int attr) { SLsmg_set_color(attr); } static void slang_print(aa_context * c, __AA_CONST char *text) { SLsmg_write_string(text); } static void slang_flush(aa_context * c) { SLsmg_refresh(); } static void slang_gotoxy(aa_context * c, int x, int y) { SLsmg_gotorc(y, x); } static void slang_cursor(aa_context * c, int mode) { SLtt_set_cursor_visibility(mode); } __AA_CONST struct aa_driver slang_d = { "slang", "Slang driver 1.0", slang_init, slang_uninit, slang_getsize, slang_setattr, slang_print, slang_gotoxy, slang_flush, slang_cursor, }; #endif aalib-1.4.0/src/aafastre.c0000644000766200001440000000171307272031253010775 #include #include "aalib.h" #include "aaint.h" #include "aamktabl.h" void aa_fastrender(aa_context * c, int x1, int y1, int x2, int y2) { int x, y; int val; int wi = c->imgwidth; int pos; int pos1; if (x2 < 0 || y2 < 0 || x1 > aa_scrwidth(c) || y1 > aa_scrheight(c)) return; if (x2 >= aa_scrwidth(c)) x2 = aa_scrwidth(c); if (y2 >= aa_scrheight(c)) y2 = aa_scrheight(c); if (x1 < 0) x1 = 0; if (y1 < 0) y1 = 0; if (c->table == NULL) aa_mktable(c); for (y = y1; y < y2; y++) { pos = 2 * y * wi; pos1 = y * aa_scrwidth(c); for (x = x1; x < x2; x++) { val = c->table[ ((((int) c->imagebuffer[pos] >> 4)) << 8) + ((((int) c->imagebuffer[pos + 1] >> 4)) << 12) + ((((int) c->imagebuffer[pos + wi] >> 4))) + ((((int) c->imagebuffer[pos + 1 + wi] >> 4)) << 4)]; c->attrbuffer[pos1] = val >> 8; c->textbuffer[pos1] = val & 0xff; pos += 2; pos1++; } } } aalib-1.4.0/src/aalinux.c0000644000766200001440000001250307272032054010647 #include "config.h" #ifdef LINUX_DRIVER #include #include #include #include #ifdef GPM_MOUSEDRIVER #include #endif #include #include #include #include #include #include #include "aalib.h" #include "aaint.h" #define MAXVCS 10 static int readonly=1; static int cursorx, cursory; static FILE *vc[MAXVCS]; static int nvcs; static int sizes[2][MAXVCS]; static int cursor_visible = 1; static void linux_gotoxy (aa_context * c, int x, int y); static void linux_cursor (aa_context * c, int mode) { cursor_visible = mode; linux_gotoxy (c, cursorx, cursory); if (mode) { printf ("[?25h"); } else printf ("[?25l"); fflush (stdout); } static int linux_init (__AA_CONST struct aa_hardware_params *p, __AA_CONST void *none, struct aa_hardware_params *dest, void **params) { static int registered; static struct aa_font font; __AA_CONST static struct aa_hardware_params def = { NULL, AA_DIM_MASK | AA_REVERSE_MASK | AA_NORMAL_MASK | AA_BOLD_MASK | AA_EXTENDED }; struct stat sbuf; int major, minor; char fname[20]; char tmp[256], *env; int vt; int i, y; int fd; *dest = def; fflush (stdout); fd = dup (fileno (stderr)); fstat (fd, &sbuf); major = sbuf.st_rdev >> 8; vt = minor = sbuf.st_rdev & 0xff; close (fd); if (major != 4 || minor >= 64) return (0); readonly = 0; if ((env = getenv ("AAVCS")) != NULL) { int p1 = 0, p2; nvcs = 0; while (env[p1]) { while (env[p1] && env[p1] == ' ') p1++; if (!env[p1]) break; p2 = 0; while (env[p1] && env[p1] != ' ') tmp[p2++] = env[p1++]; tmp[p2] = 0; vc[nvcs] = fopen (tmp, "w+"); if (vc[nvcs] == NULL) vc[nvcs] = fopen (tmp, "w"), readonly = 1; if (vc[nvcs] == NULL) return 0; nvcs++; } } else { sprintf (fname, "/dev/vcsa%i", vt); vc[0] = fopen (fname, "w+"); if (vc[0] == NULL) vc[0] = fopen (tmp, "w"), readonly = 1; nvcs = 1; } if (vc[0] == NULL) return 0; if (!registered) { char *data; fd = open ("/dev/console", 0); if (fd >= 0) { char buf[32 * 1024]; struct consolefontdesc desc; desc.chardata = buf; desc.charcount = 1024; i = ioctl (fd, GIO_FONTX, &desc); close (fd); if (i) { /*probably mda/hercules */ dest->font = &aa_font14; dest->supported &= ~AA_DIM_MASK; goto skip; } font.name = "Font used by your console"; font.shortname = "current"; font.height = desc.charheight; data = malloc (desc.charheight * 256); font.data = data; if (font.data == NULL) goto skip; y = 0; for (i = 0; i < 8192; i++) { if (i % 32 < font.height) { data[y] = desc.chardata[i], y++; } } aa_registerfont (&font); dest->font = &font; } } skip:; #ifdef GPM_MOUSEDRIVER aa_recommendlowmouse ("gpm"); #endif aa_recommendlowkbd ("linux"); aa_recommendlowkbd ("slang"); aa_recommendlowkbd ("curses"); return 1; } static void linux_uninit (aa_context * c) { int i; for (i = 0; i < nvcs; i++) { fclose (vc[i]); } } static void linux_getsize (aa_context * c, int *width, int *height) { int i; struct { unsigned char lines, cols, x, y; } scrn = { 0, 0, 0, 0}; *width = 0; *height = 65536; if (!readonly) { for (i = 0; i < nvcs; i++) { (void) fseek (vc[i], 0, SEEK_SET); (void) fread (&scrn, 4, 1, vc[i]); sizes[0][i] = scrn.cols; sizes[1][i] = scrn.lines; *width = *width + scrn.cols; if (*height > scrn.lines) *height = scrn.lines; } } else { struct winsize ws; if (ioctl (2, TIOCGWINSZ, &ws) == 0) { *width = ws.ws_col * nvcs; *height = ws.ws_row; } else { /* best guess */ *width = 80; *height = 25; } } #ifdef GPM_MOUSEDRIVER gpm_mx = *width - 1; gpm_my = *height - 1; #endif } static void linux_flush (aa_context * c) { int i; int x, y, xstart = 0, xend, end = aa_scrwidth (c) * aa_scrheight (c); unsigned char data[] = { 0x07, 0x08, 0x0f, 0x0f, 0x70, 0x17 }; for (i = 0; i < nvcs; i++) { fseek (vc[i], 4, 0); for (y = 0; y < aa_scrheight (c); y++) { int start = y * aa_scrwidth (c); for (x = xstart; x < xstart + sizes[0][i]; x++) { putc (c->textbuffer[x + start], vc[i]); if (c->attrbuffer[x + start] < 7) putc (data[c->attrbuffer[x + start]], vc[i]); else putc (0x27, vc[i]); } } xstart += sizes[0][i]; fflush (vc[i]); } } static void linux_gotoxy (aa_context * c, int x, int y) { int n = 0; int i; struct { unsigned char lines, cols, x, y; } scrn; cursorx = x; cursory = y; for (i = 0; i < nvcs; i++) { (void) fseek (vc[i], 0, SEEK_SET); if (x >= n && x < n + sizes[0][i] && cursor_visible) { scrn.x = x - n; scrn.y = y; scrn.lines = sizes[0][i]; scrn.cols = sizes[1][i]; } else { scrn.x = 0; scrn.y = 0; scrn.lines = sizes[0][i]; scrn.cols = sizes[1][i]; } (void) fwrite (&scrn, 4, 1, vc[i]); n += sizes[0][i]; } fflush (vc[i]); } __AA_CONST struct aa_driver linux_d = { "linux", "Linux pc console driver 1.0", linux_init, linux_uninit, linux_getsize, NULL, NULL, linux_gotoxy, linux_flush, linux_cursor }; #endif aalib-1.4.0/src/aalinuxkbd.c0000644000766200001440000002566507272031253011345 /* Raw keyboard mode driver for linux console by Jan Hubicka. * This driver is based on: * librawkey v0.21 - (c) 1994, 1995 Russell Marks * This library may be freely used/copied/modified provided this copyright * notice is left intact. * * needs keymap support in kernel - been there since 0.99pl12 I think. */ #include "config.h" #ifdef LINUX_DRIVER #include #include #include #include #include #include #include #include #include /* RAW mode stuff, etc. */ #include /* mainly for NR_KEYS */ #include /* for VT stuff - nah, really? :) */ #include #include #ifdef GPM_MOUSEDRIVER #include #endif #include "aalib.h" #include "aaint.h" static struct termios oldios; /* random keys not convered anywhere else below */ #define ESCAPE_KEY 0x01 #define ENTER_KEY 28 #define BACKSPACE 14 #define TAB_KEY 15 /* shifts */ #define LEFT_SHIFT 0x2A #define RIGHT_SHIFT 0x36 #define LEFT_CTRL 0x1D #define LEFT_ALT 0x38 /* NB: right ctrl sends 0xE0 then LEFT_CTRL, right alt sends 0xE0 then * LEFT_ALT. If you want to do any shift handling, you probably want to * just ignore 0xE0, and look for LEFT_CTRL and LEFT_ALT. * note that using scan_keyboard() and is_key_pressed() does this for you. */ /* function keys */ /* this macro lets you do things like FUNC_KEY(1), FUNC_KEY(2), etc. up to * FUNC_KEY(12). * don't use any side-effects with it. */ #define FUNC_KEY(z) (0x3A+(z)+(((z)>10)?18:0)) /* cursors, pgup, pgdn, etc. */ #define CURSOR_LEFT 0x4B #define CURSOR_RIGHT 0x4D #define CURSOR_UP 0x48 #define CURSOR_DOWN 0x50 #define CURSORBLOCK_LEFT 105 #define CURSORBLOCK_RIGHT 106 #define CURSORBLOCK_UP 103 #define CURSORBLOCK_DOWN 108 #define KEYPAD_CENTER 0x4C /* the '5' in the centre of the keypad */ #define INSERT_KEY 0x52 #define DELETE_KEY 0x53 #define HOME_KEY 0x47 #define END_KEY 0x4F #define PAGE_UP 0x49 #define PAGE_DOWN 0x51 /* NB: the 'grey' cursors, pgup, pgdn etc. generate 0xE0 before sending the * above codes. The easiest way to deal with this is to ignore 0xE0. :) */ #define CAPS_LOCK 0x3A #define NUM_LOCK 0x45 #define SCROLL_LOCK 0x46 /* PrintScreen generates E0, 2A, E0, 37. (0x63?) * Pause generates E1, 10, 45. (0x77?) * I leave it up to you how to figure those two out properly, * but the easiest way is to ignore them. :-/ */ #define GRAY_PLUS 0x4E #define GRAY_MINUS 0x4A #define GRAY_MULTIPLY 0x37 /* NB: also gen'd by PrtSc, see above */ #define GRAY_DIVIDE 0x36 /* NB: prefixed by 0xE0 */ /* for most other keys, you should use the keymap_trans() function to * convert the scancode to whatever the keymap would normally generate. */ /* prototypes */ /* NB: it is *vital* that you call rawmode_exit() when you finish, or * else you'll be left with the keyboard translation in RAW mode! Not Good. * Consider setting up a SIGSEGV handler that calls it, etc. just in case. */ static int keymap[2][NR_KEYS]; /* scancode -> ASCII translation */ static int tty_fd = -1, restart_con, alt_pressed; static struct termios new_termio, old_termio; static int vtswitch_allowed; static char key_down[128]; static int closed = 1; static int mypid; /* it's really easy to translate the scancodes these days, we just * use the keytable stuff! * * returns 0 on error, 1 if ok */ static int get_keyb_map(void) { static struct kbentry keyb_ent; int f; keyb_ent.kb_table = 0; /* unshifted */ for (f = 0; f < NR_KEYS; f++) { keyb_ent.kb_index = f; if (ioctl(tty_fd, KDGKBENT, (unsigned int) &keyb_ent)) return (0); keymap[0][f] = keyb_ent.kb_value; } keyb_ent.kb_table = 1; /* unshifted */ for (f = 0; f < NR_KEYS; f++) { keyb_ent.kb_index = f; if (ioctl(tty_fd, KDGKBENT, (unsigned int) &keyb_ent)) return (0); keymap[1][f] = keyb_ent.kb_value; } return (1); } static void allow_switch(int on) { vtswitch_allowed = on; } static void raw_mode(int tty_fd, int on) { ioctl(tty_fd, KDSKBMODE, on ? K_MEDIUMRAW : K_XLATE); } static void blank_key_down(void) { int f; for (f = 0; f < NR_KEYS; f++) key_down[f] = 0; } static void vt_from_here(int num) { ioctl(tty_fd, TCSETSW, &old_termio); raw_mode(tty_fd, 0); /* don't use rawmode_exit 'cos of other things it does */ ioctl(tty_fd, VT_RELDISP, VT_ACKACQ); signal(SIGUSR1, vt_from_here); } static void vt_to_here(int num) { struct termios ios; ioctl(tty_fd, TCSETSW, &new_termio); restart_con = 1; /* we're back, say to start up again */ alt_pressed = 0; raw_mode(tty_fd, 1); ios = oldios; ios.c_lflag &= ~ECHO; tcsetattr(tty_fd, 0, &ios); blank_key_down(); signal(SIGUSR2, vt_to_here); } /* returns 1 if ok, 0 otherwise */ static int rawmode_init(void) { if (!closed) return; mypid = getpid(); if (tty_fd == -1) { tty_fd = fileno(stdin); fcntl(tty_fd, F_SETFL, O_NONBLOCK); } /* fix termio stuff so ^C-style interrupts are ignored */ ioctl(tty_fd, TCGETS, &old_termio); new_termio = old_termio; new_termio.c_lflag &= ~(ISIG | ICANON); ioctl(tty_fd, TCSETSW, &new_termio); if (get_keyb_map()) { struct vt_mode vtm; struct termios ios; blank_key_down(); raw_mode(tty_fd, 1); signal(SIGUSR1, vt_from_here); signal(SIGUSR2, vt_to_here); ioctl(tty_fd, VT_GETMODE, &vtm); vtm.mode = VT_PROCESS; vtm.relsig = SIGUSR1; vtm.acqsig = SIGUSR2; ioctl(tty_fd, VT_SETMODE, &vtm); tcgetattr(tty_fd, &oldios); ios = oldios; ios.c_lflag &= ~ECHO; tcsetattr(tty_fd, 0, &ios); closed = 0; return (1); } else return (0); } static void rawmode_exit(void) { struct vt_mode vtm; if (mypid != getpid()) return; if (closed) return; closed = 1; raw_mode(tty_fd, 0); ioctl(tty_fd, VT_GETMODE, &vtm); vtm.mode = VT_AUTO; ioctl(tty_fd, VT_SETMODE, &vtm); ioctl(tty_fd, TCSETSW, &old_termio); fcntl(tty_fd, F_SETFL, 0); /* allow for old versions of bash */ tty_fd = -1; tcsetattr(tty_fd, 0, &oldios); } /* returns -1 if no keypresses pending, else returns scancode. */ static int get_scancode(void) { unsigned char c; if (read(tty_fd, &c, 1) <= 0) return (-1); return ((int) c); } /* this is the routine you should call whenever you would normally * read a keypress. However, to actually tell if a key is pressed, * call is_key_pressed() with a scancode as arg. */ static int scan_keyboard(void) { int c, key, flag; /* we use BFI to fix the PrtSc/Pause problem - i.e. we don't :^) */ while ((c = get_scancode()) == 0xE0); if (c == 0xE1) c = get_scancode(); if (c == -1) return -1; /* no key was pressed */ key = c & 127; flag = (c & 128) ? 0 : 1; /* 1 = down */ if (flag || key_down[key] != flag) key_down[key] = flag; else return (scan_keyboard ()); if (key == LEFT_ALT) alt_pressed = flag; if (alt_pressed && flag && key >= FUNC_KEY(1) && key <= FUNC_KEY(10)) { struct vt_stat vts; int newvt; ioctl(tty_fd, VT_GETSTATE, &vts); newvt = c - FUNC_KEY(1) + 1; if (vts.v_active != newvt && vtswitch_allowed) { ioctl(tty_fd, VT_ACTIVATE, newvt); restart_con = 0; while (restart_con == 0) usleep(50000); } return -1; /* Got VT switch */ } if (flag && key == 46 && key_down[LEFT_CTRL]) raise(SIGINT); return key; /* No VT switch */ } /* converts scancode to key binding */ static int keymap_trans(int sc) { if (sc < 0 || sc > 127) return (-1); return (keymap[key_down[LEFT_SHIFT] || key_down[RIGHT_SHIFT]][sc]); } static int iswaiting; static int __resized; #ifdef GPM_MOUSEDRIVER extern int __curses_usegpm; #endif static jmp_buf buf; #ifdef SIGWINCH static void handler(int i) { __resized = 2; signal(SIGWINCH, handler); if (iswaiting) longjmp(buf, 1); } #endif static char sig2catch[] = {SIGHUP, SIGINT, SIGQUIT, SIGILL, SIGTRAP, SIGIOT, SIGBUS, SIGFPE, SIGSEGV, SIGPIPE, SIGALRM, SIGTERM, SIGXCPU, SIGXFSZ, SIGVTALRM, /* SIGPROF , */ SIGPWR}; static struct sigaction old_signal_handler[sizeof(sig2catch)]; static void exithandler(int v) { int i; printf("AAlib: signal %i received\n", v); rawmode_exit(); for (i = 0; i < (int) sizeof(sig2catch); i++) if (sig2catch[i] == v) { sigaction(v, old_signal_handler + i, NULL); raise(v); break; } if (i >= (int) sizeof(sig2catch)) { printf("AA-lib: Aieeee! Illegal call to signal_handler, raising segfault.\n"); raise(SIGSEGV); } } static int linux_init(struct aa_context *context, int mode) { int i; struct sigaction siga; if (!(mode & AA_SENDRELEASE)) return 0; if (!rawmode_init()) return 0; #ifdef SIGWINCH signal(SIGWINCH, handler); #endif #ifdef GPM_MOUSEDRIVER aa_recommendlowmouse("gpm"); #endif allow_switch(1); atexit(rawmode_exit); for (i = 0; i < (int) sizeof(sig2catch); i++) { siga.sa_handler = exithandler; siga.sa_flags = 0; /*zero_sa_mask(&(siga.sa_mask)); */ memset(&siga.sa_mask, 0, sizeof(sigset_t)); sigaction((int) sig2catch[i], &siga, old_signal_handler + i); } return 1; } static void linux_uninit(aa_context * c) { #ifdef SIGWINCH signal(SIGWINCH, SIG_IGN); /*this line may cause problem... */ #endif rawmode_exit(); } #ifdef GPM_MOUSEDRIVER extern int __gpm_user_handler(Gpm_Event * event, void *data); #endif static int linux_getchar(aa_context * c1, int wait) { #ifdef GPM_MOUSEDRIVER static Gpm_Event e; #endif int c; int key; struct timeval tv; do { fd_set readfds; tv.tv_sec = 0; tv.tv_usec = 0; FD_ZERO(&readfds); FD_SET(tty_fd, &readfds); #ifdef GPM_MOUSEDRIVER if (gpm_visiblepointer) GPM_DRAWPOINTER(&e); if (__curses_usegpm) { FD_SET(gpm_fd, &readfds); } #endif #ifdef GPM_MOUSEDRIVER select((__curses_usegpm ? gpm_fd : 0) + 1, &readfds, NULL, NULL, wait ? NULL : &tv); if (__curses_usegpm && FD_ISSET(gpm_fd, &readfds)) { if (Gpm_GetEvent(&e) == 1) { __gpm_user_handler(&e, NULL); return AA_MOUSE; } } #else select(tty_fd, &readfds, NULL, NULL, wait ? NULL : &tv); #endif c = scan_keyboard(); if (c != -1) { switch (c) { case ESCAPE_KEY: key = AA_ESC; break; case ENTER_KEY: key = 13; break; case BACKSPACE: key = AA_BACKSPACE; break; case CURSOR_LEFT: key = AA_LEFT; break; case CURSOR_RIGHT: key = AA_RIGHT; break; case CURSOR_UP: key = AA_UP; break; case CURSOR_DOWN: key = AA_DOWN; break; case CURSORBLOCK_LEFT: key = AA_LEFT; break; case CURSORBLOCK_RIGHT: key = AA_RIGHT; break; case CURSORBLOCK_UP: key = AA_UP; break; case CURSORBLOCK_DOWN: key = AA_DOWN; break; default: key = keymap_trans(c) & 255; } if (!key_down[c]) key |= AA_RELEASE; return key; } else key = AA_NONE; } while (wait); return AA_NONE; } __AA_CONST struct aa_kbddriver kbd_linux_d = { "linux", "Linux console raw keyboard driver 1.0", AA_SENDRELEASE, linux_init, linux_uninit, linux_getchar, }; #endif aalib-1.4.0/src/aax.c0000644000766200001440000004141507272031302007756 #include #include #include #include #include "config.h" #ifdef X11_DRIVER #include #include #include "aalib.h" #include "aaint.h" #include "aaxint.h" __AA_CONST struct aa_driver X11_d; #define C2 0x68 #define C1 0xB2 #define dr (d->pixmapmode?d->pi:d->wi) static void X_flush(aa_context * c); static int font_error; static int mygetpixel (XImage * image, int pos, int y) { int width = image->width; int i; int sum = font_error; int start = (pos * width + 4) / 8; int end = ((pos + 1) * width + 4) / 8; if (start == end) { if (start == image->width - 1) start--; else end++; } for (i = start; i < end; i++) sum += XGetPixel (image, i, y) != 0; if (sum <= (end - start) / 2) { font_error = sum; return 0; } else font_error = -(end - start - sum); return 1; } static void X_AllocColors (struct xdriverdata * d) { static XColor c; d->black = d->attr.border_pixel = d->attr.background_pixel = d->invertedbold = BlackPixel (d->dp, d->screen); d->bold = d->invertedblack = WhitePixel (d->dp, d->screen); c.red = C1 * 256; c.green = C1 * 256; c.blue = C1 * 256; if (!XAllocColor (d->dp, d->cmap, &c)) d->normal = d->bold; else d->normal = c.pixel; c.red = 65536 - c.red; c.green = 65536 - c.green; c.blue = 65536 - c.blue; if (!XAllocColor (d->dp, d->cmap, &c)) d->invertednormal = d->invertedbold, d->normal = d->bold; else d->invertednormal = c.pixel; c.red = C2 * 256; c.green = C2 * 256; c.blue = C2 * 256; if (d->bold == d->dim && !XAllocColor (d->dp, d->cmap, &c)) d->dim = d->normal; else d->dim = c.pixel; c.red = 65536 - c.red; c.green = 65536 - c.green; c.blue = 65536 - c.blue; if (!XAllocColor (d->dp, d->cmap, &c)) d->inverteddim = d->invertednormal, d->dim = d->normal; else d->inverteddim = c.pixel; c.red = 0; c.green = 0; c.blue = 65535UL; if (!XAllocColor (d->dp, d->cmap, &c)) d->special = d->black; else d->special = c.pixel; c.red = 65535UL/2; c.green = 65535UL/2; c.blue = 65535UL; if (!XAllocColor (d->dp, d->cmap, &c)) d->invertedspecial = d->invertedblack; else d->invertedspecial = c.pixel; } static void X_setinversionmode (int inverted, struct xdriverdata *d) { d->inverted = inverted; if (d->specialGC) XFreeGC (d->dp, d->specialGC); if (d->normalGC) XFreeGC (d->dp, d->normalGC); if (d->boldGC) XFreeGC (d->dp, d->boldGC); if (d->dimGC) XFreeGC (d->dp, d->dimGC); d->specialGC = XCreateGC (d->dp, d->wi, 0L, NULL); XSetForeground (d->dp, d->specialGC, inverted ? d->invertedspecial : d->special); XSetFont (d->dp, d->specialGC, d->font); d->normalGC = XCreateGC (d->dp, d->wi, 0L, NULL); XSetForeground (d->dp, d->normalGC, inverted ? d->invertednormal : d->normal); XSetBackground(d->dp, d->normalGC, inverted ? d->invertedblack : d->black); XSetFont (d->dp, d->normalGC, d->font); d->boldGC = XCreateGC (d->dp, d->wi, 0L, NULL); XSetForeground (d->dp, d->boldGC, inverted ? d->invertedbold : d->bold); XSetBackground(d->dp, d->boldGC, inverted ? d->invertedblack : d->black); XSetFont (d->dp, d->boldGC, d->font); d->dimGC = XCreateGC (d->dp, d->wi, 0L, NULL); XSetForeground (d->dp, d->dimGC, inverted ? d->inverteddim : d->dim); XSetBackground(d->dp, d->dimGC, inverted ? d->invertedblack : d->black); XSetFont (d->dp, d->dimGC, d->font); d->blackGC = XCreateGC (d->dp, d->wi, 0L, NULL); XSetForeground (d->dp, d->blackGC, inverted ? d->invertedblack : d->black); XSetBackground(d->dp, d->blackGC, inverted ? d->invertedblack : d->black); d->currGC = d->normalGC; if (!d->pixmapmode) XSetWindowBackground (d->dp, d->wi, inverted ? d->invertedblack : d->black); else XFillRectangle(d->dp, d->pi, d->blackGC, 0, 0, d->pixelwidth, d->pixelheight); XClearWindow (d->dp, d->wi); if (d->previoust != NULL) free(d->previoust), free(d->previousa); d->previoust=NULL; d->previousa=NULL; } static int X_init(__AA_CONST struct aa_hardware_params *p, __AA_CONST void *none,struct aa_hardware_params *dest, void **driverdata) { const char *font = "8x13bold"; static int registered; static aa_font aafont; __AA_CONST static struct aa_hardware_params def= {&aa_fontX13B, AA_DIM_MASK | AA_REVERSE_MASK | AA_NORMAL_MASK | AA_BOLD_MASK | AA_BOLDFONT_MASK | AA_EXTENDED, 0, 0, 0, 0, 80, 32, 0, 0}; struct xdriverdata *d; *dest=def; *driverdata=d=calloc(1,sizeof(*d)); d->previoust=NULL; d->previousa=NULL; d->cvisible=1; d->width=80; d->height=32; if ((d->dp = XOpenDisplay(NULL)) == NULL) return 0; d->screen = DefaultScreen(d->dp); if (getenv ("AAFont")) font = getenv ("AAFont"); d->font = XLoadFont(d->dp, font); if (!d->font) { XCloseDisplay(d->dp); return 0; } d->font_s = XQueryFont(d->dp, d->font); if (!d->font_s) { XCloseDisplay(d->dp); return 0; } d->fontheight = d->font_s->max_bounds.ascent + d->font_s->max_bounds.descent; d->fontwidth = d->font_s->max_bounds.rbearing - d->font_s->min_bounds.lbearing; d->realfontwidth = d->font_s->max_bounds.width; d->cmap = DefaultColormap(d->dp, d->screen); /*c.flags=DoRed | DoGreen | DoBlue; */ X_AllocColors (d); if (d->bold == d->normal) dest->supported &= ~AA_BOLD_MASK; if (d->dim == d->normal) dest->supported &= ~AA_DIM_MASK; d->attr.event_mask = ExposureMask; d->attr.override_redirect = False; if (p->width) d->width = p->width; if (p->height) d->height = p->height; if (p->maxwidth && d->width > p->maxwidth) d->width = p->maxwidth; if (p->minwidth && d->width < p->minwidth) d->width = p->minwidth; if (p->maxheight && d->height > p->maxheight) d->height = p->maxheight; if (p->minheight && d->height < p->minheight) d->height = p->minheight; d->wi = XCreateWindow(d->dp, RootWindow(d->dp, d->screen), 0, 0, d->width * d->realfontwidth, d->height * d->fontheight, 0, DefaultDepth(d->dp, d->screen), InputOutput, DefaultVisual(d->dp, d->screen), CWBackPixel | CWBorderPixel | CWEventMask, &d->attr); if (!registered) { d->pi = XCreatePixmap(d->dp, d->wi, d->fontwidth, d->fontheight * 256, 1); if (d->pi) { int i; unsigned char c; unsigned char *data; XImage *image; registered = 1; d->specialGC = XCreateGC(d->dp, d->pi, 0L, NULL); XSetForeground(d->dp, d->specialGC, 0); XSetBackground(d->dp, d->specialGC, 0); XFillRectangle(d->dp, d->pi, d->specialGC, 0, 0, d->fontwidth, 256 * d->fontheight); XSetForeground(d->dp, d->specialGC, 1); XSetFont(d->dp, d->specialGC, d->font); for (i = 0; i < 256; i++) { c = i; XDrawString(d->dp, d->pi, d->specialGC, 0, (i + 1) * d->fontheight - d->font_s->descent, (char *)&c, 1); } image = XGetImage(d->dp, d->pi, 0, 0, d->fontwidth, 256 * d->fontheight, 1, XYPixmap); if (image != NULL) { data = malloc(256 * d->fontheight); for (i = 0; i < 256; i++) { int y; font_error = 0; for (y = 0; y < d->fontheight; y++) { int o; o = ((mygetpixel(image, 0, i * d->fontheight + y) != 0) << 7) + ((mygetpixel(image, 1, i * d->fontheight + y) != 0) << 6) + ((mygetpixel(image, 2, i * d->fontheight + y) != 0) << 5) + ((mygetpixel(image, 3, i * d->fontheight + y) != 0) << 4) + ((mygetpixel(image, 4, i * d->fontheight + y) != 0) << 3) + ((mygetpixel(image, 5, i * d->fontheight + y) != 0) << 2) + ((mygetpixel(image, 6, i * d->fontheight + y) != 0) << 1) + ((mygetpixel(image, 7, i * d->fontheight + y) != 0) << 0); data[i * d->fontheight + y] = o; } } aafont.name = "Font used by X server"; aafont.shortname = "current"; aafont.height = d->fontheight; aafont.data = data; aa_registerfont(&aafont); dest->font = &aafont; } } } XStoreName(d->dp, d->wi, "aa for X"); XMapWindow(d->dp, d->wi); X_setinversionmode (getenv ("AAInverted") != NULL, d); d->pixelwidth = -1; d->pixelheight = -1; XSync(d->dp, 0); aa_recommendlowkbd("X11"); return 1; } int __aa_X_getsize(struct aa_context *c,struct xdriverdata *d) { unsigned int px, py; int tmp; Window wtmp; XSync(d->dp, 0); XGetGeometry(d->dp, d->wi, &wtmp, &tmp, &tmp, &px, &py, (unsigned int *) &tmp, (unsigned int *) &tmp); tmp = 0; if (px != d->pixelwidth || py != d->pixelheight) tmp = 1; d->pixelwidth = px; d->pixelheight = py; if (tmp) { if (d->pixmapmode) XFreePixmap(d->dp, d->pi); if (!getenv("AABlink")) d->pi = XCreatePixmap(d->dp, d->wi, d->pixelwidth, d->pixelheight, DefaultDepth(d->dp, d->screen)); else d->pi = BadAlloc; if (d->pi == BadAlloc) { d->pixmapmode = 0; XSetWindowBackground(d->dp, d->wi, d->inverted ? d->invertedblack : d->black); } else { d->pixmapmode = 1; XFillRectangle(d->dp, d->pi, d->blackGC, 0, 0, d->pixelwidth, d->pixelheight); XSetWindowBackgroundPixmap(d->dp, d->wi, d->pi); } c->driverparams.mmwidth = DisplayWidthMM(d->dp, d->screen) * d->pixelwidth / DisplayWidth(d->dp, d->screen); c->driverparams.mmheight = DisplayHeightMM(d->dp, d->screen) * d->pixelheight / DisplayHeight(d->dp, d->screen); if (d->previoust != NULL) free(d->previoust), free(d->previousa); d->previoust=NULL; d->previousa=NULL; X_flush(c); XFlush(d->dp); } XSync(d->dp, 0); return (tmp); } static void X_uninit(aa_context * c) { struct xdriverdata *d=c->driverdata; if (d->previoust != NULL) free(d->previoust), free(d->previousa); if (d->pixmapmode) XFreePixmap(d->dp, d->pi); XCloseDisplay(d->dp); } static void X_getsize(aa_context * c, int *width1, int *height1) { struct xdriverdata *d=c->driverdata; __aa_X_getsize(c,d); *width1 = d->width = d->pixelwidth / d->realfontwidth; *height1 = d->height = d->pixelheight / d->fontheight; } static void X_setattr(struct xdriverdata *d,int attr) { switch (attr) { case 0: case 4: d->currGC = d->normalGC; break; case 1: d->currGC = d->dimGC; break; case 2: d->currGC = d->boldGC; break; case 3: d->currGC = d->blackGC; break; } } /*quite complex but fast drawing routing for X */ #define NATT 5 #define texty(l,a,x) _texty[((l)*NATT+(a))*d->width+(x)] #define rectangles(a,x) _rectangles[(a)*d->height*d->width+(x)] static XTextItem *_texty; static int (*nitem)[NATT]; static int (*startitem)[NATT]; static XRectangle *_rectangles; static int nrectangles[4]; static int drawed; static int area; static void alloctables(struct xdriverdata *d) { _texty = malloc(sizeof(XTextItem) * d->width * NATT * d->height); nitem = calloc(sizeof(*nitem) * d->height,1); startitem = calloc(sizeof(*startitem) * d->height,1); _rectangles = malloc(sizeof(*_rectangles) * d->width * d->height * 4); } static void freetables(void) { free(_texty); free(nitem); free(startitem); free(_rectangles); } static void MyDrawString(struct xdriverdata *d,int attr, int x, int y, unsigned char *c, int i) { XTextItem *it; XRectangle *rect; int n, a; switch (attr) { case AA_NORMAL: case AA_DIM: case AA_BOLD: case AA_BOLDFONT: default: n = 0; break; case AA_REVERSE: n = 1; break; case AA_SPECIAL: n = 2; break; } switch (attr) { default: case AA_SPECIAL: case AA_NORMAL: a = 0; break; case AA_DIM: a = 1; break; case AA_BOLD: a = 2; break; case AA_REVERSE: a = 3; break; case AA_BOLDFONT: a = 4; break; } it = &texty(y, a, nitem[y][a]); it->delta = x * d->realfontwidth - startitem[y][a]; if (!it->delta && x) { it--; it->nchars += i; } else { nitem[y][a]++; it->chars = (char *)c; it->nchars = i; it->font = d->font; drawed = 1; } startitem[y][a] = (x + i) * d->realfontwidth; rect = &rectangles(n, nrectangles[n]); rect->x = x * d->realfontwidth; rect->y = (y) * d->fontheight + 1; rect->width = i * d->realfontwidth; if (nrectangles[n] && (rect - 1)->y == rect->y && (rect - 1)->x + (rect - 1)->width == rect->x) nrectangles[n]--, (--rect)->width += i * d->realfontwidth; rect->height = d->fontheight; nrectangles[n]++; rect = &rectangles(n, nrectangles[3]); rect->x = x * d->realfontwidth; rect->y = (y) * d->fontheight + 1; rect->width = i * d->realfontwidth; if (nrectangles[3] && (rect - 1)->y == rect->y && (rect - 1)->x + (rect - 1)->width == rect->x) nrectangles[3]--, (--rect)->width += i * d->realfontwidth; rect->height = d->fontheight; nrectangles[3]++; area += i; } __AA_CONST static int Black[] = {0, 0, 0, 0, 1, 1}; static void X_flush(aa_context * c) { struct xdriverdata *d=c->driverdata; int x, y, attr; int xs = 0, ys = 0; int l, same; int s = 0; int pos; attr = AA_NORMAL; alloctables(d); drawed = 0; area = 0; if (aa_imgwidth(c) != d->imgwidth || aa_imgheight(c) != d->imgheight) { if (d->previoust != NULL) free(d->previoust), free(d->previousa); d->previoust=NULL; d->previousa=NULL; d->imgwidth = aa_imgwidth(c); d->imgheight =aa_imgheight(c); if (!d->pixmapmode) { XSetWindowBackground(d->dp, d->wi, d->inverted ? d->invertedblack : d->black); } else { XFillRectangle(d->dp, d->pi, d->blackGC, 0, 0, d->pixelwidth, d->pixelheight); XSetWindowBackgroundPixmap(d->dp, d->wi, d->pi); XClearWindow(d->dp, d->wi); } } nrectangles[0] = 0; nrectangles[1] = 0; nrectangles[2] = 0; nrectangles[3] = 0; if (d->previoust == NULL) { d->previoust = malloc(d->width * d->height); d->previousa = calloc(d->width * d->height, 1); memset(d->previoust, ' ', d->width * d->height); } for (y = 0; y < aa_scrheight(c); y++) { s = l = 0; xs = 0; ys = y; for (x = 0; x < aa_scrwidth(c); x++) { pos = x + y * aa_scrwidth(c); if (s > 5 || (c->attrbuffer[pos] != attr && (c->textbuffer[pos] != ' ' || Black[c->attrbuffer[pos]] || Black[attr]))) { if (l - s) MyDrawString(d,attr, xs, ys, &c->textbuffer[xs + ys * aa_scrwidth(c)], l - s); attr = c->attrbuffer[pos]; s = l = 0; xs = x; ys = y; } if ((d->previoust[pos] == c->textbuffer[pos] && d->previousa[pos] == c->attrbuffer[pos]) || (!Black[attr] && d->previoust[pos] == ' ' && c->textbuffer[pos] == ' ' && !Black[d->previousa[pos]])) same = 1; else same = 0; if (xs == x && same) xs++; else { if (same) s++; else s = 0; l++; } } if (l - s) MyDrawString(d,attr, xs, ys, &c->textbuffer[xs + ys * aa_scrwidth(c)], l - s); } if (drawed) { memcpy(d->previousa, c->attrbuffer, d->width * d->height); memcpy(d->previoust, c->textbuffer, d->width * d->height); if (nrectangles[0]) XFillRectangles(d->dp, dr, d->blackGC, &rectangles(0, 0), nrectangles[0]); if (nrectangles[1]) XFillRectangles(d->dp, dr, d->normalGC, &rectangles(1, 0), nrectangles[1]); if (nrectangles[2]) XFillRectangles(d->dp, dr, d->specialGC, &rectangles(2, 0), nrectangles[2]); if (d->cvisible) XDrawLine(d->dp, dr, d->normalGC, d->Xpos * d->realfontwidth, (d->Ypos + 1) * d->fontheight - 1, (d->Xpos + 1) * d->realfontwidth - 1, (d->Ypos + 1) * d->fontheight - 1); for (y = 0; y < d->height; y++) { for (x = 0; x < NATT; x++) { if (nitem[y][x]) { X_setattr(d,x); XDrawText(d->dp, dr, d->currGC, 0, (y + 1) * d->fontheight - d->font_s->descent, &texty(y, x, 0), nitem[y][x]); if (x == 4) XDrawText(d->dp, dr, d->currGC, 1, (y + 1) * d->fontheight - d->font_s->descent, &texty(y, x, 0), nitem[y][x]); } } } if (d->pixmapmode) { if (nrectangles[3] && area < d->width*d->height/2 && nrectangles[3] < 5) { int i; /*fprintf (stderr, "%i %i\n",nrectangles[3], area);*/ for (i = 0; i < nrectangles[3]; i++) XClearArea (d->dp, d->wi, rectangles(3, i).x, rectangles(3,i).y, rectangles(3,i).width, rectangles(3,i).height, 0); } else XClearWindow(d->dp, d->wi); } /*if(!d->pixmapmode) */ XSync(d->dp, 0); } freetables(); } void __aa_X_redraw(aa_context *c) { struct xdriverdata *d=c->driverdata; if (d->pixmapmode && d->previoust != NULL) { XFlush(d->dp); return; } if (d->previoust != NULL) free(d->previoust), free(d->previousa); d->previoust=NULL; d->previousa=NULL; X_flush(c); XFlush(d->dp); } static void X_gotoxy(aa_context * c, int x, int y) { struct xdriverdata *d=c->driverdata; if (d->Xpos != x || d->Ypos != y) { if (d->previoust != NULL) d->previoust[d->Ypos * d->width + d->Xpos] = 255; d->Xpos = x; d->Ypos = y; X_flush(c); } } static void X_cursor(aa_context * c, int mode) { struct xdriverdata *d=c->driverdata; d->cvisible = mode; } __AA_CONST struct aa_driver X11_d = { "X11", "X11 driver 1.1", X_init, X_uninit, X_getsize, NULL, NULL, X_gotoxy, X_flush, X_cursor }; #endif aalib-1.4.0/src/aaxkbd.c0000644000766200001440000000463307272031253010445 #include #include #include #include #include "config.h" #ifdef X11_KBDDRIVER #include #include #include #include "aalib.h" #include "aaint.h" #include "aaxint.h" #define dr (d->pixmapmode?d->pi:d->wi) static int X_init(aa_context * c, int mode) { struct xdriverdata *d=c->driverdata; if(c->driver!=&X11_d) return 0; d->attr.event_mask |= StructureNotifyMask | KeyPressMask | (mode & AA_SENDRELEASE ? KeyReleaseMask : 0); XSelectInput(d->dp, d->wi, d->attr.event_mask); aa_recommendlowmouse("X11"); return 1; } static void X_uninit(aa_context * c) { struct xdriverdata *d=c->driverdata; d->attr.event_mask &= ~(KeyPressMask | KeyReleaseMask); XSelectInput(d->dp, d->wi, d->attr.event_mask); } static int decodekey(XEvent * ev) { KeySym ksym; char name[256]; switch (ksym = XLookupKeysym(&ev->xkey, 0)) { case XK_Left: return (AA_LEFT); case XK_Right: return (AA_RIGHT); case XK_Up: return (AA_UP); case XK_Down: return (AA_DOWN); case XK_Escape: return (AA_ESC); case XK_space: return (' '); case XK_Return: #ifdef XK_cr case XK_cr: #endif return (13); case XK_BackSpace: case XK_Delete: return (AA_BACKSPACE); } name[XLookupString(&ev->xkey,name,256,&ksym,NULL)]=0; if(strlen(name)!=1) return (AA_UNKNOWN+ksym); return name[0]; } extern int __X_mousex, __X_mousey, __X_buttons; static int X_getchar(aa_context * c, int wait) { struct xdriverdata *d=c->driverdata; while (1) { XEvent ev; if (!wait && !XPending(d->dp)) return AA_NONE; XNextEvent(d->dp, &ev); switch (ev.type) { case ButtonPress: ev.xbutton.state |= 1 << (ev.xbutton.button + 7); goto skip; case ButtonRelease: ev.xbutton.state &= ~(1 << (ev.xbutton.button + 7)); skip:; case MotionNotify: __X_mousex = ev.xbutton.x; __X_mousey = ev.xbutton.y; __X_buttons = ev.xbutton.state; return (AA_MOUSE); case Expose: XSync(d->dp, 0); __aa_X_redraw(c); break; case ConfigureNotify: if (__aa_X_getsize(c,d)) return (AA_RESIZE); break; case KeyPress: return (decodekey(&ev)); case KeyRelease: return (decodekey(&ev) | AA_RELEASE); } } } __AA_CONST struct aa_kbddriver kbd_X11_d = { "X11", "X11 keyboard driver 1.0", AA_SENDRELEASE, X_init, X_uninit, X_getchar, }; #endif aalib-1.4.0/src/aaxmouse.c0000644000766200001440000000252507272031253011033 #include #include #include #include #include "config.h" #ifdef X11_MOUSEDRIVER #include #include #include #include "aalib.h" #include "aaint.h" #include "aaxint.h" static int X_init(aa_context * c, int mode) { struct xdriverdata *d=c->driverdata; if (c->driver!=&X11_d) return 0; d->attr.event_mask |= ButtonPressMask | ButtonReleaseMask | (mode & AA_MOUSEMOVEMASK ? PointerMotionMask : 0); XSelectInput(d->dp, d->wi, d->attr.event_mask); return 1; } static void X_uninit(aa_context * c) { struct xdriverdata *d=c->driverdata; d->attr.event_mask &= ~(ButtonPressMask | ButtonReleaseMask | PointerMotionMask | ButtonMotionMask); XSelectInput(d->dp, d->wi, d->attr.event_mask); } int __X_mousex, __X_mousey, __X_buttons; static void X_getmouse(aa_context * c, int *x, int *y, int *b) { struct xdriverdata *d=c->driverdata; *x = __X_mousex / d->fontwidth; *y = __X_mousey / d->fontheight; *b = 0; if (__X_buttons & Button1Mask) *b |= AA_BUTTON1; if (__X_buttons & Button2Mask) *b |= AA_BUTTON2; if (__X_buttons & Button3Mask) *b |= AA_BUTTON3; } __AA_CONST struct aa_mousedriver mouse_X11_d = { "X11", "X11 mouse driver 1.0", AA_MOUSEALLMASK, X_init, X_uninit, X_getmouse, NULL }; #endif aalib-1.4.0/src/fontgl.c0000644000766200001440000002574407272031253010512 #include "config.h" #include "aalib.h" /* binary image of font8x8 follows */ __AA_CONST unsigned char fontgldata[] = { 0, 0, 0, 0, 0, 0, 0, 0, 126, 129, 165, 129, 189, 129, 126, 0, /* 0 to 15 */ 126, 255, 219, 255, 195, 255, 126, 0, 54, 127, 127, 127, 62, 28, 8, 0, /* 16 to 31 */ 8, 28, 62, 127, 62, 28, 8, 0, 28, 28, 8, 107, 127, 107, 8, 28, /* 32 to 47 */ 8, 28, 62, 127, 62, 8, 28, 62, 0, 0, 24, 60, 60, 24, 0, 0, /* 48 to 63 */ 255, 255, 231, 195, 195, 231, 255, 255, 0, 60, 102, 66, 66, 102, 60, 0, /* 64 to 79 */ 255, 195, 153, 189, 189, 153, 195, 255, 15, 7, 13, 60, 102, 102, 102, 60, /* 80 to 95 */ 60, 102, 102, 102, 60, 24, 126, 24, 48, 56, 60, 54, 52, 112, 240, 224, /* 96 to 111 */ 127, 99, 127, 99, 99, 103, 230, 192, 24, 219, 126, 102, 102, 126, 219, 24, /* 112 to 127 */ 64, 112, 124, 127, 124, 112, 64, 0, 1, 7, 31, 127, 31, 7, 1, 0, /* 128 to 143 */ 24, 60, 126, 24, 24, 126, 60, 24, 102, 102, 102, 102, 102, 0, 102, 0, /* 144 to 159 */ 63, 122, 122, 58, 10, 10, 10, 0, 30, 51, 28, 54, 54, 28, 102, 60, /* 160 to 175 */ 0, 0, 0, 0, 126, 126, 126, 0, 24, 60, 126, 24, 126, 60, 24, 126, /* 176 to 191 */ 24, 60, 126, 24, 24, 24, 24, 0, 24, 24, 24, 24, 126, 60, 24, 0, /* 192 to 207 */ 0, 12, 14, 127, 14, 12, 0, 0, 0, 24, 56, 127, 56, 24, 0, 0, /* 208 to 223 */ 0, 0, 96, 96, 96, 127, 0, 0, 0, 36, 102, 255, 102, 36, 0, 0, /* 224 to 239 */ 0, 24, 60, 126, 255, 255, 0, 0, 0, 255, 255, 126, 60, 24, 0, 0, /* 240 to 255 */ 0, 0, 0, 0, 0, 0, 0, 0, 24, 24, 24, 24, 24, 0, 24, 0, /* 256 to 271 */ 102, 102, 102, 0, 0, 0, 0, 0, 108, 108, 254, 108, 254, 108, 108, 0, /* 272 to 287 */ 16, 124, 208, 124, 22, 124, 16, 0, 0, 198, 204, 24, 48, 102, 198, 0, /* 288 to 303 */ 56, 108, 56, 118, 220, 204, 118, 0, 24, 24, 48, 0, 0, 0, 0, 0, /* 304 to 319 */ 12, 24, 48, 48, 48, 24, 12, 0, 48, 24, 12, 12, 12, 24, 48, 0, /* 320 to 335 */ 0, 108, 56, 254, 56, 108, 0, 0, 0, 24, 24, 126, 24, 24, 0, 0, /* 336 to 351 */ 0, 0, 0, 0, 0, 24, 24, 48, 0, 0, 0, 126, 0, 0, 0, 0, /* 352 to 367 */ 0, 0, 0, 0, 0, 48, 48, 0, 0, 6, 12, 24, 48, 96, 192, 0, /* 368 to 383 */ 60, 102, 110, 126, 118, 102, 60, 0, 12, 28, 60, 12, 12, 12, 12, 0, /* 384 to 399 */ 60, 102, 6, 28, 48, 96, 126, 0, 60, 102, 6, 28, 6, 102, 60, 0, /* 400 to 415 */ 28, 60, 108, 204, 254, 12, 12, 0, 126, 96, 96, 124, 6, 102, 60, 0, /* 416 to 431 */ 60, 96, 96, 124, 102, 102, 60, 0, 126, 6, 6, 12, 24, 48, 48, 0, /* 432 to 447 */ 60, 102, 102, 60, 102, 102, 60, 0, 60, 102, 102, 62, 6, 6, 60, 0, /* 448 to 463 */ 0, 48, 48, 0, 0, 48, 48, 0, 0, 24, 24, 0, 0, 24, 24, 48, /* 464 to 479 */ 12, 24, 48, 96, 48, 24, 12, 0, 0, 0, 126, 0, 0, 126, 0, 0, /* 480 to 495 */ 48, 24, 12, 6, 12, 24, 48, 0, 60, 102, 6, 12, 24, 0, 24, 0, /* 496 to 511 */ 60, 102, 110, 110, 108, 96, 60, 0, 24, 60, 102, 102, 126, 102, 102, 0, /* 512 to 527 */ 124, 102, 102, 124, 102, 102, 124, 0, 60, 102, 96, 96, 96, 102, 60, 0, /* 528 to 543 */ 124, 102, 102, 102, 102, 102, 124, 0, 126, 96, 96, 124, 96, 96, 126, 0, /* 544 to 559 */ 126, 96, 96, 124, 96, 96, 96, 0, 60, 102, 96, 110, 102, 102, 60, 0, /* 560 to 575 */ 102, 102, 102, 126, 102, 102, 102, 0, 60, 24, 24, 24, 24, 24, 60, 0, /* 576 to 591 */ 6, 6, 6, 6, 102, 102, 60, 0, 102, 108, 120, 112, 120, 108, 102, 0, /* 592 to 607 */ 96, 96, 96, 96, 96, 96, 126, 0, 198, 238, 254, 214, 198, 198, 198, 0, /* 608 to 623 */ 102, 118, 126, 110, 102, 102, 102, 0, 60, 102, 102, 102, 102, 102, 60, 0, /* 624 to 639 */ 124, 102, 102, 124, 96, 96, 96, 0, 60, 102, 102, 102, 102, 110, 60, 6, /* 640 to 655 */ 124, 102, 102, 124, 102, 102, 102, 0, 60, 102, 96, 60, 6, 102, 60, 0, /* 656 to 671 */ 126, 24, 24, 24, 24, 24, 24, 0, 102, 102, 102, 102, 102, 102, 60, 0, /* 672 to 687 */ 102, 102, 102, 102, 102, 60, 24, 0, 198, 198, 198, 214, 254, 238, 198, 0, /* 688 to 703 */ 102, 102, 60, 24, 60, 102, 102, 0, 102, 102, 102, 60, 24, 24, 24, 0, /* 704 to 719 */ 126, 6, 12, 24, 48, 96, 126, 0, 60, 48, 48, 48, 48, 48, 60, 0, /* 720 to 735 */ 0, 192, 96, 48, 24, 12, 6, 0, 60, 12, 12, 12, 12, 12, 60, 0, /* 736 to 751 */ 24, 60, 102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, /* 752 to 767 */ 24, 24, 12, 0, 0, 0, 0, 0, 0, 0, 60, 6, 62, 102, 62, 0, /* 768 to 783 */ 96, 96, 96, 124, 102, 102, 124, 0, 0, 0, 60, 102, 96, 102, 60, 0, /* 784 to 799 */ 6, 6, 6, 62, 102, 102, 62, 0, 0, 0, 60, 102, 126, 96, 62, 0, /* 800 to 815 */ 28, 54, 48, 124, 48, 48, 48, 0, 0, 0, 62, 102, 102, 62, 6, 60, /* 816 to 831 */ 96, 96, 124, 102, 102, 102, 102, 0, 24, 0, 24, 24, 24, 24, 24, 0, /* 832 to 847 */ 12, 0, 12, 12, 12, 12, 108, 56, 96, 96, 102, 108, 120, 108, 102, 0, /* 848 to 863 */ 48, 48, 48, 48, 48, 48, 24, 0, 0, 0, 236, 254, 214, 214, 198, 0, /* 864 to 879 */ 0, 0, 124, 102, 102, 102, 102, 0, 0, 0, 60, 102, 102, 102, 60, 0, /* 880 to 895 */ 0, 0, 124, 102, 102, 124, 96, 96, 0, 0, 62, 102, 102, 62, 6, 6, /* 896 to 911 */ 0, 0, 124, 102, 96, 96, 96, 0, 0, 0, 62, 96, 60, 6, 124, 0, /* 912 to 927 */ 48, 48, 124, 48, 48, 54, 28, 0, 0, 0, 102, 102, 102, 102, 62, 0, /* 928 to 943 */ 0, 0, 102, 102, 102, 60, 24, 0, 0, 0, 198, 214, 254, 238, 68, 0, /* 944 to 959 */ 0, 0, 102, 60, 24, 60, 102, 0, 0, 0, 102, 102, 102, 62, 6, 60, /* 960 to 975 */ 0, 0, 126, 12, 24, 48, 126, 0, 28, 48, 48, 96, 48, 48, 28, 0, /* 976 to 991 */ 24, 24, 24, 24, 24, 24, 24, 0, 56, 12, 12, 6, 12, 12, 56, 0, /* 992 to 1007 */ 118, 220, 0, 0, 0, 0, 0, 0, 0, 0, 24, 60, 102, 102, 126, 0, /* 1008 to 1023 */ 60, 102, 96, 96, 102, 60, 24, 48, 102, 0, 102, 102, 102, 102, 62, 0, /* 1024 to 1039 */ 14, 0, 60, 102, 126, 96, 60, 0, 60, 102, 60, 6, 62, 102, 62, 0, /* 1040 to 1055 */ #ifdef __FULL_FONT 102, 0, 60, 6, 62, 102, 62, 0, 112, 0, 60, 6, 62, 102, 62, 0, /* 1056 to 1071 */ 24, 24, 60, 6, 62, 102, 62, 0, 0, 0, 62, 96, 96, 62, 24, 48, /* 1072 to 1087 */ 60, 102, 60, 102, 126, 96, 60, 0, 102, 0, 60, 102, 126, 96, 60, 0, /* 1088 to 1103 */ 112, 0, 60, 102, 126, 96, 60, 0, 102, 0, 24, 24, 24, 24, 24, 0, /* 1104 to 1119 */ 60, 102, 24, 24, 24, 24, 24, 0, 112, 0, 24, 24, 24, 24, 24, 0, /* 1120 to 1135 */ 198, 56, 108, 198, 254, 198, 198, 0, 24, 24, 0, 60, 102, 126, 102, 0, /* 1136 to 1151 */ 14, 0, 124, 96, 120, 96, 124, 0, 0, 0, 126, 26, 126, 216, 126, 0, /* 1152 to 1167 */ 62, 120, 216, 222, 248, 216, 222, 0, 60, 102, 60, 102, 102, 102, 60, 0, /* 1168 to 1183 */ 102, 0, 60, 102, 102, 102, 60, 0, 112, 0, 60, 102, 102, 102, 60, 0, /* 1184 to 1199 */ 60, 102, 0, 102, 102, 102, 62, 0, 112, 0, 102, 102, 102, 102, 62, 0, /* 1200 to 1215 */ 102, 0, 102, 102, 102, 62, 6, 60, 102, 60, 102, 102, 102, 102, 60, 0, /* 1216 to 1231 */ 102, 0, 102, 102, 102, 102, 60, 0, 12, 12, 62, 96, 96, 62, 12, 12, /* 1232 to 1247 */ 56, 108, 96, 240, 96, 102, 252, 0, 102, 102, 60, 24, 126, 24, 126, 24, /* 1248 to 1263 */ 124, 102, 102, 124, 102, 111, 102, 99, 14, 27, 24, 60, 24, 24, 120, 48, /* 1264 to 1279 */ 14, 0, 60, 6, 62, 102, 62, 0, 14, 0, 24, 24, 24, 24, 24, 0, /* 1280 to 1295 */ 14, 0, 60, 102, 102, 102, 60, 0, 14, 0, 102, 102, 102, 102, 62, 0, /* 1296 to 1311 */ 118, 220, 0, 124, 102, 102, 102, 0, 126, 0, 102, 118, 126, 110, 102, 0, /* 1312 to 1327 */ 62, 102, 102, 62, 0, 126, 0, 0, 60, 102, 102, 60, 0, 126, 0, 0, /* 1328 to 1343 */ 24, 0, 24, 48, 96, 102, 60, 0, 0, 0, 0, 126, 96, 96, 0, 0, /* 1344 to 1359 */ 0, 0, 0, 126, 6, 6, 0, 0, 198, 204, 216, 62, 99, 198, 12, 31, /* 1360 to 1375 */ 198, 204, 216, 54, 110, 214, 31, 6, 24, 0, 24, 24, 24, 24, 24, 0, /* 1376 to 1391 */ 0, 54, 108, 216, 108, 54, 0, 0, 0, 216, 108, 54, 108, 216, 0, 0, /* 1392 to 1407 */ 34, 136, 34, 136, 34, 136, 34, 136, 85, 170, 85, 170, 85, 170, 85, 170, /* 1408 to 1423 */ 221, 119, 221, 119, 221, 119, 221, 119, 8, 8, 8, 8, 8, 8, 8, 8, /* 1424 to 1439 */ 8, 8, 8, 8, 248, 8, 8, 8, 8, 8, 8, 248, 248, 8, 8, 8, /* 1440 to 1455 */ 28, 28, 28, 28, 252, 28, 28, 28, 0, 0, 0, 0, 252, 28, 28, 28, /* 1456 to 1471 */ 0, 0, 0, 248, 248, 8, 8, 8, 28, 28, 28, 252, 252, 28, 28, 28, /* 1472 to 1487 */ 28, 28, 28, 28, 28, 28, 28, 28, 0, 0, 0, 252, 252, 28, 28, 28, /* 1488 to 1503 */ 28, 28, 28, 252, 252, 0, 0, 0, 28, 28, 28, 28, 252, 0, 0, 0, /* 1504 to 1519 */ 8, 8, 8, 248, 248, 0, 0, 0, 0, 0, 0, 0, 248, 8, 8, 8, /* 1520 to 1535 */ 8, 8, 8, 8, 15, 0, 0, 0, 8, 8, 8, 8, 255, 0, 0, 0, /* 1536 to 1551 */ 0, 0, 0, 0, 255, 8, 8, 8, 8, 8, 8, 8, 15, 8, 8, 8, /* 1552 to 1567 */ 0, 0, 0, 0, 255, 0, 0, 0, 8, 8, 8, 8, 255, 8, 8, 8, /* 1568 to 1583 */ 8, 8, 8, 15, 15, 8, 8, 8, 28, 28, 28, 28, 31, 28, 28, 28, /* 1584 to 1599 */ 28, 28, 28, 31, 31, 0, 0, 0, 0, 0, 0, 31, 31, 28, 28, 28, /* 1600 to 1615 */ 28, 28, 28, 255, 255, 0, 0, 0, 0, 0, 0, 255, 255, 28, 28, 28, /* 1616 to 1631 */ 28, 28, 28, 31, 31, 28, 28, 28, 0, 0, 0, 255, 255, 0, 0, 0, /* 1632 to 1647 */ 28, 28, 28, 255, 255, 28, 28, 28, 8, 8, 8, 255, 255, 0, 0, 0, /* 1648 to 1663 */ 28, 28, 28, 28, 255, 0, 0, 0, 0, 0, 0, 255, 255, 8, 8, 8, /* 1664 to 1679 */ 0, 0, 0, 0, 255, 28, 28, 28, 28, 28, 28, 28, 31, 0, 0, 0, /* 1680 to 1695 */ 8, 8, 8, 15, 15, 0, 0, 0, 0, 0, 0, 15, 15, 8, 8, 8, /* 1696 to 1711 */ 0, 0, 0, 0, 31, 28, 28, 28, 28, 28, 28, 28, 255, 28, 28, 28, /* 1712 to 1727 */ 8, 8, 8, 255, 255, 8, 8, 8, 8, 8, 8, 8, 248, 0, 0, 0, /* 1728 to 1743 */ 0, 0, 0, 0, 15, 8, 8, 8, 255, 255, 255, 255, 255, 255, 255, 255, /* 1744 to 1759 */ 0, 0, 0, 0, 255, 255, 255, 255, 240, 240, 240, 240, 240, 240, 240, 240, /* 1760 to 1775 */ 15, 15, 15, 15, 15, 15, 15, 15, 255, 255, 255, 255, 0, 0, 0, 0, /* 1776 to 1791 */ 0, 0, 118, 204, 204, 204, 118, 0, 60, 102, 102, 124, 102, 102, 124, 96, /* 1792 to 1807 */ 126, 102, 96, 96, 96, 96, 96, 0, 0, 0, 254, 108, 108, 108, 102, 0, /* 1808 to 1823 */ 126, 102, 48, 24, 48, 102, 126, 0, 0, 0, 62, 108, 108, 108, 56, 0, /* 1824 to 1839 */ 0, 0, 102, 102, 102, 102, 127, 192, 0, 0, 126, 216, 24, 24, 12, 0, /* 1840 to 1855 */ 124, 56, 124, 214, 214, 124, 56, 124, 124, 198, 198, 254, 198, 198, 124, 0, /* 1856 to 1871 */ 124, 198, 198, 198, 108, 108, 238, 0, 30, 48, 24, 60, 102, 102, 60, 0, /* 1872 to 1887 */ 0, 0, 126, 219, 219, 126, 0, 0, 3, 6, 62, 107, 115, 62, 96, 192, /* 1888 to 1903 */ 30, 48, 96, 126, 96, 48, 30, 0, 124, 198, 198, 198, 198, 198, 198, 0, /* 1904 to 1919 */ 0, 126, 0, 126, 0, 126, 0, 0, 24, 24, 126, 24, 24, 0, 126, 0, /* 1920 to 1935 */ 48, 24, 12, 24, 48, 0, 126, 0, 12, 24, 48, 24, 12, 0, 126, 0, /* 1936 to 1951 */ 14, 27, 27, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 216, 216, 112, /* 1952 to 1967 */ 24, 24, 0, 126, 0, 24, 24, 0, 0, 118, 220, 0, 118, 220, 0, 0, /* 1968 to 1983 */ 60, 102, 102, 60, 0, 0, 0, 0, 0, 0, 0, 24, 24, 0, 0, 0, /* 1984 to 1999 */ 0, 0, 0, 0, 24, 0, 0, 0, 30, 24, 24, 24, 24, 216, 120, 56, /* 2000 to 2015 */ 120, 108, 108, 108, 108, 0, 0, 0, 56, 12, 24, 48, 60, 0, 0, 0, /* 2016 to 2031 */ 0, 0, 60, 60, 60, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 /* 2032 to 2047 */ #endif }; __AA_CONST struct aa_font aa_fontgl = {fontgldata, 8, "Font 8x8 from vgagl", "vgagl8"}; aalib-1.4.0/src/font16.c0000644000766200001440000006350507272031253010333 #include "config.h" /* binary image of font8x16 follows */ #include "aalib.h" __AA_CONST static unsigned char font16data[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x81, 0xa5, 0x81, 0x81, 0xbd, 0x99, 0x81, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0xff, 0xdb, 0xff, 0xff, 0xc3, 0xe7, 0xff, 0xff, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6c, 0xfe, 0xfe, 0xfe, 0xfe, 0x7c, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x7c, 0xfe, 0x7c, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x3c, 0x3c, 0xe7, 0xe7, 0xe7, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x3c, 0x7e, 0xff, 0xff, 0x7e, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x3c, 0x3c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe7, 0xc3, 0xc3, 0xe7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x66, 0x42, 0x42, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc3, 0x99, 0xbd, 0xbd, 0x99, 0xc3, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x1e, 0x0e, 0x1a, 0x32, 0x78, 0xcc, 0xcc, 0xcc, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x7e, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x33, 0x3f, 0x30, 0x30, 0x30, 0x30, 0x70, 0xf0, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x63, 0x7f, 0x63, 0x63, 0x63, 0x63, 0x67, 0xe7, 0xe6, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0xdb, 0x3c, 0xe7, 0x3c, 0xdb, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xfe, 0xf8, 0xf0, 0xe0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x06, 0x0e, 0x1e, 0x3e, 0xfe, 0x3e, 0x1e, 0x0e, 0x06, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x3c, 0x7e, 0x18, 0x18, 0x18, 0x7e, 0x3c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x00, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xdb, 0xdb, 0xdb, 0x7b, 0x1b, 0x1b, 0x1b, 0x1b, 0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0x60, 0x38, 0x6c, 0xc6, 0xc6, 0x6c, 0x38, 0x0c, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xfe, 0xfe, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x3c, 0x7e, 0x18, 0x18, 0x18, 0x7e, 0x3c, 0x18, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x3c, 0x7e, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x7e, 0x3c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x0c, 0xfe, 0x0c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x60, 0xfe, 0x60, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xc0, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x66, 0xff, 0x66, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x38, 0x7c, 0x7c, 0xfe, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xfe, 0x7c, 0x7c, 0x38, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x3c, 0x3c, 0x3c, 0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x66, 0x66, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6c, 0x6c, 0xfe, 0x6c, 0x6c, 0x6c, 0xfe, 0x6c, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x7c, 0xc6, 0xc2, 0xc0, 0x7c, 0x06, 0x06, 0x86, 0xc6, 0x7c, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc2, 0xc6, 0x0c, 0x18, 0x30, 0x60, 0xc6, 0x86, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x6c, 0x6c, 0x38, 0x76, 0xdc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x30, 0x30, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x18, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x18, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x18, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x3c, 0xff, 0x3c, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x7e, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x06, 0x0c, 0x18, 0x30, 0x60, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xce, 0xde, 0xf6, 0xe6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x38, 0x78, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0x06, 0x0c, 0x18, 0x30, 0x60, 0xc0, 0xc6, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0x06, 0x06, 0x3c, 0x06, 0x06, 0x06, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x1c, 0x3c, 0x6c, 0xcc, 0xfe, 0x0c, 0x0c, 0x0c, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xc0, 0xc0, 0xc0, 0xfc, 0x06, 0x06, 0x06, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x60, 0xc0, 0xc0, 0xfc, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xc6, 0x06, 0x06, 0x0c, 0x18, 0x30, 0x30, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x06, 0x06, 0x0c, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x18, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x0c, 0x18, 0x30, 0x60, 0x30, 0x18, 0x0c, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x30, 0x18, 0x0c, 0x06, 0x0c, 0x18, 0x30, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0x0c, 0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xde, 0xde, 0xde, 0xdc, 0xc0, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x66, 0x66, 0x66, 0x7c, 0x66, 0x66, 0x66, 0x66, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x66, 0xc2, 0xc0, 0xc0, 0xc0, 0xc0, 0xc2, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x6c, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x6c, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 0x60, 0x62, 0x66, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 0x60, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x66, 0xc2, 0xc0, 0xc0, 0xde, 0xc6, 0xc6, 0x66, 0x3a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0xcc, 0xcc, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe6, 0x66, 0x66, 0x6c, 0x78, 0x78, 0x6c, 0x66, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x62, 0x66, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc3, 0xe7, 0xff, 0xff, 0xdb, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xe6, 0xf6, 0xfe, 0xde, 0xce, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x66, 0x66, 0x66, 0x7c, 0x60, 0x60, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xd6, 0xde, 0x7c, 0x0c, 0x0e, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x66, 0x66, 0x66, 0x7c, 0x6c, 0x66, 0x66, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0x60, 0x38, 0x0c, 0x06, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xdb, 0x99, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0x66, 0x3c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0xdb, 0xdb, 0xff, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc3, 0xc3, 0x66, 0x3c, 0x18, 0x18, 0x3c, 0x66, 0xc3, 0xc3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc3, 0xc3, 0xc3, 0x66, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xc3, 0x86, 0x0c, 0x18, 0x30, 0x60, 0xc1, 0xc3, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0x70, 0x38, 0x1c, 0x0e, 0x06, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x6c, 0xc6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x30, 0x30, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x60, 0x60, 0x78, 0x6c, 0x66, 0x66, 0x66, 0x66, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc0, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x0c, 0x0c, 0x3c, 0x6c, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x6c, 0x64, 0x60, 0xf0, 0x60, 0x60, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x7c, 0x0c, 0xcc, 0x78, 0x00, 0x00, 0x00, 0xe0, 0x60, 0x60, 0x6c, 0x76, 0x66, 0x66, 0x66, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x06, 0x00, 0x0e, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x66, 0x66, 0x3c, 0x00, 0x00, 0x00, 0xe0, 0x60, 0x60, 0x66, 0x6c, 0x78, 0x78, 0x6c, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe6, 0xff, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x66, 0x66, 0x66, 0x66, 0x66, 0x7c, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x7c, 0x0c, 0x0c, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x76, 0x66, 0x60, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0x60, 0x38, 0x0c, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x30, 0x30, 0xfc, 0x30, 0x30, 0x30, 0x30, 0x36, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc3, 0xc3, 0xc3, 0xc3, 0x66, 0x3c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc3, 0xc3, 0xc3, 0xdb, 0xdb, 0xff, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc3, 0x66, 0x3c, 0x18, 0x3c, 0x66, 0xc3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x0c, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xcc, 0x18, 0x30, 0x60, 0xc6, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x18, 0x18, 0x18, 0x70, 0x18, 0x18, 0x18, 0x18, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x18, 0x18, 0x18, 0x0e, 0x18, 0x18, 0x18, 0x18, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xc6, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x66, 0xc2, 0xc0, 0xc0, 0xc0, 0xc2, 0x66, 0x3c, 0x0c, 0x06, 0x7c, 0x00, 0x00, 0x00, 0x00, 0xcc, 0x00, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x18, 0x30, 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x6c, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0x00, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x30, 0x18, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x6c, 0x38, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x66, 0x60, 0x60, 0x66, 0x3c, 0x0c, 0x06, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x6c, 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0x00, 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x30, 0x18, 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x00, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x3c, 0x66, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x30, 0x18, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0x00, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00, 0x38, 0x6c, 0x38, 0x00, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00, 0x18, 0x30, 0x60, 0x00, 0xfe, 0x66, 0x60, 0x7c, 0x60, 0x60, 0x66, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6e, 0x3b, 0x1b, 0x7e, 0xd8, 0xdc, 0x77, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x6c, 0xcc, 0xcc, 0xfe, 0xcc, 0xcc, 0xcc, 0xcc, 0xce, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x6c, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x30, 0x18, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x78, 0xcc, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x30, 0x18, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x0c, 0x78, 0x00, 0x00, 0xc6, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x7e, 0xc3, 0xc0, 0xc0, 0xc0, 0xc3, 0x7e, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x6c, 0x64, 0x60, 0xf0, 0x60, 0x60, 0x60, 0x60, 0xe6, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc3, 0x66, 0x3c, 0x18, 0xff, 0x18, 0xff, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x66, 0x66, 0x7c, 0x62, 0x66, 0x6f, 0x66, 0x66, 0x66, 0xf3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x1b, 0x18, 0x18, 0x18, 0x7e, 0x18, 0x18, 0x18, 0x18, 0x18, 0xd8, 0x70, 0x00, 0x00, 0x00, 0x18, 0x30, 0x60, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x18, 0x30, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x30, 0x60, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x30, 0x60, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xdc, 0x00, 0xdc, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00, 0x76, 0xdc, 0x00, 0xc6, 0xe6, 0xf6, 0xfe, 0xde, 0xce, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x6c, 0x6c, 0x3e, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x6c, 0x6c, 0x38, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x30, 0x00, 0x30, 0x30, 0x60, 0xc0, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xc0, 0xc0, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x06, 0x06, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xc2, 0xc6, 0xcc, 0x18, 0x30, 0x60, 0xce, 0x9b, 0x06, 0x0c, 0x1f, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xc2, 0xc6, 0xcc, 0x18, 0x30, 0x66, 0xce, 0x96, 0x3e, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x18, 0x18, 0x18, 0x3c, 0x3c, 0x3c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x6c, 0xd8, 0x6c, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd8, 0x6c, 0x36, 0x6c, 0xd8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x44, 0x11, 0x44, 0x11, 0x44, 0x11, 0x44, 0x11, 0x44, 0x11, 0x44, 0x11, 0x44, 0x11, 0x44, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0xdd, 0x77, 0xdd, 0x77, 0xdd, 0x77, 0xdd, 0x77, 0xdd, 0x77, 0xdd, 0x77, 0xdd, 0x77, 0xdd, 0x77, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xf8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xf8, 0x18, 0xf8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0xf6, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x18, 0xf8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x36, 0x36, 0x36, 0x36, 0x36, 0xf6, 0x06, 0xf6, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x06, 0xf6, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0xf6, 0x06, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0xf8, 0x18, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1f, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1f, 0x18, 0x1f, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x37, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x37, 0x30, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x30, 0x37, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0xf7, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0xf7, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x37, 0x30, 0x37, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x36, 0x36, 0x36, 0x36, 0xf7, 0x00, 0xf7, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1f, 0x18, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x18, 0x1f, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0xff, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0x18, 0xff, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xdc, 0xd8, 0xd8, 0xd8, 0xdc, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0xcc, 0xcc, 0xcc, 0xd8, 0xcc, 0xc6, 0xc6, 0xc6, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xc6, 0xc6, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xc6, 0x60, 0x30, 0x18, 0x30, 0x60, 0xc6, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0xd8, 0xd8, 0xd8, 0xd8, 0xd8, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x66, 0x7c, 0x60, 0x60, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xdc, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x18, 0x3c, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0x6c, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x6c, 0xc6, 0xc6, 0xc6, 0x6c, 0x6c, 0x6c, 0x6c, 0xee, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x30, 0x18, 0x0c, 0x3e, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0xdb, 0xdb, 0xdb, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x06, 0x7e, 0xdb, 0xdb, 0xf3, 0x7e, 0x60, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x30, 0x60, 0x60, 0x7c, 0x60, 0x60, 0x60, 0x30, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0xfe, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x7e, 0x18, 0x18, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x18, 0x0c, 0x06, 0x0c, 0x18, 0x30, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x18, 0x30, 0x60, 0x30, 0x18, 0x0c, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x1b, 0x1b, 0x1b, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xd8, 0xd8, 0xd8, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x7e, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xdc, 0x00, 0x76, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x6c, 0x6c, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0xec, 0x6c, 0x6c, 0x3c, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd8, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0xd8, 0x30, 0x60, 0xc8, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x7c, 0x7c, 0x7c, 0x7c, 0x7c, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; __AA_CONST struct aa_font aa_font16 = {font16data, 16, "Standard vga 8x16 font", "vga16"}; aalib-1.4.0/src/font14.c0000644000766200001440000005424707272031253010334 #include "aalib.h" __AA_CONST static unsigned char font14data[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x81, 0xa5, 0x81, 0x81, 0xbd, 0x99, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0xff, 0xdb, 0xff, 0xff, 0xc3, 0xe7, 0xff, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6c, 0xfe, 0xfe, 0xfe, 0xfe, 0x7c, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x7c, 0xfe, 0x7c, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x3c, 0x3c, 0xe7, 0xe7, 0xe7, 0x99, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x3c, 0x7e, 0xff, 0xff, 0x7e, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x3c, 0x3c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe7, 0xc3, 0xc3, 0xe7, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x66, 0x42, 0x42, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xc3, 0x99, 0xbd, 0xbd, 0x99, 0xc3, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x1e, 0x0e, 0x1a, 0x32, 0x78, 0xcc, 0xcc, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x7e, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x33, 0x3f, 0x30, 0x30, 0x30, 0x70, 0xf0, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x63, 0x7f, 0x63, 0x63, 0x63, 0x67, 0xe7, 0xe6, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0xdb, 0x3c, 0xe7, 0x3c, 0xdb, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0xf8, 0xfe, 0xf8, 0xe0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x06, 0x0e, 0x3e, 0xfe, 0x3e, 0x0e, 0x06, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x3c, 0x7e, 0x18, 0x18, 0x18, 0x7e, 0x3c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x00, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xdb, 0xdb, 0xdb, 0x7b, 0x1b, 0x1b, 0x1b, 0x1b, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0x60, 0x38, 0x6c, 0xc6, 0xc6, 0x6c, 0x38, 0x0c, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xfe, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x3c, 0x7e, 0x18, 0x18, 0x18, 0x7e, 0x3c, 0x18, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x18, 0x3c, 0x7e, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x7e, 0x3c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x0c, 0xfe, 0x0c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x60, 0xfe, 0x60, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xc0, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x6c, 0xfe, 0x6c, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x38, 0x7c, 0x7c, 0xfe, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xfe, 0x7c, 0x7c, 0x38, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x3c, 0x3c, 0x3c, 0x18, 0x18, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x66, 0x66, 0x66, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6c, 0x6c, 0xfe, 0x6c, 0x6c, 0x6c, 0xfe, 0x6c, 0x6c, 0x00, 0x00, 0x00, 0x18, 0x18, 0x7c, 0xc6, 0xc2, 0xc0, 0x7c, 0x06, 0x86, 0xc6, 0x7c, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc2, 0xc6, 0x0c, 0x18, 0x30, 0x66, 0xc6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x6c, 0x6c, 0x38, 0x76, 0xdc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00, 0x30, 0x30, 0x30, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x18, 0x30, 0x30, 0x30, 0x30, 0x30, 0x18, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x18, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x3c, 0xff, 0x3c, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x7e, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x06, 0x0c, 0x18, 0x30, 0x60, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xce, 0xde, 0xf6, 0xe6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x38, 0x78, 0x18, 0x18, 0x18, 0x18, 0x18, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0x06, 0x0c, 0x18, 0x30, 0x60, 0xc6, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0x06, 0x06, 0x3c, 0x06, 0x06, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x1c, 0x3c, 0x6c, 0xcc, 0xfe, 0x0c, 0x0c, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xc0, 0xc0, 0xfc, 0x0e, 0x06, 0x06, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x60, 0xc0, 0xc0, 0xfc, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xc6, 0x06, 0x0c, 0x18, 0x30, 0x30, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0x7c, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x06, 0x0c, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x18, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x0c, 0x18, 0x30, 0x60, 0x30, 0x18, 0x0c, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x30, 0x18, 0x0c, 0x06, 0x0c, 0x18, 0x30, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0x0c, 0x18, 0x18, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xde, 0xde, 0xde, 0xdc, 0xc0, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x66, 0x66, 0x66, 0x7c, 0x66, 0x66, 0x66, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x66, 0xc2, 0xc0, 0xc0, 0xc0, 0xc2, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x6c, 0x66, 0x66, 0x66, 0x66, 0x66, 0x6c, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 0x62, 0x66, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x66, 0xc2, 0xc0, 0xc0, 0xde, 0xc6, 0x66, 0x3a, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0xcc, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe6, 0x66, 0x6c, 0x6c, 0x78, 0x6c, 0x6c, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x60, 0x60, 0x60, 0x60, 0x60, 0x62, 0x66, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xee, 0xfe, 0xfe, 0xd6, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xe6, 0xf6, 0xfe, 0xde, 0xce, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x6c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x6c, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x66, 0x66, 0x66, 0x7c, 0x60, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xd6, 0xde, 0x7c, 0x0c, 0x0e, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x66, 0x66, 0x66, 0x7c, 0x6c, 0x66, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0x60, 0x38, 0x0c, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x7e, 0x5a, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x6c, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xd6, 0xd6, 0xfe, 0x7c, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0x6c, 0x38, 0x38, 0x38, 0x6c, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xc6, 0x8c, 0x18, 0x30, 0x60, 0xc2, 0xc6, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0x70, 0x38, 0x1c, 0x0e, 0x06, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x3c, 0x00, 0x00, 0x00, 0x10, 0x38, 0x6c, 0xc6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x30, 0x30, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x60, 0x60, 0x78, 0x6c, 0x66, 0x66, 0x66, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x0c, 0x0c, 0x3c, 0x6c, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x6c, 0x64, 0x60, 0xf0, 0x60, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xcc, 0xcc, 0xcc, 0x7c, 0x0c, 0xcc, 0x78, 0x00, 0x00, 0x00, 0xe0, 0x60, 0x60, 0x6c, 0x76, 0x66, 0x66, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x06, 0x00, 0x0e, 0x06, 0x06, 0x06, 0x06, 0x66, 0x66, 0x3c, 0x00, 0x00, 0x00, 0xe0, 0x60, 0x60, 0x66, 0x6c, 0x78, 0x6c, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xec, 0xfe, 0xd6, 0xd6, 0xd6, 0xd6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x66, 0x66, 0x66, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x66, 0x66, 0x66, 0x7c, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xcc, 0xcc, 0xcc, 0x7c, 0x0c, 0x0c, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x76, 0x62, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0x70, 0x1c, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x30, 0x30, 0xfc, 0x30, 0x30, 0x30, 0x36, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xd6, 0xd6, 0xfe, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0x6c, 0x38, 0x38, 0x6c, 0xc6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x0c, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xcc, 0x18, 0x30, 0x66, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x18, 0x18, 0x18, 0x70, 0x18, 0x18, 0x18, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x18, 0x18, 0x18, 0x0e, 0x18, 0x18, 0x18, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x66, 0xc2, 0xc0, 0xc0, 0xc2, 0x66, 0x3c, 0x0c, 0x06, 0x7c, 0x00, 0x00, 0x00, 0xcc, 0xcc, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x18, 0x30, 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x6c, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xcc, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00, 0x60, 0x30, 0x18, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00, 0x38, 0x6c, 0x38, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x66, 0x60, 0x66, 0x3c, 0x0c, 0x06, 0x3c, 0x00, 0x00, 0x00, 0x10, 0x38, 0x6c, 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xcc, 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x30, 0x18, 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x66, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x18, 0x3c, 0x66, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x30, 0x18, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x38, 0x6c, 0x38, 0x00, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x18, 0x30, 0x60, 0x00, 0xfe, 0x66, 0x60, 0x7c, 0x60, 0x66, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0x76, 0x36, 0x7e, 0xd8, 0xd8, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x6c, 0xcc, 0xcc, 0xfe, 0xcc, 0xcc, 0xcc, 0xce, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x6c, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x60, 0x30, 0x18, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x30, 0x78, 0xcc, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00, 0x60, 0x30, 0x18, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x0c, 0x78, 0x00, 0x00, 0xc6, 0xc6, 0x38, 0x6c, 0xc6, 0xc6, 0xc6, 0xc6, 0x6c, 0x38, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x7c, 0xc6, 0xc0, 0xc0, 0xc6, 0x7c, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x38, 0x6c, 0x64, 0x60, 0xf0, 0x60, 0x60, 0x60, 0xe6, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x66, 0x3c, 0x18, 0x7e, 0x18, 0x7e, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xcc, 0xcc, 0xf8, 0xc4, 0xcc, 0xde, 0xcc, 0xcc, 0xc6, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x1b, 0x18, 0x18, 0x18, 0x7e, 0x18, 0x18, 0x18, 0x18, 0xd8, 0x70, 0x00, 0x00, 0x18, 0x30, 0x60, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x18, 0x30, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x18, 0x30, 0x60, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x18, 0x30, 0x60, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xdc, 0x00, 0xdc, 0x66, 0x66, 0x66, 0x66, 0x66, 0x00, 0x00, 0x00, 0x76, 0xdc, 0x00, 0xc6, 0xe6, 0xf6, 0xfe, 0xde, 0xce, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x6c, 0x6c, 0x3e, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x6c, 0x6c, 0x38, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x30, 0x00, 0x30, 0x30, 0x60, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xc0, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x06, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xc6, 0xcc, 0xd8, 0x30, 0x60, 0xce, 0x93, 0x06, 0x0c, 0x1f, 0x00, 0x00, 0xc0, 0xc0, 0xc6, 0xcc, 0xd8, 0x30, 0x66, 0xce, 0x9a, 0x3f, 0x06, 0x0f, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x18, 0x18, 0x3c, 0x3c, 0x3c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x66, 0xcc, 0x66, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0x66, 0x33, 0x66, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x44, 0x11, 0x44, 0x11, 0x44, 0x11, 0x44, 0x11, 0x44, 0x11, 0x44, 0x11, 0x44, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0xdd, 0x77, 0xdd, 0x77, 0xdd, 0x77, 0xdd, 0x77, 0xdd, 0x77, 0xdd, 0x77, 0xdd, 0x77, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xf8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xf8, 0x18, 0xf8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0xf6, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x18, 0xf8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x36, 0x36, 0x36, 0x36, 0x36, 0xf6, 0x06, 0xf6, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x06, 0xf6, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0xf6, 0x06, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0xf8, 0x18, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1f, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1f, 0x18, 0x1f, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x37, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x37, 0x30, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x30, 0x37, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0xf7, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0xf7, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x37, 0x30, 0x37, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x36, 0x36, 0x36, 0x36, 0xf7, 0x00, 0xf7, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1f, 0x18, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x18, 0x1f, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0xff, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0x18, 0xff, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xdc, 0xd8, 0xd8, 0xdc, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xfc, 0xc6, 0xc6, 0xfc, 0xc0, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0xfe, 0xc6, 0xc6, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xc6, 0x60, 0x30, 0x18, 0x30, 0x60, 0xc6, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0xd8, 0xd8, 0xd8, 0xd8, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x7c, 0x60, 0x60, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xdc, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x18, 0x3c, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0x6c, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x6c, 0xc6, 0xc6, 0xc6, 0x6c, 0x6c, 0x6c, 0xee, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x30, 0x18, 0x0c, 0x3e, 0x66, 0x66, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0xdb, 0xdb, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x06, 0x7e, 0xcf, 0xdb, 0xf3, 0x7e, 0x60, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x30, 0x60, 0x60, 0x7c, 0x60, 0x60, 0x30, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0xfe, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x7e, 0x18, 0x18, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x18, 0x0c, 0x06, 0x0c, 0x18, 0x30, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x18, 0x30, 0x60, 0x30, 0x18, 0x0c, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x1b, 0x1b, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xd8, 0xd8, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x7e, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xdc, 0x00, 0x76, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x6c, 0x6c, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0xec, 0x6c, 0x3c, 0x1c, 0x00, 0x00, 0x00, 0x00, 0xd8, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x98, 0x30, 0x60, 0xc8, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x7c, 0x7c, 0x7c, 0x7c, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,}; __AA_CONST struct aa_font aa_font14 = {font14data, 14, "Standard mda/vga 8x14 font", "mda14"}; aalib-1.4.0/src/fontx16.c0000644000766200001440000005253607272031253010525 #include "config.h" #include "aalib.h" /* binary image of font8x16 follows */ __AA_CONST unsigned char fontX16data[] = { 0x01, 0x03, 0x00, 0x02, 0x01, 0x03, 0x00, 0x02, 0x01, 0x03, 0x00, 0x0b, 0x05, 0x02, 0x01, 0x10, 0x10, 0x38, 0x38, 0x7c, 0x7c, 0xfe, 0xfe, 0x7c, 0x7c, 0x38, 0x38, 0x10, 0x10, 0x00, 0x00, 0x92, 0x92, 0x44, 0x44, 0x92, 0x92, 0x44, 0x44, 0x92, 0x92, 0x44, 0x44, 0x92, 0x92, 0x00, 0x00, 0x00, 0x88, 0x88, 0x88, 0xf8, 0x88, 0x88, 0x88, 0x00, 0x3e, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0xf8, 0x80, 0x80, 0xf0, 0x80, 0x80, 0x80, 0x3e, 0x20, 0x20, 0x3c, 0x20, 0x20, 0x20, 0x00, 0x00, 0x70, 0x88, 0x80, 0x80, 0x80, 0x88, 0x70, 0x00, 0x3c, 0x22, 0x22, 0x3c, 0x28, 0x24, 0x22, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xf8, 0x00, 0x3e, 0x20, 0x20, 0x3c, 0x20, 0x20, 0x20, 0x00, 0x00, 0x38, 0x44, 0x44, 0x44, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, 0xfe, 0x10, 0x10, 0x10, 0x10, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x84, 0xc4, 0xa4, 0xa4, 0x94, 0x94, 0x8c, 0x84, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3e, 0x00, 0x00, 0x88, 0x88, 0x88, 0x50, 0x50, 0x20, 0x00, 0x3e, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xff, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x1f, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xf0, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0c, 0x30, 0xc0, 0x30, 0x0c, 0x02, 0xfe, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x60, 0x18, 0x06, 0x18, 0x60, 0x80, 0xfe, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x24, 0x24, 0x24, 0x24, 0x44, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x04, 0x08, 0xfe, 0x10, 0xfe, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x12, 0x10, 0x10, 0x10, 0x7c, 0x10, 0x10, 0x3c, 0x52, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x10, 0x38, 0x10, 0x6c, 0x6c, 0x24, 0x24, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x12, 0x12, 0x7f, 0x24, 0x24, 0x24, 0x24, 0x24, 0xfe, 0x48, 0x48, 0x48, 0x48, 0x00, 0x10, 0x38, 0x54, 0x92, 0x96, 0x90, 0x50, 0x38, 0x14, 0x12, 0xd2, 0x92, 0x94, 0x78, 0x10, 0x10, 0x02, 0x62, 0x94, 0x94, 0x94, 0x98, 0x68, 0x10, 0x10, 0x2c, 0x32, 0x52, 0x52, 0x52, 0x8c, 0x80, 0x00, 0x30, 0x48, 0x48, 0x48, 0x50, 0x20, 0x2e, 0x54, 0x54, 0x94, 0x88, 0x8c, 0x72, 0x00, 0x00, 0xe0, 0xe0, 0x20, 0x20, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x04, 0x08, 0x08, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 0x04, 0x02, 0x80, 0x40, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x20, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x10, 0x38, 0x92, 0xd6, 0x38, 0xd6, 0x92, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, 0xfe, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xe0, 0x20, 0x20, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xe0, 0xe0, 0x40, 0x00, 0x02, 0x02, 0x04, 0x04, 0x08, 0x08, 0x08, 0x10, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x18, 0x24, 0x24, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x24, 0x24, 0x18, 0x00, 0x00, 0x10, 0x70, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x7c, 0x00, 0x00, 0x00, 0x18, 0x24, 0x42, 0x62, 0x02, 0x04, 0x08, 0x08, 0x10, 0x20, 0x22, 0x42, 0x7e, 0x00, 0x00, 0x00, 0x38, 0x44, 0x82, 0x82, 0x02, 0x04, 0x38, 0x04, 0x02, 0x82, 0x82, 0x44, 0x38, 0x00, 0x00, 0x00, 0x08, 0x18, 0x28, 0x28, 0x48, 0x48, 0x88, 0x88, 0xfe, 0x08, 0x08, 0x08, 0x3c, 0x00, 0x00, 0x00, 0xfc, 0x80, 0x80, 0x80, 0xb8, 0xc4, 0x82, 0x02, 0x02, 0xc2, 0x82, 0x44, 0x38, 0x00, 0x00, 0x00, 0x3c, 0x42, 0x46, 0x80, 0x80, 0xb8, 0xc4, 0x82, 0x82, 0x82, 0x82, 0x44, 0x38, 0x00, 0x00, 0x00, 0xfe, 0x82, 0x82, 0x04, 0x04, 0x04, 0x08, 0x08, 0x08, 0x08, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x38, 0x44, 0x82, 0x82, 0x82, 0x44, 0x38, 0x44, 0x82, 0x82, 0x82, 0x44, 0x38, 0x00, 0x00, 0x00, 0x38, 0x44, 0x82, 0x82, 0x82, 0x82, 0x46, 0x3a, 0x02, 0x02, 0x82, 0x44, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x38, 0x00, 0x00, 0x00, 0x00, 0x38, 0x38, 0x18, 0x10, 0x30, 0x02, 0x04, 0x04, 0x08, 0x08, 0x10, 0x10, 0x20, 0x20, 0x10, 0x10, 0x08, 0x08, 0x04, 0x04, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x10, 0x08, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x00, 0x38, 0x44, 0x82, 0xc2, 0x02, 0x04, 0x04, 0x08, 0x10, 0x10, 0x00, 0x00, 0x10, 0x38, 0x10, 0x00, 0x3c, 0x42, 0x82, 0x9a, 0xa6, 0xa2, 0xa2, 0xa2, 0xa6, 0x9a, 0x80, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x10, 0x28, 0x28, 0x28, 0x44, 0x44, 0x44, 0x44, 0x7c, 0x82, 0x82, 0x82, 0xc6, 0x00, 0x00, 0x00, 0xf8, 0x44, 0x42, 0x42, 0x42, 0x44, 0x78, 0x44, 0x42, 0x42, 0x42, 0x42, 0xfc, 0x00, 0x00, 0x00, 0x3a, 0x46, 0x42, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x82, 0x42, 0x42, 0x3c, 0x00, 0x00, 0x00, 0xf8, 0x44, 0x44, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x44, 0x44, 0xf8, 0x00, 0x00, 0x00, 0xfe, 0x42, 0x42, 0x40, 0x48, 0x48, 0x78, 0x48, 0x48, 0x42, 0x42, 0x42, 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x42, 0x42, 0x40, 0x48, 0x48, 0x78, 0x48, 0x48, 0x40, 0x40, 0x40, 0xf0, 0x00, 0x00, 0x00, 0x1a, 0x26, 0x42, 0x40, 0x80, 0x80, 0x8f, 0x82, 0x82, 0x82, 0x42, 0x66, 0x1a, 0x00, 0x00, 0x00, 0xe7, 0x42, 0x42, 0x42, 0x42, 0x7e, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0xe7, 0x00, 0x00, 0x00, 0xfe, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xfe, 0x00, 0x00, 0x00, 0x1f, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x82, 0x82, 0x82, 0x44, 0x38, 0x00, 0x00, 0x00, 0xe6, 0x44, 0x44, 0x48, 0x48, 0x70, 0x50, 0x48, 0x48, 0x44, 0x44, 0x42, 0xe3, 0x00, 0x00, 0x00, 0xf0, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x42, 0x42, 0x42, 0xfe, 0x00, 0x00, 0x00, 0x82, 0xc6, 0xaa, 0xaa, 0xaa, 0x92, 0x92, 0x92, 0x82, 0x82, 0x82, 0x82, 0xc6, 0x00, 0x00, 0x00, 0x87, 0xc2, 0xa2, 0xa2, 0xa2, 0x92, 0x92, 0x92, 0x8a, 0x8a, 0x8a, 0x86, 0xc2, 0x00, 0x00, 0x00, 0x38, 0x44, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x44, 0x38, 0x00, 0x00, 0x00, 0xf8, 0x44, 0x42, 0x42, 0x42, 0x42, 0x44, 0x78, 0x40, 0x40, 0x40, 0x40, 0xf0, 0x00, 0x00, 0x00, 0x38, 0x44, 0x44, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0xba, 0x44, 0x44, 0x38, 0x08, 0x06, 0x00, 0xf8, 0x44, 0x42, 0x42, 0x42, 0x44, 0x78, 0x48, 0x44, 0x44, 0x44, 0x42, 0xe3, 0x00, 0x00, 0x00, 0x34, 0x4c, 0x84, 0x80, 0x80, 0x60, 0x18, 0x04, 0x82, 0x82, 0x82, 0xc4, 0xb8, 0x00, 0x00, 0x00, 0xfe, 0x92, 0x92, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x7c, 0x00, 0x00, 0x00, 0xe7, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3c, 0x00, 0x00, 0x00, 0xc6, 0x82, 0x82, 0x82, 0x82, 0x44, 0x44, 0x44, 0x44, 0x28, 0x28, 0x10, 0x10, 0x00, 0x00, 0x00, 0xc6, 0x82, 0x82, 0x82, 0x92, 0x92, 0x92, 0xaa, 0xaa, 0xaa, 0x44, 0x44, 0x44, 0x00, 0x00, 0x00, 0xee, 0x44, 0x44, 0x28, 0x28, 0x10, 0x28, 0x28, 0x28, 0x44, 0x44, 0x82, 0xc6, 0x00, 0x00, 0x00, 0xc6, 0x82, 0x44, 0x44, 0x44, 0x28, 0x28, 0x10, 0x10, 0x10, 0x10, 0x10, 0x7c, 0x00, 0x00, 0x00, 0xfe, 0x84, 0x88, 0x08, 0x10, 0x10, 0x10, 0x20, 0x20, 0x42, 0x42, 0x82, 0xfe, 0x00, 0x00, 0x1e, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x1e, 0x00, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x10, 0x08, 0x08, 0x04, 0x04, 0x02, 0x02, 0x00, 0xf0, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xf0, 0x10, 0x28, 0x44, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x30, 0x30, 0x20, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x42, 0x02, 0x3e, 0x42, 0x82, 0x82, 0x86, 0x7b, 0x00, 0x00, 0x00, 0xc0, 0x40, 0x40, 0x40, 0x78, 0x44, 0x42, 0x42, 0x42, 0x42, 0x42, 0x44, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3a, 0x46, 0x82, 0x80, 0x80, 0x80, 0x82, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x06, 0x04, 0x04, 0x04, 0x3c, 0x44, 0x84, 0x84, 0x84, 0x84, 0x84, 0x44, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x44, 0x82, 0xfe, 0x80, 0x80, 0x82, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x0e, 0x11, 0x10, 0x10, 0xfe, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3b, 0x44, 0x44, 0x44, 0x38, 0x40, 0x78, 0x84, 0x82, 0x82, 0x7c, 0x00, 0xc0, 0x40, 0x40, 0x40, 0x5c, 0x62, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0xe7, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x78, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0xff, 0x00, 0x00, 0x06, 0x06, 0x00, 0x00, 0x00, 0x3e, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x82, 0x82, 0x44, 0x38, 0x00, 0xc0, 0x40, 0x40, 0x40, 0x42, 0x44, 0x48, 0x58, 0x64, 0x44, 0x42, 0x42, 0xe3, 0x00, 0x00, 0x00, 0x78, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6c, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0xdb, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x62, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0xe7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x44, 0x82, 0x82, 0x82, 0x82, 0x82, 0x44, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x44, 0x42, 0x42, 0x42, 0x42, 0x44, 0x78, 0x40, 0x40, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x44, 0x84, 0x84, 0x84, 0x84, 0x44, 0x3c, 0x04, 0x04, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0xec, 0x32, 0x22, 0x20, 0x20, 0x20, 0x20, 0x20, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3a, 0x46, 0x42, 0x40, 0x3c, 0x02, 0x82, 0xc2, 0xbc, 0x00, 0x00, 0x00, 0x00, 0x20, 0x20, 0x20, 0xfc, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x22, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x46, 0x39, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0x82, 0x82, 0x44, 0x44, 0x44, 0x28, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x92, 0x92, 0x92, 0x92, 0xaa, 0xaa, 0x44, 0x44, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xee, 0x44, 0x28, 0x28, 0x10, 0x28, 0x28, 0x44, 0xee, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe7, 0x42, 0x22, 0x24, 0x14, 0x08, 0x08, 0x10, 0x90, 0xa0, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x44, 0x08, 0x08, 0x10, 0x10, 0x22, 0x42, 0xfe, 0x00, 0x00, 0x06, 0x08, 0x08, 0x08, 0x08, 0x08, 0x10, 0x20, 0x10, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x06, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xc0, 0x20, 0x20, 0x20, 0x20, 0x20, 0x10, 0x08, 0x10, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0xc0, 0x60, 0x92, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x10, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x00, 0x00, 0x10, 0x3c, 0x52, 0x92, 0x90, 0x90, 0x90, 0x90, 0x90, 0x92, 0x52, 0x3c, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x12, 0x10, 0x10, 0x10, 0x7c, 0x10, 0x10, 0x3c, 0x52, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x3c, 0x24, 0x24, 0x3c, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x82, 0x44, 0x44, 0xfe, 0x28, 0x10, 0xfe, 0x10, 0x10, 0x10, 0x10, 0x10, 0x38, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x3c, 0x42, 0x40, 0x20, 0x3c, 0x42, 0x42, 0x42, 0x3c, 0x04, 0x02, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x24, 0x24, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x42, 0x99, 0xa5, 0xc3, 0xc1, 0xc1, 0xc1, 0xc3, 0xa5, 0x99, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x1c, 0x22, 0x1e, 0x22, 0x26, 0x1a, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x12, 0x24, 0x48, 0x90, 0x90, 0x48, 0x24, 0x12, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xfe, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x42, 0x81, 0xf9, 0xc5, 0xc5, 0xf9, 0xc5, 0xc5, 0xc5, 0x81, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x44, 0x44, 0x44, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0xfe, 0x10, 0x10, 0x10, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x18, 0x24, 0x04, 0x08, 0x10, 0x20, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x24, 0x04, 0x18, 0x04, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x22, 0x22, 0x44, 0x44, 0x6c, 0x54, 0x82, 0x80, 0x00, 0x7f, 0xfa, 0xfa, 0xfa, 0xfa, 0xfa, 0x7a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x08, 0x10, 0x00, 0x08, 0x18, 0x28, 0x08, 0x08, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x24, 0x24, 0x24, 0x24, 0x18, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x48, 0x24, 0x12, 0x09, 0x09, 0x12, 0x24, 0x48, 0x90, 0x00, 0x00, 0x00, 0x40, 0xc0, 0x40, 0x40, 0x41, 0x46, 0x08, 0x32, 0xc6, 0x0a, 0x12, 0x1f, 0x02, 0x00, 0x00, 0x00, 0x40, 0xc0, 0x40, 0x40, 0x41, 0x46, 0x08, 0x36, 0xc9, 0x01, 0x06, 0x08, 0x0f, 0x00, 0x00, 0x00, 0x60, 0x90, 0x10, 0x60, 0x11, 0x96, 0x68, 0x32, 0xc6, 0x0a, 0x12, 0x1f, 0x02, 0x00, 0x00, 0x08, 0x1c, 0x08, 0x00, 0x08, 0x08, 0x08, 0x10, 0x20, 0x20, 0x40, 0x43, 0x41, 0x22, 0x1c, 0x00, 0x30, 0x10, 0x08, 0x10, 0x28, 0x28, 0x44, 0x44, 0x44, 0x7c, 0x82, 0x82, 0x82, 0xc6, 0x00, 0x00, 0x18, 0x10, 0x20, 0x10, 0x28, 0x28, 0x44, 0x44, 0x44, 0x7c, 0x82, 0x82, 0x82, 0xc6, 0x00, 0x00, 0x10, 0x28, 0x44, 0x10, 0x28, 0x28, 0x44, 0x44, 0x44, 0x7c, 0x82, 0x82, 0x82, 0xc6, 0x00, 0x00, 0x24, 0x58, 0x00, 0x10, 0x28, 0x28, 0x44, 0x44, 0x44, 0x7c, 0x82, 0x82, 0x82, 0xc6, 0x00, 0x00, 0x44, 0x44, 0x00, 0x10, 0x28, 0x28, 0x44, 0x44, 0x44, 0x7c, 0x82, 0x82, 0x82, 0xc6, 0x00, 0x00, 0x38, 0x44, 0x38, 0x10, 0x28, 0x28, 0x44, 0x44, 0x44, 0x7c, 0x82, 0x82, 0x82, 0xc6, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x28, 0x28, 0x48, 0x48, 0x48, 0x4e, 0xf8, 0x88, 0x88, 0x88, 0x8f, 0x00, 0x00, 0x00, 0x3c, 0x42, 0x40, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x40, 0x42, 0x3c, 0x08, 0x08, 0x10, 0x30, 0x10, 0x08, 0xfe, 0x42, 0x42, 0x40, 0x48, 0x78, 0x48, 0x40, 0x42, 0x42, 0xfe, 0x00, 0x00, 0x18, 0x10, 0x20, 0xfe, 0x42, 0x42, 0x40, 0x48, 0x78, 0x48, 0x40, 0x42, 0x42, 0xfe, 0x00, 0x00, 0x30, 0x48, 0x00, 0xfe, 0x42, 0x42, 0x40, 0x48, 0x78, 0x48, 0x40, 0x42, 0x42, 0xfe, 0x00, 0x00, 0x44, 0x44, 0x00, 0xfe, 0x42, 0x42, 0x40, 0x48, 0x78, 0x48, 0x40, 0x42, 0x42, 0xfe, 0x00, 0x00, 0x30, 0x10, 0x08, 0xfe, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xfe, 0x00, 0x00, 0x18, 0x10, 0x20, 0xfe, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xfe, 0x00, 0x00, 0x10, 0x28, 0x44, 0xfe, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xfe, 0x00, 0x00, 0x44, 0x44, 0x00, 0xfe, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xfe, 0x00, 0x00, 0x00, 0xf8, 0x44, 0x44, 0x42, 0x42, 0x42, 0xf2, 0x42, 0x42, 0x42, 0x44, 0x44, 0xf8, 0x00, 0x00, 0x24, 0x58, 0x00, 0x87, 0xc2, 0xa2, 0xa2, 0x92, 0x92, 0x92, 0x8a, 0x8a, 0x86, 0xc2, 0x00, 0x00, 0x30, 0x10, 0x08, 0x38, 0x44, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x44, 0x38, 0x00, 0x00, 0x18, 0x10, 0x20, 0x38, 0x44, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x44, 0x38, 0x00, 0x00, 0x38, 0x44, 0x00, 0x38, 0x44, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x44, 0x38, 0x00, 0x00, 0x24, 0x58, 0x00, 0x38, 0x44, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x44, 0x38, 0x00, 0x00, 0x44, 0x44, 0x00, 0x38, 0x44, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x44, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x42, 0x24, 0x18, 0x18, 0x24, 0x42, 0x81, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x3c, 0x44, 0x86, 0x8a, 0x8a, 0x92, 0x92, 0xa2, 0xa2, 0xc2, 0x44, 0x78, 0x80, 0x80, 0x30, 0x10, 0x08, 0xe7, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3c, 0x00, 0x00, 0x0c, 0x08, 0x10, 0xe7, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3c, 0x00, 0x00, 0x18, 0x24, 0x00, 0xe7, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3c, 0x00, 0x00, 0x24, 0x24, 0x00, 0xe7, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3c, 0x00, 0x00, 0x0c, 0x08, 0x10, 0xc6, 0x82, 0x44, 0x44, 0x28, 0x28, 0x10, 0x10, 0x10, 0x10, 0x7c, 0x00, 0x00, 0xe0, 0x40, 0x78, 0x44, 0x42, 0x42, 0x42, 0x44, 0x78, 0x40, 0x40, 0x40, 0x40, 0xf0, 0x00, 0x00, 0x00, 0x38, 0x44, 0x82, 0x82, 0x82, 0x84, 0x98, 0x84, 0x82, 0x82, 0x82, 0x82, 0x9c, 0x00, 0x00, 0x00, 0x30, 0x10, 0x08, 0x00, 0x3c, 0x42, 0x02, 0x3e, 0x42, 0x82, 0x82, 0x86, 0x7b, 0x00, 0x00, 0x00, 0x18, 0x10, 0x20, 0x00, 0x3c, 0x42, 0x02, 0x3e, 0x42, 0x82, 0x82, 0x86, 0x7b, 0x00, 0x00, 0x00, 0x18, 0x24, 0x42, 0x00, 0x3c, 0x42, 0x02, 0x3e, 0x42, 0x82, 0x82, 0x86, 0x7b, 0x00, 0x00, 0x00, 0x32, 0x4c, 0x00, 0x00, 0x3c, 0x42, 0x02, 0x3e, 0x42, 0x82, 0x82, 0x86, 0x7b, 0x00, 0x00, 0x00, 0x00, 0x24, 0x24, 0x00, 0x3c, 0x42, 0x02, 0x3e, 0x42, 0x82, 0x82, 0x86, 0x7b, 0x00, 0x00, 0x00, 0x18, 0x24, 0x18, 0x00, 0x3c, 0x42, 0x02, 0x3e, 0x42, 0x82, 0x82, 0x86, 0x7b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6c, 0x92, 0x12, 0x3e, 0x50, 0x90, 0x92, 0x92, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3a, 0x46, 0x82, 0x80, 0x80, 0x80, 0x82, 0x42, 0x3c, 0x10, 0x10, 0x20, 0x00, 0x30, 0x10, 0x08, 0x00, 0x38, 0x44, 0x82, 0xfe, 0x80, 0x80, 0x82, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x18, 0x10, 0x20, 0x00, 0x38, 0x44, 0x82, 0xfe, 0x80, 0x80, 0x82, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x38, 0x44, 0x82, 0x00, 0x38, 0x44, 0x82, 0xfe, 0x80, 0x80, 0x82, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x44, 0x44, 0x00, 0x00, 0x38, 0x44, 0x82, 0xfe, 0x80, 0x80, 0x80, 0x44, 0x38, 0x00, 0x00, 0x00, 0x30, 0x10, 0x08, 0x00, 0x78, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0xff, 0x00, 0x00, 0x00, 0x18, 0x10, 0x20, 0x00, 0x78, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0xff, 0x00, 0x00, 0x00, 0x18, 0x24, 0x42, 0x00, 0x78, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0xff, 0x00, 0x00, 0x00, 0x24, 0x24, 0x00, 0x00, 0x78, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0xff, 0x00, 0x00, 0x00, 0x64, 0x18, 0x18, 0x24, 0x3c, 0x42, 0x82, 0x82, 0x82, 0x82, 0x82, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x32, 0x4c, 0x00, 0x00, 0xdc, 0x62, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0xe7, 0x00, 0x00, 0x00, }; __AA_CONST struct aa_font aa_fontX16 = {fontX16data, 16, "Standard X 8x16 font", "X8x16"}; aalib-1.4.0/src/fontx13.c0000644000766200001440000005245607272031253010523 #include "config.h" #include "aalib.h" __AA_CONST unsigned char fontX13data[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x7c, 0xfe, 0x7c, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0x00, 0x00, 0x00, 0x00, 0x88, 0x88, 0xf8, 0x88, 0x88, 0x3e, 0x08, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x80, 0xe0, 0x80, 0x9e, 0x10, 0x1c, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x78, 0x80, 0x80, 0x78, 0x3c, 0x22, 0x3c, 0x22, 0x22, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0xf8, 0x3e, 0x20, 0x3c, 0x20, 0x20, 0x00, 0x00, 0x38, 0x44, 0x44, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0xfe, 0x10, 0x10, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0xc8, 0xa8, 0x98, 0x88, 0x20, 0x20, 0x20, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x88, 0x88, 0x50, 0x20, 0x3e, 0x08, 0x08, 0x08, 0x08, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xff, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x1f, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xf0, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x02, 0x08, 0x20, 0x80, 0x20, 0x08, 0x02, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x20, 0x08, 0x02, 0x08, 0x20, 0x80, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x24, 0x24, 0x24, 0x24, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x04, 0xfe, 0x10, 0xfe, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x22, 0x20, 0x70, 0x20, 0x20, 0x20, 0x62, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x24, 0x24, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x24, 0x7e, 0x24, 0x7e, 0x24, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x3c, 0x50, 0x38, 0x14, 0x78, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x52, 0x24, 0x08, 0x08, 0x10, 0x24, 0x2a, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x48, 0x48, 0x30, 0x4a, 0x44, 0x3a, 0x00, 0x00, 0x00, 0x00, 0x38, 0x30, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x08, 0x08, 0x10, 0x10, 0x10, 0x08, 0x08, 0x04, 0x00, 0x00, 0x00, 0x00, 0x20, 0x10, 0x10, 0x08, 0x08, 0x08, 0x10, 0x10, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x18, 0x7e, 0x18, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x7c, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x30, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x10, 0x00, 0x00, 0x00, 0x02, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x18, 0x24, 0x42, 0x42, 0x42, 0x42, 0x42, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x10, 0x30, 0x50, 0x10, 0x10, 0x10, 0x10, 0x10, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x42, 0x42, 0x02, 0x04, 0x18, 0x20, 0x40, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x02, 0x04, 0x08, 0x1c, 0x02, 0x02, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x04, 0x0c, 0x14, 0x24, 0x44, 0x44, 0x7e, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x40, 0x40, 0x5c, 0x62, 0x02, 0x02, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x20, 0x40, 0x40, 0x5c, 0x62, 0x42, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x02, 0x04, 0x08, 0x08, 0x10, 0x10, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x42, 0x42, 0x42, 0x3c, 0x42, 0x42, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x42, 0x42, 0x46, 0x3a, 0x02, 0x02, 0x04, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x10, 0x00, 0x00, 0x10, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x10, 0x00, 0x00, 0x38, 0x30, 0x40, 0x00, 0x00, 0x00, 0x02, 0x04, 0x08, 0x10, 0x20, 0x10, 0x08, 0x04, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x20, 0x10, 0x08, 0x04, 0x08, 0x10, 0x20, 0x40, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x42, 0x42, 0x02, 0x04, 0x08, 0x08, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x42, 0x42, 0x4e, 0x52, 0x56, 0x4a, 0x40, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x18, 0x24, 0x42, 0x42, 0x42, 0x7e, 0x42, 0x42, 0x42, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x42, 0x42, 0x42, 0x7c, 0x42, 0x42, 0x42, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x42, 0x40, 0x40, 0x40, 0x40, 0x40, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x40, 0x40, 0x40, 0x78, 0x40, 0x40, 0x40, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x40, 0x40, 0x40, 0x78, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x42, 0x40, 0x40, 0x40, 0x4e, 0x42, 0x46, 0x3a, 0x00, 0x00, 0x00, 0x00, 0x42, 0x42, 0x42, 0x42, 0x7e, 0x42, 0x42, 0x42, 0x42, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x44, 0x38, 0x00, 0x00, 0x00, 0x00, 0x42, 0x44, 0x48, 0x50, 0x60, 0x50, 0x48, 0x44, 0x42, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x82, 0x82, 0xc6, 0xaa, 0x92, 0x92, 0x82, 0x82, 0x82, 0x00, 0x00, 0x00, 0x00, 0x42, 0x42, 0x62, 0x52, 0x4a, 0x46, 0x42, 0x42, 0x42, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x42, 0x42, 0x42, 0x7c, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x42, 0x42, 0x42, 0x42, 0x42, 0x52, 0x4a, 0x3c, 0x02, 0x00, 0x00, 0x00, 0x7c, 0x42, 0x42, 0x42, 0x7c, 0x50, 0x48, 0x44, 0x42, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x42, 0x40, 0x40, 0x3c, 0x02, 0x02, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x82, 0x82, 0x44, 0x44, 0x44, 0x28, 0x28, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x82, 0x82, 0x82, 0x82, 0x92, 0x92, 0x92, 0xaa, 0x44, 0x00, 0x00, 0x00, 0x00, 0x82, 0x82, 0x44, 0x28, 0x10, 0x28, 0x44, 0x82, 0x82, 0x00, 0x00, 0x00, 0x00, 0x82, 0x82, 0x44, 0x28, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x40, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x78, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x78, 0x00, 0x00, 0x00, 0x00, 0x10, 0x28, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x38, 0x18, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x02, 0x3e, 0x42, 0x46, 0x3a, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, 0x5c, 0x62, 0x42, 0x42, 0x62, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x42, 0x40, 0x40, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x02, 0x3a, 0x46, 0x42, 0x42, 0x46, 0x3a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x42, 0x7e, 0x40, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x22, 0x20, 0x20, 0x7c, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3a, 0x44, 0x44, 0x38, 0x40, 0x3c, 0x42, 0x3c, 0x00, 0x00, 0x40, 0x40, 0x40, 0x5c, 0x62, 0x42, 0x42, 0x42, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x30, 0x10, 0x10, 0x10, 0x10, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x0c, 0x04, 0x04, 0x04, 0x04, 0x44, 0x44, 0x38, 0x00, 0x00, 0x40, 0x40, 0x40, 0x44, 0x48, 0x70, 0x48, 0x44, 0x42, 0x00, 0x00, 0x00, 0x00, 0x30, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xec, 0x92, 0x92, 0x92, 0x92, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5c, 0x62, 0x42, 0x42, 0x42, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x42, 0x42, 0x42, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5c, 0x62, 0x42, 0x62, 0x5c, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3a, 0x46, 0x42, 0x46, 0x3a, 0x02, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5c, 0x22, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x42, 0x30, 0x0c, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x20, 0x7c, 0x20, 0x20, 0x20, 0x22, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x44, 0x44, 0x44, 0x44, 0x3a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x44, 0x44, 0x28, 0x28, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x82, 0x92, 0x92, 0xaa, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x24, 0x18, 0x18, 0x24, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x42, 0x42, 0x46, 0x3a, 0x02, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x04, 0x08, 0x10, 0x20, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x10, 0x10, 0x08, 0x30, 0x08, 0x10, 0x10, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x70, 0x08, 0x08, 0x10, 0x0c, 0x10, 0x08, 0x08, 0x70, 0x00, 0x00, 0x00, 0x00, 0x24, 0x54, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x54, 0x50, 0x50, 0x54, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x22, 0x20, 0x70, 0x20, 0x20, 0x20, 0x62, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x3c, 0x24, 0x24, 0x3c, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x82, 0x44, 0x28, 0x7c, 0x10, 0x7c, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, 0x00, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x18, 0x24, 0x20, 0x18, 0x24, 0x24, 0x18, 0x04, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x44, 0x92, 0xaa, 0xa2, 0xaa, 0x92, 0x44, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x04, 0x3c, 0x44, 0x3c, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x24, 0x48, 0x90, 0x48, 0x24, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x02, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x44, 0x92, 0xaa, 0xaa, 0xb2, 0xaa, 0x44, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x24, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x7c, 0x10, 0x10, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x30, 0x48, 0x08, 0x30, 0x40, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x48, 0x10, 0x08, 0x48, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x42, 0x42, 0x42, 0x66, 0x5a, 0x40, 0x00, 0x00, 0x00, 0x3e, 0x74, 0x74, 0x74, 0x34, 0x14, 0x14, 0x14, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x18, 0x00, 0x20, 0x60, 0x20, 0x20, 0x20, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x48, 0x48, 0x30, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x48, 0x24, 0x12, 0x24, 0x48, 0x90, 0x00, 0x00, 0x00, 0x00, 0x40, 0xc0, 0x40, 0x40, 0x42, 0xe6, 0x0a, 0x12, 0x1a, 0x06, 0x00, 0x00, 0x00, 0x40, 0xc0, 0x40, 0x40, 0x4c, 0xf2, 0x02, 0x0c, 0x10, 0x1e, 0x00, 0x00, 0x00, 0x60, 0x90, 0x20, 0x10, 0x92, 0x66, 0x0a, 0x12, 0x1a, 0x06, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x10, 0x10, 0x20, 0x40, 0x42, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x10, 0x08, 0x00, 0x18, 0x24, 0x42, 0x42, 0x7e, 0x42, 0x42, 0x00, 0x00, 0x00, 0x08, 0x10, 0x00, 0x18, 0x24, 0x42, 0x42, 0x7e, 0x42, 0x42, 0x00, 0x00, 0x00, 0x18, 0x24, 0x00, 0x18, 0x24, 0x42, 0x42, 0x7e, 0x42, 0x42, 0x00, 0x00, 0x00, 0x14, 0x28, 0x00, 0x18, 0x24, 0x42, 0x42, 0x7e, 0x42, 0x42, 0x00, 0x00, 0x00, 0x24, 0x24, 0x00, 0x18, 0x24, 0x42, 0x42, 0x7e, 0x42, 0x42, 0x00, 0x00, 0x00, 0x18, 0x24, 0x18, 0x18, 0x24, 0x42, 0x42, 0x7e, 0x42, 0x42, 0x00, 0x00, 0x00, 0x00, 0x6e, 0x90, 0x90, 0x90, 0x9c, 0xf0, 0x90, 0x90, 0x9e, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x42, 0x40, 0x40, 0x40, 0x40, 0x40, 0x42, 0x3c, 0x08, 0x10, 0x00, 0x10, 0x08, 0x00, 0x7e, 0x40, 0x40, 0x78, 0x40, 0x40, 0x7e, 0x00, 0x00, 0x00, 0x08, 0x10, 0x00, 0x7e, 0x40, 0x40, 0x78, 0x40, 0x40, 0x7e, 0x00, 0x00, 0x00, 0x18, 0x24, 0x00, 0x7e, 0x40, 0x40, 0x78, 0x40, 0x40, 0x7e, 0x00, 0x00, 0x00, 0x24, 0x24, 0x00, 0x7e, 0x40, 0x40, 0x78, 0x40, 0x40, 0x7e, 0x00, 0x00, 0x00, 0x10, 0x08, 0x00, 0x7c, 0x10, 0x10, 0x10, 0x10, 0x10, 0x7c, 0x00, 0x00, 0x00, 0x08, 0x10, 0x00, 0x7c, 0x10, 0x10, 0x10, 0x10, 0x10, 0x7c, 0x00, 0x00, 0x00, 0x18, 0x24, 0x00, 0x7c, 0x10, 0x10, 0x10, 0x10, 0x10, 0x7c, 0x00, 0x00, 0x00, 0x28, 0x28, 0x00, 0x7c, 0x10, 0x10, 0x10, 0x10, 0x10, 0x7c, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x42, 0x42, 0x42, 0xe2, 0x42, 0x42, 0x42, 0xfc, 0x00, 0x00, 0x00, 0x14, 0x28, 0x00, 0x82, 0xc2, 0xa2, 0x92, 0x8a, 0x86, 0x82, 0x00, 0x00, 0x00, 0x10, 0x08, 0x00, 0x7c, 0x82, 0x82, 0x82, 0x82, 0x82, 0x7c, 0x00, 0x00, 0x00, 0x08, 0x10, 0x00, 0x7c, 0x82, 0x82, 0x82, 0x82, 0x82, 0x7c, 0x00, 0x00, 0x00, 0x18, 0x24, 0x00, 0x7c, 0x82, 0x82, 0x82, 0x82, 0x82, 0x7c, 0x00, 0x00, 0x00, 0x14, 0x28, 0x00, 0x7c, 0x82, 0x82, 0x82, 0x82, 0x82, 0x7c, 0x00, 0x00, 0x00, 0x28, 0x28, 0x00, 0x7c, 0x82, 0x82, 0x82, 0x82, 0x82, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x24, 0x18, 0x18, 0x24, 0x42, 0x00, 0x00, 0x00, 0x00, 0x02, 0x3c, 0x46, 0x4a, 0x4a, 0x52, 0x52, 0x52, 0x62, 0x3c, 0x40, 0x00, 0x00, 0x10, 0x08, 0x00, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x08, 0x10, 0x00, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x18, 0x24, 0x00, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x24, 0x24, 0x00, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x08, 0x10, 0x00, 0x44, 0x44, 0x28, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x40, 0x7c, 0x42, 0x42, 0x42, 0x7c, 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x42, 0x42, 0x7c, 0x42, 0x42, 0x62, 0x5c, 0x40, 0x00, 0x00, 0x10, 0x08, 0x00, 0x00, 0x3c, 0x02, 0x3e, 0x42, 0x46, 0x3a, 0x00, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x3c, 0x02, 0x3e, 0x42, 0x46, 0x3a, 0x00, 0x00, 0x00, 0x18, 0x24, 0x00, 0x00, 0x3c, 0x02, 0x3e, 0x42, 0x46, 0x3a, 0x00, 0x00, 0x00, 0x14, 0x28, 0x00, 0x00, 0x3c, 0x02, 0x3e, 0x42, 0x46, 0x3a, 0x00, 0x00, 0x00, 0x24, 0x24, 0x00, 0x00, 0x3c, 0x02, 0x3e, 0x42, 0x46, 0x3a, 0x00, 0x00, 0x00, 0x18, 0x24, 0x18, 0x00, 0x3c, 0x02, 0x3e, 0x42, 0x46, 0x3a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6c, 0x12, 0x7c, 0x90, 0x92, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x42, 0x40, 0x40, 0x42, 0x3c, 0x08, 0x10, 0x00, 0x10, 0x08, 0x00, 0x00, 0x3c, 0x42, 0x7e, 0x40, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x3c, 0x42, 0x7e, 0x40, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x18, 0x24, 0x00, 0x00, 0x3c, 0x42, 0x7e, 0x40, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x24, 0x24, 0x00, 0x00, 0x3c, 0x42, 0x7e, 0x40, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x20, 0x10, 0x00, 0x00, 0x30, 0x10, 0x10, 0x10, 0x10, 0x7c, 0x00, 0x00, 0x00, 0x10, 0x20, 0x00, 0x00, 0x30, 0x10, 0x10, 0x10, 0x10, 0x7c, 0x00, 0x00, 0x00, 0x30, 0x48, 0x00, 0x00, 0x30, 0x10, 0x10, 0x10, 0x10, 0x7c, 0x00, 0x00, 0x00, 0x28, 0x28, 0x00, 0x00, 0x30, 0x10, 0x10, 0x10, 0x10, 0x7c, 0x00, 0x00, 0x00, 0x24, 0x18, 0x28, 0x04, 0x3c, 0x42, 0x42, 0x42, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x14, 0x28, 0x00, 0x00, 0x5c, 0x62, 0x42, 0x42, 0x42, 0x42, 0x00, 0x00, 0x00, 0x10, 0x08, 0x00, 0x00, 0x3c, 0x42, 0x42, 0x42, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x3c, 0x42, 0x42, 0x42, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x18, 0x24, 0x00, 0x00, 0x3c, 0x42, 0x42, 0x42, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x14, 0x28, 0x00, 0x00, 0x3c, 0x42, 0x42, 0x42, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x24, 0x24, 0x00, 0x00, 0x3c, 0x42, 0x42, 0x42, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x00, 0x7c, 0x00, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x3c, 0x46, 0x4a, 0x52, 0x62, 0x3c, 0x40, 0x00, 0x00, 0x10, 0x08, 0x00, 0x00, 0x44, 0x44, 0x44, 0x44, 0x44, 0x3a, 0x00, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x44, 0x44, 0x44, 0x44, 0x44, 0x3a, 0x00, 0x00, 0x00, 0x18, 0x24, 0x00, 0x00, 0x44, 0x44, 0x44, 0x44, 0x44, 0x3a, 0x00, 0x00, 0x00, 0x24, 0x24, 0x00, 0x00, 0x44, 0x44, 0x44, 0x44, 0x44, 0x3a, 0x00, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x42, 0x42, 0x42, 0x46, 0x3a, 0x02, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x40, 0x40, 0x5c, 0x62, 0x42, 0x42, 0x62, 0x5c, 0x40, 0x40, 0x00, 0x24, 0x24, 0x00, 0x00, 0x42, 0x42, 0x42, 0x46, 0x3a, 0x02, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; __AA_CONST struct aa_font aa_fontX13 = {fontX13data, 13, "X 8x13 font", "X8x13"}; aalib-1.4.0/src/fontx13b.c0000644000766200001440000005253707272031253010665 #include "config.h" #include "aalib.h" /* binary image of font8x13 follows */ __AA_CONST unsigned char fontX13Bdata[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x7c, 0xfe, 0x7c, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd6, 0x6c, 0xd6, 0x6c, 0xd6, 0x6c, 0xd6, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xcc, 0xfc, 0xcc, 0xcc, 0x00, 0x7e, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0xf8, 0xc0, 0xf0, 0xc0, 0xc0, 0x00, 0x3e, 0x30, 0x3c, 0x30, 0x30, 0x00, 0x00, 0x7c, 0xc4, 0xc0, 0xc4, 0x7c, 0x00, 0x7c, 0x66, 0x7c, 0x66, 0x66, 0x00, 0x00, 0xc0, 0xc0, 0xc0, 0xc0, 0xf8, 0x00, 0x3e, 0x30, 0x3c, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x66, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x7e, 0x7e, 0x18, 0x18, 0x00, 0x7e, 0x7e, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xec, 0xfc, 0xdc, 0xcc, 0x00, 0x30, 0x30, 0x30, 0x30, 0x3e, 0x00, 0x00, 0xcc, 0xcc, 0x48, 0x78, 0x30, 0x00, 0x7e, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xf8, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xf8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1f, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0xff, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1f, 0x1f, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xf8, 0xf8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x06, 0x1c, 0x70, 0xc0, 0x70, 0x1c, 0x06, 0x00, 0xfe, 0xfe, 0x00, 0x00, 0x00, 0xc0, 0x70, 0x1c, 0x06, 0x1c, 0x70, 0xc0, 0x00, 0xfe, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xfe, 0x2c, 0x2c, 0x2c, 0xec, 0xec, 0x00, 0x00, 0x00, 0x00, 0x06, 0x0c, 0xfe, 0xfe, 0x38, 0xfe, 0xfe, 0x60, 0xc0, 0x00, 0x00, 0x00, 0x3c, 0x66, 0x60, 0x60, 0xfc, 0x60, 0x60, 0x60, 0xf0, 0xbe, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x6c, 0x6c, 0x6c, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6c, 0x6c, 0xfe, 0xfe, 0x6c, 0xfe, 0xfe, 0x6c, 0x6c, 0x00, 0x00, 0x00, 0x10, 0x7c, 0xd6, 0xd0, 0xf0, 0x7c, 0x1e, 0x16, 0xd6, 0x7c, 0x10, 0x00, 0x00, 0xe6, 0xa6, 0xec, 0x18, 0x18, 0x30, 0x30, 0x6e, 0xca, 0xce, 0x00, 0x00, 0x00, 0x78, 0xcc, 0xcc, 0xcc, 0x78, 0x78, 0xce, 0xcc, 0xcc, 0x7e, 0x00, 0x00, 0x00, 0x3c, 0x1c, 0x1c, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x0c, 0x18, 0x18, 0x30, 0x30, 0x30, 0x18, 0x18, 0x0c, 0x06, 0x00, 0x00, 0x60, 0x30, 0x18, 0x18, 0x0c, 0x0c, 0x0c, 0x18, 0x18, 0x30, 0x60, 0x00, 0x00, 0x00, 0x10, 0xd6, 0x7c, 0x38, 0xee, 0x38, 0x7c, 0xd6, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x7e, 0x7e, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x1c, 0x1c, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x3c, 0x18, 0x00, 0x00, 0x00, 0x02, 0x06, 0x06, 0x0c, 0x18, 0x30, 0x60, 0xc0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x38, 0x6c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x6c, 0x38, 0x00, 0x00, 0x00, 0x18, 0x38, 0x78, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x7e, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0x06, 0x0c, 0x18, 0x30, 0x60, 0xc0, 0xfe, 0x00, 0x00, 0x00, 0xfe, 0x06, 0x0c, 0x18, 0x3c, 0x06, 0x06, 0x06, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x0c, 0x1c, 0x3c, 0x6c, 0xcc, 0xcc, 0xfe, 0x0c, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0xfe, 0xc0, 0xc0, 0xfc, 0xe6, 0x06, 0x06, 0x06, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x3c, 0x60, 0xc0, 0xc0, 0xfc, 0xe6, 0xc6, 0xc6, 0xe6, 0x7c, 0x00, 0x00, 0x00, 0xfe, 0x06, 0x06, 0x0c, 0x18, 0x18, 0x30, 0x30, 0x30, 0x30, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x7c, 0xce, 0xc6, 0xc6, 0xce, 0x7e, 0x06, 0x06, 0x0c, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x3c, 0x18, 0x00, 0x00, 0x18, 0x3c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x3c, 0x18, 0x00, 0x3c, 0x1c, 0x1c, 0x18, 0x30, 0x00, 0x00, 0x00, 0x06, 0x0c, 0x18, 0x30, 0x60, 0x30, 0x18, 0x0c, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x7e, 0x00, 0x00, 0x7e, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x30, 0x18, 0x0c, 0x06, 0x0c, 0x18, 0x30, 0x60, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0x06, 0x0c, 0x18, 0x18, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xfe, 0xce, 0xde, 0xd2, 0xd2, 0xde, 0xe0, 0x7e, 0x00, 0x00, 0x00, 0x38, 0x7c, 0xc6, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0xfc, 0x66, 0x66, 0x66, 0x7c, 0x66, 0x66, 0x66, 0x66, 0xfc, 0x00, 0x00, 0x00, 0x7c, 0xe6, 0xc6, 0xc0, 0xc0, 0xc0, 0xc0, 0xc6, 0xe6, 0x7c, 0x00, 0x00, 0x00, 0xfc, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0xfc, 0x00, 0x00, 0x00, 0xfe, 0xc2, 0xc0, 0xc0, 0xf8, 0xc0, 0xc0, 0xc0, 0xc2, 0xfe, 0x00, 0x00, 0x00, 0xfe, 0xc2, 0xc0, 0xc0, 0xf8, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc0, 0xc0, 0xc0, 0xce, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x0e, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xcc, 0xd8, 0xf0, 0xf0, 0xd8, 0xcc, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc2, 0xfe, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xee, 0xfe, 0xd6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xe6, 0xe6, 0xf6, 0xde, 0xce, 0xce, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0xfc, 0xc6, 0xc6, 0xc6, 0xc6, 0xfc, 0xc0, 0xc0, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xde, 0x7c, 0x06, 0x00, 0x00, 0xfc, 0xc6, 0xc6, 0xc6, 0xfc, 0xf8, 0xcc, 0xcc, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc0, 0x7c, 0x06, 0x06, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x7e, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0x44, 0x6c, 0x6c, 0x38, 0x38, 0x10, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xd6, 0xd6, 0xfe, 0x6c, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0x6c, 0x6c, 0x38, 0x38, 0x6c, 0x6c, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x66, 0x66, 0x66, 0x3c, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0xfe, 0x06, 0x06, 0x0c, 0x18, 0x30, 0x60, 0xc0, 0xc0, 0xfe, 0x00, 0x00, 0x00, 0x3e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x3e, 0x00, 0x00, 0x80, 0xc0, 0xc0, 0x60, 0x30, 0x18, 0x0c, 0x06, 0x06, 0x02, 0x00, 0x00, 0x00, 0x7c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x7c, 0x00, 0x00, 0x10, 0x38, 0x6c, 0xc6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x3c, 0x38, 0x38, 0x18, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x06, 0x7e, 0xc6, 0xc6, 0xce, 0x7e, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xc0, 0xfc, 0xe6, 0xc6, 0xc6, 0xc6, 0xe6, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xe6, 0xc0, 0xc0, 0xc0, 0xe6, 0x7c, 0x00, 0x00, 0x00, 0x06, 0x06, 0x06, 0x7e, 0xce, 0xc6, 0xc6, 0xc6, 0xce, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xfe, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x3c, 0x66, 0x60, 0x60, 0x60, 0xfc, 0x60, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0xcc, 0xcc, 0xcc, 0x78, 0xf0, 0x7c, 0xc6, 0x7c, 0x00, 0xc0, 0xc0, 0xc0, 0xfc, 0xe6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x06, 0x06, 0x00, 0x0e, 0x06, 0x06, 0x06, 0x06, 0xc6, 0xc6, 0x7c, 0x00, 0xc0, 0xc0, 0xc0, 0xcc, 0xd8, 0xf0, 0xf0, 0xd8, 0xcc, 0xc6, 0x00, 0x00, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6c, 0xfe, 0xd6, 0xd6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xe6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xe6, 0xc6, 0xc6, 0xc6, 0xe6, 0xfc, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x7e, 0xce, 0xc6, 0xc6, 0xc6, 0xce, 0x7e, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xe6, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0x78, 0x3c, 0x06, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x60, 0x60, 0x60, 0x60, 0xfc, 0x60, 0x60, 0x60, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xce, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0x6c, 0x6c, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xd6, 0xd6, 0xfe, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0x7c, 0x38, 0x7c, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xce, 0x7e, 0x06, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x0c, 0x18, 0x30, 0x60, 0xc0, 0xfe, 0x00, 0x00, 0x00, 0x1e, 0x30, 0x30, 0x30, 0x18, 0x70, 0x18, 0x30, 0x30, 0x30, 0x1e, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x78, 0x0c, 0x0c, 0x0c, 0x18, 0x0e, 0x18, 0x0c, 0x0c, 0x0c, 0x78, 0x00, 0x00, 0x00, 0x72, 0xfe, 0x9c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x10, 0x7c, 0xd4, 0xd0, 0xd0, 0xd4, 0x7c, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x66, 0x60, 0x60, 0xfc, 0x60, 0x60, 0x60, 0xf0, 0xbe, 0xe0, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xfe, 0x6c, 0x44, 0x6c, 0xfe, 0xc6, 0x00, 0x00, 0x00, 0x00, 0x66, 0x66, 0x66, 0x3c, 0x3c, 0x7e, 0x18, 0x7e, 0x18, 0x18, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x3c, 0x66, 0x60, 0x3c, 0x66, 0x66, 0x3c, 0x06, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x6c, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xba, 0xea, 0xe2, 0xea, 0xba, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0c, 0x7c, 0x4c, 0x7c, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x6c, 0xd8, 0xb0, 0xd8, 0x6c, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xba, 0xaa, 0xba, 0xb2, 0xaa, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x66, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x7e, 0x7e, 0x18, 0x18, 0x00, 0x7e, 0x7e, 0x00, 0x00, 0x00, 0x70, 0x58, 0x18, 0x30, 0x60, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x58, 0x30, 0x18, 0x58, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xee, 0xfe, 0x80, 0x00, 0x00, 0x3e, 0x7a, 0xca, 0xca, 0xca, 0x7a, 0x3a, 0x0a, 0x0a, 0x0a, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x48, 0x30, 0x00, 0x30, 0x70, 0x30, 0x30, 0x30, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x7c, 0x44, 0x7c, 0x38, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd8, 0x6c, 0x36, 0x1a, 0x36, 0x6c, 0xd8, 0x00, 0x00, 0x00, 0x00, 0x60, 0xe0, 0x60, 0x60, 0x62, 0xf6, 0x0e, 0x1a, 0x1e, 0x06, 0x00, 0x00, 0x00, 0x60, 0xe0, 0x60, 0x60, 0x7c, 0xf6, 0x06, 0x0c, 0x18, 0x1e, 0x00, 0x00, 0x00, 0xe0, 0xb0, 0x60, 0x30, 0xb2, 0xe6, 0x0e, 0x1a, 0x1e, 0x06, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x18, 0x18, 0x30, 0x60, 0x66, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x30, 0x18, 0x00, 0x38, 0x7c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x18, 0x30, 0x00, 0x38, 0x7c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x38, 0x6c, 0x00, 0x38, 0x7c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x34, 0x58, 0x00, 0x38, 0x7c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x6c, 0x6c, 0x00, 0x38, 0x7c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x38, 0x28, 0x38, 0x38, 0x7c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0xf8, 0xd8, 0xdc, 0xf8, 0xd8, 0xd8, 0xde, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xe6, 0xc0, 0xc0, 0xc0, 0xe6, 0x7c, 0x18, 0x48, 0x30, 0x00, 0x30, 0x18, 0x00, 0xfe, 0xc2, 0xc0, 0xf8, 0xc0, 0xc2, 0xfe, 0x00, 0x00, 0x00, 0x18, 0x30, 0x00, 0xfe, 0xc2, 0xc0, 0xf8, 0xc0, 0xc2, 0xfe, 0x00, 0x00, 0x00, 0x38, 0x6c, 0x00, 0xfe, 0xc2, 0xc0, 0xf8, 0xc0, 0xc2, 0xfe, 0x00, 0x00, 0x00, 0x6c, 0x6c, 0x00, 0xfe, 0xc2, 0xc0, 0xf8, 0xc0, 0xc2, 0xfe, 0x00, 0x00, 0x00, 0x30, 0x18, 0x00, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x0c, 0x18, 0x00, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x1c, 0x36, 0x00, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x36, 0x36, 0x00, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x66, 0x66, 0xf6, 0x66, 0x66, 0x66, 0xfc, 0x00, 0x00, 0x00, 0x34, 0x58, 0x00, 0xc6, 0xe6, 0xf6, 0xd6, 0xde, 0xce, 0xc6, 0x00, 0x00, 0x00, 0x30, 0x18, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x18, 0x30, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x38, 0x6c, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x34, 0x58, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x6c, 0x6c, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0x7c, 0x38, 0x7c, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00, 0x02, 0x7c, 0xce, 0xd6, 0xd6, 0xd6, 0xd6, 0xe6, 0x7c, 0x80, 0x00, 0x00, 0x30, 0x18, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x18, 0x30, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x38, 0x6c, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x6c, 0x6c, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x0c, 0x18, 0x00, 0x66, 0x24, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xfc, 0xc6, 0xc6, 0xc6, 0xfc, 0xc0, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xfc, 0xc6, 0xc6, 0xc6, 0xfc, 0x80, 0x00, 0x00, 0x30, 0x18, 0x00, 0x7c, 0x06, 0x7e, 0xc6, 0xc6, 0xce, 0x7e, 0x00, 0x00, 0x00, 0x18, 0x30, 0x00, 0x7c, 0x06, 0x7e, 0xc6, 0xc6, 0xce, 0x7e, 0x00, 0x00, 0x00, 0x38, 0x6c, 0x00, 0x7c, 0x06, 0x7e, 0xc6, 0xc6, 0xce, 0x7e, 0x00, 0x00, 0x00, 0x34, 0x58, 0x00, 0x7c, 0x06, 0x7e, 0xc6, 0xc6, 0xce, 0x7e, 0x00, 0x00, 0x00, 0x6c, 0x6c, 0x00, 0x7c, 0x06, 0x7e, 0xc6, 0xc6, 0xce, 0x7e, 0x00, 0x00, 0x00, 0x38, 0x28, 0x38, 0x7c, 0x06, 0x7e, 0xc6, 0xc6, 0xce, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0xee, 0xba, 0x3a, 0x7e, 0xb8, 0xb8, 0xba, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xe6, 0xc0, 0xc0, 0xc0, 0xe6, 0x7c, 0x18, 0x48, 0x30, 0x00, 0x30, 0x18, 0x00, 0x7c, 0xc6, 0xc6, 0xfe, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x18, 0x30, 0x00, 0x7c, 0xc6, 0xc6, 0xfe, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x38, 0x6c, 0x00, 0x7c, 0xc6, 0xc6, 0xfe, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x6c, 0x6c, 0x00, 0x7c, 0xc6, 0xc6, 0xfe, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x30, 0x18, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x18, 0x30, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x38, 0x6c, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x6c, 0x6c, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x6c, 0x38, 0x48, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x34, 0x58, 0x00, 0xfc, 0xe6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x30, 0x18, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x18, 0x30, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x38, 0x6c, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x34, 0x58, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x6c, 0x6c, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x7e, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x7c, 0xce, 0xd6, 0xd6, 0xd6, 0xe6, 0x7c, 0x80, 0x00, 0x00, 0x30, 0x18, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xce, 0x7e, 0x00, 0x00, 0x00, 0x18, 0x30, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xce, 0x7e, 0x00, 0x00, 0x00, 0x38, 0x6c, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xce, 0x7e, 0x00, 0x00, 0x00, 0x6c, 0x6c, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xce, 0x7e, 0x00, 0x00, 0x00, 0x18, 0x30, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xce, 0x7e, 0x06, 0xc6, 0x7c, 0x00, 0x00, 0xc0, 0xc0, 0xfc, 0xe6, 0xc6, 0xc6, 0xc6, 0xe6, 0xfc, 0xc0, 0xc0, 0x00, 0x6c, 0x6c, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xce, 0x7e, 0x06, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; __AA_CONST struct aa_font aa_fontX13B = {fontX13Bdata, 13, "X 8x13bold font", "X8x13bold"}; aalib-1.4.0/src/fontcour.c0000644000766200001440000004525007272031253011052 #include "aalib.h" __AA_CONST static unsigned char fontcourierdata[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x24, 0x24, 0x24, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x24, 0x24, 0x7e, 0x24, 0x24, 0x7e, 0x28, 0x28, 0x28, 0x00, 0x00, 0x10, 0x10, 0x3c, 0x54, 0x74, 0x18, 0x56, 0x52, 0x7c, 0x10, 0x10, 0x00, 0x00, 0x70, 0x90, 0x90, 0x7e, 0x70, 0x0e, 0x12, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x20, 0x20, 0x36, 0x4c, 0x48, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x04, 0x04, 0x00, 0x00, 0x20, 0x20, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x10, 0x7c, 0x10, 0x28, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x7e, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x04, 0x04, 0x08, 0x08, 0x08, 0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x00, 0x00, 0x38, 0x24, 0x42, 0x42, 0x42, 0x42, 0x24, 0x38, 0x00, 0x00, 0x00, 0x00, 0x18, 0x28, 0x08, 0x08, 0x08, 0x08, 0x08, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x38, 0x44, 0x04, 0x04, 0x08, 0x10, 0x24, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x38, 0x04, 0x04, 0x18, 0x04, 0x04, 0x04, 0x78, 0x00, 0x00, 0x00, 0x00, 0x08, 0x18, 0x18, 0x28, 0x28, 0x7c, 0x08, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x78, 0x40, 0x40, 0x78, 0x04, 0x04, 0x04, 0x38, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x20, 0x20, 0x78, 0x44, 0x44, 0x44, 0x38, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x42, 0x04, 0x04, 0x08, 0x08, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, 0x44, 0x44, 0x38, 0x24, 0x42, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x38, 0x44, 0x44, 0x44, 0x3c, 0x04, 0x08, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x18, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x06, 0x18, 0x20, 0x30, 0x0c, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x18, 0x04, 0x0c, 0x70, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x04, 0x04, 0x18, 0x10, 0x00, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x42, 0x9d, 0xa9, 0xab, 0x5e, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0x24, 0x24, 0x7e, 0x42, 0xe7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x42, 0x42, 0x7c, 0x42, 0x42, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x42, 0x40, 0x40, 0x40, 0x21, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x42, 0x42, 0x42, 0x42, 0x42, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x22, 0x28, 0x38, 0x20, 0x22, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x22, 0x24, 0x3c, 0x20, 0x20, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x42, 0x80, 0x80, 0x8f, 0x42, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x44, 0x44, 0x7c, 0x44, 0x44, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x10, 0x10, 0x10, 0x10, 0x10, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x04, 0x04, 0x04, 0x44, 0x44, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x24, 0x28, 0x38, 0x28, 0x24, 0x77, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x20, 0x20, 0x20, 0x22, 0x22, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc7, 0x66, 0x66, 0x5a, 0x52, 0x42, 0xe7, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe7, 0x62, 0x52, 0x4a, 0x4a, 0x46, 0xe6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x42, 0x82, 0x82, 0x82, 0x44, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x22, 0x22, 0x3c, 0x20, 0x20, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x42, 0x82, 0x82, 0x82, 0x46, 0x3c, 0x10, 0x2e, 0x00, 0x00, 0x00, 0x7c, 0x42, 0x46, 0x78, 0x4c, 0x44, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3d, 0x42, 0x60, 0x1c, 0x02, 0x42, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x92, 0x92, 0x10, 0x10, 0x10, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe6, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe7, 0x42, 0x22, 0x24, 0x24, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe7, 0x4a, 0x5a, 0x5a, 0x5a, 0x6a, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe6, 0x64, 0x18, 0x18, 0x24, 0x46, 0xe7, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe7, 0x46, 0x2c, 0x38, 0x10, 0x10, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x44, 0x08, 0x10, 0x22, 0x22, 0x7e, 0x00, 0x00, 0x00, 0x0c, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x0c, 0x00, 0x00, 0x40, 0x20, 0x20, 0x20, 0x10, 0x10, 0x08, 0x08, 0x08, 0x04, 0x04, 0x00, 0x70, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x70, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x24, 0x64, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x10, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x04, 0x3c, 0x44, 0x44, 0x7e, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x40, 0x5c, 0x64, 0x42, 0x42, 0x62, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x62, 0x40, 0x40, 0x43, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x06, 0x02, 0x3a, 0x46, 0x42, 0x42, 0x46, 0x3b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x26, 0x42, 0x7e, 0x40, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x20, 0x7c, 0x20, 0x20, 0x20, 0x20, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x44, 0x84, 0x84, 0x44, 0x3c, 0x04, 0x38, 0x00, 0x00, 0xc0, 0x40, 0x5c, 0x62, 0x42, 0x42, 0x42, 0xe6, 0x00, 0x00, 0x00, 0x10, 0x10, 0x00, 0x30, 0x10, 0x10, 0x10, 0x10, 0x7c, 0x00, 0x00, 0x00, 0x08, 0x08, 0x00, 0x78, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x70, 0x00, 0x00, 0x60, 0x20, 0x2e, 0x28, 0x30, 0x28, 0x28, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x70, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xee, 0x92, 0x92, 0x92, 0x92, 0xda, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd8, 0x64, 0x44, 0x44, 0x44, 0xe6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x46, 0x42, 0x42, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x66, 0x42, 0x42, 0x62, 0x5c, 0x40, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x3b, 0x46, 0x42, 0x42, 0x46, 0x3a, 0x02, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x6e, 0x30, 0x20, 0x20, 0x20, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x46, 0x60, 0x5e, 0x62, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x7c, 0x20, 0x20, 0x20, 0x20, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0x44, 0x44, 0x44, 0x44, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe7, 0x42, 0x24, 0x24, 0x18, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc3, 0x4a, 0x5a, 0x5a, 0x5a, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe6, 0x64, 0x18, 0x18, 0x64, 0xe7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x24, 0x24, 0x14, 0x18, 0x10, 0x10, 0x70, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x44, 0x08, 0x10, 0x22, 0x7e, 0x00, 0x00, 0x00, 0x04, 0x08, 0x08, 0x08, 0x08, 0x10, 0x08, 0x08, 0x08, 0x0c, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x20, 0x10, 0x10, 0x10, 0x10, 0x08, 0x10, 0x10, 0x10, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3a, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x18, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x10, 0x10, 0x3e, 0x52, 0x50, 0x77, 0x38, 0x10, 0x10, 0x00, 0x00, 0x00, 0x1e, 0x22, 0x20, 0x7c, 0x10, 0x10, 0x20, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x7c, 0x44, 0x44, 0x64, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe7, 0x46, 0x2c, 0x18, 0x3e, 0x3e, 0x10, 0x3c, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x3c, 0x20, 0x78, 0x44, 0x32, 0x0e, 0x24, 0x38, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x5a, 0xa5, 0xa1, 0xa5, 0x5a, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x28, 0x3c, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x24, 0x48, 0x24, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x02, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x7e, 0xa5, 0xb9, 0xb5, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x24, 0x24, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x7e, 0x10, 0x10, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x38, 0x08, 0x08, 0x10, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x08, 0x18, 0x08, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc4, 0x44, 0x44, 0x44, 0x44, 0x7e, 0x40, 0x40, 0x00, 0x00, 0x00, 0x7c, 0x54, 0x54, 0x34, 0x14, 0x14, 0x14, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x18, 0x18, 0x00, 0x00, 0x30, 0x10, 0x10, 0x10, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x24, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x24, 0x12, 0x24, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc1, 0x42, 0x44, 0x44, 0xea, 0x16, 0x26, 0x4f, 0x43, 0x00, 0x00, 0x00, 0xc3, 0x42, 0x44, 0x4c, 0xfe, 0x11, 0x23, 0x42, 0x47, 0x00, 0x00, 0x00, 0xe1, 0x22, 0x64, 0x14, 0xea, 0x16, 0x26, 0x2f, 0x43, 0x00, 0x00, 0x00, 0x00, 0x08, 0x18, 0x00, 0x00, 0x18, 0x20, 0x40, 0x44, 0x3c, 0x00, 0x08, 0x00, 0x78, 0x18, 0x24, 0x24, 0x7e, 0x42, 0xe7, 0x00, 0x00, 0x00, 0x08, 0x00, 0x78, 0x18, 0x24, 0x24, 0x7e, 0x42, 0xe7, 0x00, 0x00, 0x10, 0x28, 0x00, 0x78, 0x18, 0x24, 0x24, 0x7e, 0x42, 0xe7, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x78, 0x18, 0x24, 0x24, 0x7e, 0x42, 0xe7, 0x00, 0x00, 0x18, 0x00, 0x00, 0x78, 0x18, 0x24, 0x24, 0x7e, 0x42, 0xe7, 0x00, 0x00, 0x18, 0x18, 0x00, 0x78, 0x18, 0x24, 0x24, 0x7e, 0x42, 0xe7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x1e, 0x2c, 0x2c, 0x7c, 0x4a, 0xce, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x22, 0x40, 0x40, 0x40, 0x21, 0x3e, 0x0c, 0x1c, 0x00, 0x08, 0x00, 0x7e, 0x22, 0x28, 0x38, 0x20, 0x22, 0x7e, 0x00, 0x00, 0x00, 0x08, 0x00, 0x7e, 0x22, 0x28, 0x38, 0x20, 0x22, 0x7e, 0x00, 0x00, 0x10, 0x28, 0x00, 0x7e, 0x22, 0x28, 0x38, 0x20, 0x22, 0x7e, 0x00, 0x00, 0x18, 0x00, 0x00, 0x7e, 0x22, 0x28, 0x38, 0x20, 0x22, 0x7e, 0x00, 0x00, 0x00, 0x08, 0x00, 0x7c, 0x10, 0x10, 0x10, 0x10, 0x10, 0x7c, 0x00, 0x00, 0x00, 0x08, 0x00, 0x7c, 0x10, 0x10, 0x10, 0x10, 0x10, 0x7c, 0x00, 0x00, 0x10, 0x28, 0x00, 0x7c, 0x10, 0x10, 0x10, 0x10, 0x10, 0x7c, 0x00, 0x00, 0x18, 0x00, 0x00, 0x7c, 0x10, 0x10, 0x10, 0x10, 0x10, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x42, 0x42, 0xf2, 0x42, 0x42, 0xfc, 0x00, 0x00, 0x3c, 0x00, 0x00, 0xe7, 0x62, 0x52, 0x4a, 0x4a, 0x46, 0xe6, 0x00, 0x00, 0x00, 0x08, 0x00, 0x3c, 0x42, 0x82, 0x82, 0x82, 0x44, 0x3c, 0x00, 0x00, 0x00, 0x08, 0x00, 0x3c, 0x42, 0x82, 0x82, 0x82, 0x44, 0x3c, 0x00, 0x00, 0x10, 0x28, 0x00, 0x3c, 0x42, 0x82, 0x82, 0x82, 0x44, 0x3c, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x3c, 0x42, 0x82, 0x82, 0x82, 0x44, 0x3c, 0x00, 0x00, 0x18, 0x00, 0x00, 0x3c, 0x42, 0x82, 0x82, 0x82, 0x44, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x38, 0x38, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x46, 0x8a, 0x92, 0x92, 0x64, 0x7c, 0x00, 0x00, 0x00, 0x08, 0x00, 0xe6, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x08, 0x00, 0xe6, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3c, 0x00, 0x00, 0x10, 0x28, 0x00, 0xe6, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3c, 0x00, 0x00, 0x18, 0x00, 0x00, 0xe6, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x08, 0x00, 0xe7, 0x46, 0x2c, 0x38, 0x10, 0x10, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x3c, 0x22, 0x22, 0x22, 0x3c, 0x70, 0x00, 0x00, 0x00, 0x00, 0x18, 0x24, 0x24, 0x38, 0x26, 0x22, 0x22, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x38, 0x04, 0x3c, 0x44, 0x44, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x38, 0x04, 0x3c, 0x44, 0x44, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x38, 0x04, 0x3c, 0x44, 0x44, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x38, 0x04, 0x3c, 0x44, 0x44, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x38, 0x04, 0x3c, 0x44, 0x44, 0x7e, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x38, 0x04, 0x3c, 0x44, 0x44, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xec, 0x12, 0x72, 0x9e, 0x90, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x42, 0x40, 0x40, 0x43, 0x3c, 0x10, 0x08, 0x00, 0x00, 0x08, 0x00, 0x1c, 0x26, 0x42, 0x7e, 0x40, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x1c, 0x26, 0x42, 0x7e, 0x40, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x1c, 0x26, 0x42, 0x7e, 0x40, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x1c, 0x26, 0x42, 0x7e, 0x40, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x30, 0x10, 0x10, 0x10, 0x10, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x30, 0x10, 0x10, 0x10, 0x10, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x30, 0x10, 0x10, 0x10, 0x10, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x30, 0x10, 0x10, 0x10, 0x10, 0x7c, 0x00, 0x00, 0x00, 0x70, 0x18, 0x24, 0x3e, 0x46, 0x42, 0x42, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0xd8, 0x64, 0x44, 0x44, 0x44, 0xe6, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x3c, 0x46, 0x42, 0x42, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x3c, 0x46, 0x42, 0x42, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x3c, 0x46, 0x42, 0x42, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x3c, 0x46, 0x42, 0x42, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x3c, 0x46, 0x42, 0x42, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x7e, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x46, 0x4a, 0x52, 0x62, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0xcc, 0x44, 0x44, 0x44, 0x44, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0xcc, 0x44, 0x44, 0x44, 0x44, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0xcc, 0x44, 0x44, 0x44, 0x44, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0xcc, 0x44, 0x44, 0x44, 0x44, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x66, 0x24, 0x24, 0x14, 0x18, 0x10, 0x10, 0x70, 0x00, 0x00, 0xc0, 0x40, 0x5c, 0x66, 0x42, 0x42, 0x62, 0x5c, 0x40, 0xf0, 0x00, 0x00, 0x18, 0x00, 0x66, 0x24, 0x24, 0x14, 0x18, 0x10, 0x10, 0x70, 0x00, 0x00,}; __AA_CONST struct aa_font aa_fontcourier = {fontcourierdata, 12, "Adobe courier", "courier"}; aalib-1.4.0/src/aarec.c0000644000766200001440000000261607272031253010265 #include #include #include "aalib.h" #include "aaint.h" aa_linkedlist *aa_kbdrecommended = NULL, *aa_mouserecommended = NULL, *aa_displayrecommended = NULL; #define addlist(l,m) ((((l)!=NULL)?(m)->next=(l),(m)->previous=(l)->previous,(l)->previous=(m),(m)->previous->next=(m):((m)->next=(m),(m)->previous=(m),(l)=(m)))) #define inslist(l,m) (addlist(l,m),(l)=(m)) #define remove(l,m) ((m)->next->previous=(m)->previous,(m)->previous->next=(m)->next,((l)==m?(l)=((l)->next==(l)?NULL:(l)->next):NULL)) static aa_linkedlist *aa_find(aa_linkedlist * l, __AA_CONST char *text) { aa_linkedlist *m = l; if (l == NULL) return NULL; do { if (!strcmp(m->text, text)) return (m); m = m->next; } while (l != m); return NULL; } void aa_recommendhi(aa_linkedlist ** l, __AA_CONST char *name) { aa_linkedlist *m = (aa_linkedlist *) malloc(sizeof(*m)), *o = aa_find(*l, name); if (o != NULL) remove(*l, o); m->text = strdup(name); inslist(*l, m); } void aa_recommendlow(aa_linkedlist ** l, __AA_CONST char *name) { aa_linkedlist *o = aa_find(*l, name); if (o == NULL) { aa_linkedlist *m = (aa_linkedlist *) malloc(sizeof(*m)); m->text = strdup(name); addlist(*l, m); } } char *aa_getfirst(aa_linkedlist ** l) { char *c = NULL; aa_linkedlist *m = *l; if (*l != NULL) { remove(*l, m); c = m->text; free((char *) m); } return (c); } aalib-1.4.0/src/font9.c0000644000766200001440000003515307272031253010253 #include "config.h" #include "aalib.h" /* binary image of font8x9 follows */ __AA_CONST unsigned char font9data[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x81, 0xa5, 0x81, 0xbd, 0x99, 0x81, 0x7e, 0x00, 0x7e, 0xff, 0xdb, 0xff, 0xc3, 0xe7, 0xff, 0x7e, 0x00, 0x6c, 0xfe, 0xfe, 0xfe, 0x7c, 0x38, 0x10, 0x00, 0x00, 0x10, 0x38, 0x7c, 0xfe, 0x7c, 0x38, 0x10, 0x00, 0x00, 0x38, 0x7c, 0x38, 0xfe, 0xfe, 0x7c, 0x38, 0x7c, 0x00, 0x10, 0x10, 0x38, 0x7c, 0xfe, 0x7c, 0x38, 0x7c, 0x00, 0x00, 0x00, 0x18, 0x3c, 0x3c, 0x18, 0x00, 0x00, 0x00, 0xff, 0xff, 0xe7, 0xc3, 0xc3, 0xe7, 0xff, 0xff, 0x00, 0x00, 0x3c, 0x66, 0x42, 0x42, 0x66, 0x3c, 0x00, 0x00, 0xff, 0xc3, 0x99, 0xbd, 0xbd, 0x99, 0xc3, 0xff, 0x00, 0x0f, 0x07, 0x0f, 0x7d, 0xcc, 0xcc, 0xcc, 0x78, 0x00, 0x3c, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x7e, 0x18, 0x00, 0x3f, 0x33, 0x3f, 0x30, 0x30, 0x70, 0xf0, 0xe0, 0x00, 0x7f, 0x63, 0x7f, 0x63, 0x63, 0x67, 0xe6, 0xc0, 0x00, 0x99, 0x5a, 0x3c, 0xe7, 0xe7, 0x3c, 0x5a, 0x99, 0x00, 0x80, 0xe0, 0xf8, 0xfe, 0xf8, 0xe0, 0x80, 0x00, 0x00, 0x02, 0x0e, 0x3e, 0xfe, 0x3e, 0x0e, 0x02, 0x00, 0x00, 0x18, 0x3c, 0x7e, 0x18, 0x18, 0x7e, 0x3c, 0x18, 0x00, 0x66, 0x66, 0x66, 0x66, 0x66, 0x00, 0x66, 0x00, 0x00, 0x7f, 0xdb, 0xdb, 0x7b, 0x1b, 0x1b, 0x1b, 0x00, 0x00, 0x3e, 0x63, 0x38, 0x6c, 0x6c, 0x38, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x7e, 0x7e, 0x00, 0x00, 0x18, 0x3c, 0x7e, 0x18, 0x7e, 0x3c, 0x18, 0xff, 0x00, 0x18, 0x3c, 0x7e, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x7e, 0x3c, 0x18, 0x00, 0x00, 0x00, 0x18, 0x0c, 0xfe, 0x0c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x30, 0x60, 0xfe, 0x60, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xc0, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x24, 0x66, 0xff, 0x66, 0x24, 0x00, 0x00, 0x00, 0x00, 0x18, 0x3c, 0x7e, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x7e, 0x3c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x78, 0x78, 0x30, 0x30, 0x00, 0x30, 0x00, 0x00, 0x6c, 0x6c, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6c, 0x6c, 0xfe, 0x6c, 0xfe, 0x6c, 0x6c, 0x00, 0x00, 0x30, 0x7c, 0xc0, 0x78, 0x0c, 0xf8, 0x30, 0x00, 0x00, 0x00, 0xc6, 0xcc, 0x18, 0x30, 0x66, 0xc6, 0x00, 0x00, 0x38, 0x6c, 0x38, 0x76, 0xdc, 0xcc, 0x76, 0x00, 0x00, 0x60, 0x60, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x30, 0x60, 0x60, 0x60, 0x30, 0x18, 0x00, 0x00, 0x60, 0x30, 0x18, 0x18, 0x18, 0x30, 0x60, 0x00, 0x00, 0x00, 0x66, 0x3c, 0xff, 0x3c, 0x66, 0x00, 0x00, 0x00, 0x00, 0x30, 0x30, 0xfc, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x30, 0x60, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x06, 0x0c, 0x18, 0x30, 0x60, 0xc0, 0x80, 0x00, 0x00, 0x7c, 0xc6, 0xce, 0xde, 0xf6, 0xe6, 0x7c, 0x00, 0x00, 0x30, 0x70, 0x30, 0x30, 0x30, 0x30, 0xfc, 0x00, 0x00, 0x78, 0xcc, 0x0c, 0x38, 0x60, 0xcc, 0xfc, 0x00, 0x00, 0x78, 0xcc, 0x0c, 0x38, 0x0c, 0xcc, 0x78, 0x00, 0x00, 0x1c, 0x3c, 0x6c, 0xcc, 0xfe, 0x0c, 0x1e, 0x00, 0x00, 0xfc, 0xc0, 0xf8, 0x0c, 0x0c, 0xcc, 0x78, 0x00, 0x00, 0x38, 0x60, 0xc0, 0xf8, 0xcc, 0xcc, 0x78, 0x00, 0x00, 0xfc, 0xcc, 0x0c, 0x18, 0x30, 0x30, 0x30, 0x00, 0x00, 0x78, 0xcc, 0xcc, 0x78, 0xcc, 0xcc, 0x78, 0x00, 0x00, 0x78, 0xcc, 0xcc, 0x7c, 0x0c, 0x18, 0x70, 0x00, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x30, 0x30, 0x60, 0x00, 0x18, 0x30, 0x60, 0xc0, 0x60, 0x30, 0x18, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x60, 0x30, 0x18, 0x0c, 0x18, 0x30, 0x60, 0x00, 0x00, 0x78, 0xcc, 0x0c, 0x18, 0x30, 0x00, 0x30, 0x00, 0x00, 0x7c, 0xc6, 0xde, 0xde, 0xde, 0xc0, 0x78, 0x00, 0x00, 0x30, 0x78, 0xcc, 0xcc, 0xfc, 0xcc, 0xcc, 0x00, 0x00, 0xfc, 0x66, 0x66, 0x7c, 0x66, 0x66, 0xfc, 0x00, 0x00, 0x3c, 0x66, 0xc0, 0xc0, 0xc0, 0x66, 0x3c, 0x00, 0x00, 0xf8, 0x6c, 0x66, 0x66, 0x66, 0x6c, 0xf8, 0x00, 0x00, 0xfe, 0x62, 0x68, 0x78, 0x68, 0x62, 0xfe, 0x00, 0x00, 0xfe, 0x62, 0x68, 0x78, 0x68, 0x60, 0xf0, 0x00, 0x00, 0x3c, 0x66, 0xc0, 0xc0, 0xce, 0x66, 0x3e, 0x00, 0x00, 0xcc, 0xcc, 0xcc, 0xfc, 0xcc, 0xcc, 0xcc, 0x00, 0x00, 0x78, 0x30, 0x30, 0x30, 0x30, 0x30, 0x78, 0x00, 0x00, 0x1e, 0x0c, 0x0c, 0x0c, 0xcc, 0xcc, 0x78, 0x00, 0x00, 0xe6, 0x66, 0x6c, 0x78, 0x6c, 0x66, 0xe6, 0x00, 0x00, 0xf0, 0x60, 0x60, 0x60, 0x62, 0x66, 0xfe, 0x00, 0x00, 0xc6, 0xee, 0xfe, 0xfe, 0xd6, 0xc6, 0xc6, 0x00, 0x00, 0xc6, 0xe6, 0xf6, 0xde, 0xce, 0xc6, 0xc6, 0x00, 0x00, 0x38, 0x6c, 0xc6, 0xc6, 0xc6, 0x6c, 0x38, 0x00, 0x00, 0xfc, 0x66, 0x66, 0x7c, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x78, 0xcc, 0xcc, 0xcc, 0xdc, 0x78, 0x1c, 0x00, 0x00, 0xfc, 0x66, 0x66, 0x7c, 0x6c, 0x66, 0xe6, 0x00, 0x00, 0x78, 0xcc, 0xe0, 0x70, 0x1c, 0xcc, 0x78, 0x00, 0x00, 0xfc, 0xb4, 0x30, 0x30, 0x30, 0x30, 0x78, 0x00, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xfc, 0x00, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x78, 0x30, 0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xd6, 0xfe, 0xee, 0xc6, 0x00, 0x00, 0xc6, 0xc6, 0x6c, 0x38, 0x38, 0x6c, 0xc6, 0x00, 0x00, 0xcc, 0xcc, 0xcc, 0x78, 0x30, 0x30, 0x78, 0x00, 0x00, 0xfe, 0xc6, 0x8c, 0x18, 0x32, 0x66, 0xfe, 0x00, 0x00, 0x78, 0x60, 0x60, 0x60, 0x60, 0x60, 0x78, 0x00, 0x00, 0xc0, 0x60, 0x30, 0x18, 0x0c, 0x06, 0x02, 0x00, 0x00, 0x78, 0x18, 0x18, 0x18, 0x18, 0x18, 0x78, 0x00, 0x00, 0x10, 0x38, 0x6c, 0xc6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x30, 0x30, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0x76, 0x00, 0x00, 0xe0, 0x60, 0x60, 0x7c, 0x66, 0x66, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x78, 0xcc, 0xc0, 0xcc, 0x78, 0x00, 0x00, 0x1c, 0x0c, 0x0c, 0x7c, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00, 0x78, 0xcc, 0xfc, 0xc0, 0x78, 0x00, 0x00, 0x38, 0x6c, 0x60, 0xf0, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x76, 0xcc, 0xcc, 0x7c, 0x0c, 0xf8, 0x00, 0xe0, 0x60, 0x6c, 0x76, 0x66, 0x66, 0xe6, 0x00, 0x00, 0x30, 0x00, 0x70, 0x30, 0x30, 0x30, 0x78, 0x00, 0x00, 0x0c, 0x00, 0x0c, 0x0c, 0x0c, 0xcc, 0xcc, 0x78, 0x00, 0xe0, 0x60, 0x66, 0x6c, 0x78, 0x6c, 0xe6, 0x00, 0x00, 0x70, 0x30, 0x30, 0x30, 0x30, 0x30, 0x78, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xfe, 0xfe, 0xd6, 0xc6, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xcc, 0xcc, 0xcc, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x78, 0xcc, 0xcc, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x66, 0x66, 0x7c, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x76, 0xcc, 0xcc, 0x7c, 0x0c, 0x1e, 0x00, 0x00, 0x00, 0xdc, 0x76, 0x66, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc0, 0x78, 0x0c, 0xf8, 0x00, 0x00, 0x10, 0x30, 0x7c, 0x30, 0x30, 0x34, 0x18, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xcc, 0xcc, 0x78, 0x30, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xd6, 0xfe, 0xfe, 0x6c, 0x00, 0x00, 0x00, 0x00, 0xc6, 0x6c, 0x38, 0x6c, 0xc6, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xcc, 0xcc, 0x7c, 0x0c, 0xf8, 0x00, 0x00, 0x00, 0xfc, 0x98, 0x30, 0x64, 0xfc, 0x00, 0x00, 0x1c, 0x30, 0x30, 0xe0, 0x30, 0x30, 0x1c, 0x00, 0x00, 0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 0x18, 0x00, 0x00, 0xe0, 0x30, 0x30, 0x1c, 0x30, 0x30, 0xe0, 0x00, 0x00, 0x76, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0x00, 0x00, 0x78, 0xcc, 0xc0, 0xcc, 0x78, 0x18, 0x0c, 0x78, 0x00, 0x00, 0xcc, 0x00, 0xcc, 0xcc, 0xcc, 0x7e, 0x00, 0x00, 0x1c, 0x00, 0x78, 0xcc, 0xfc, 0xc0, 0x78, 0x00, 0x00, 0x7e, 0xc3, 0x3c, 0x06, 0x3e, 0x66, 0x3f, 0x00, 0x00, 0xcc, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0x7e, 0x00, 0x00, 0xe0, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0x7e, 0x00, 0x00, 0x30, 0x30, 0x78, 0x0c, 0x7c, 0xcc, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x78, 0xc0, 0xc0, 0x78, 0x0c, 0x38, 0x00, 0x7e, 0xc3, 0x3c, 0x66, 0x7e, 0x60, 0x3c, 0x00, 0x00, 0xcc, 0x00, 0x78, 0xcc, 0xfc, 0xc0, 0x78, 0x00, 0x00, 0xe0, 0x00, 0x78, 0xcc, 0xfc, 0xc0, 0x78, 0x00, 0x00, 0xcc, 0x00, 0x70, 0x30, 0x30, 0x30, 0x78, 0x00, 0x00, 0x7c, 0xc6, 0x38, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0xe0, 0x00, 0x70, 0x30, 0x30, 0x30, 0x78, 0x00, 0x00, 0xc6, 0x38, 0x6c, 0xc6, 0xfe, 0xc6, 0xc6, 0x00, 0x00, 0x30, 0x30, 0x00, 0x78, 0xcc, 0xfc, 0xcc, 0x00, 0x00, 0x1c, 0x00, 0xfc, 0x60, 0x78, 0x60, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x0c, 0x7f, 0xcc, 0x7f, 0x00, 0x00, 0x3e, 0x6c, 0xcc, 0xfe, 0xcc, 0xcc, 0xce, 0x00, 0x00, 0x78, 0xcc, 0x00, 0x78, 0xcc, 0xcc, 0x78, 0x00, 0x00, 0x00, 0xcc, 0x00, 0x78, 0xcc, 0xcc, 0x78, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x78, 0xcc, 0xcc, 0x78, 0x00, 0x00, 0x78, 0xcc, 0x00, 0xcc, 0xcc, 0xcc, 0x7e, 0x00, 0x00, 0x00, 0xe0, 0x00, 0xcc, 0xcc, 0xcc, 0x7e, 0x00, 0x00, 0x00, 0xcc, 0x00, 0xcc, 0xcc, 0x7c, 0x0c, 0xf8, 0x00, 0xc3, 0x18, 0x3c, 0x66, 0x66, 0x3c, 0x18, 0x00, 0x00, 0xcc, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0x78, 0x00, 0x00, 0x18, 0x18, 0x7e, 0xc0, 0xc0, 0x7e, 0x18, 0x18, 0x00, 0x38, 0x6c, 0x64, 0xf0, 0x60, 0xe6, 0xfc, 0x00, 0x00, 0xcc, 0xcc, 0x78, 0xfc, 0x30, 0xfc, 0x30, 0x30, 0x00, 0xf8, 0xcc, 0xcc, 0xfa, 0xc6, 0xcf, 0xc6, 0xc7, 0x00, 0x0e, 0x1b, 0x18, 0x3c, 0x18, 0x18, 0xd8, 0x70, 0x00, 0x1c, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0x7e, 0x00, 0x00, 0x38, 0x00, 0x70, 0x30, 0x30, 0x30, 0x78, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x78, 0xcc, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x1c, 0x00, 0xcc, 0xcc, 0xcc, 0x7e, 0x00, 0x00, 0x00, 0xf8, 0x00, 0xf8, 0xcc, 0xcc, 0xcc, 0x00, 0x00, 0xfc, 0x00, 0xcc, 0xec, 0xfc, 0xdc, 0xcc, 0x00, 0x00, 0x3c, 0x6c, 0x6c, 0x3e, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x38, 0x6c, 0x6c, 0x38, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x30, 0x60, 0xc0, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0xc3, 0xc6, 0xcc, 0xde, 0x33, 0x66, 0xcc, 0x0f, 0x00, 0xc3, 0xc6, 0xcc, 0xdb, 0x37, 0x6f, 0xcf, 0x03, 0x00, 0x18, 0x18, 0x00, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x33, 0x66, 0xcc, 0x66, 0x33, 0x00, 0x00, 0x00, 0x00, 0xcc, 0x66, 0x33, 0x66, 0xcc, 0x00, 0x00, 0x00, 0x22, 0x88, 0x22, 0x88, 0x22, 0x88, 0x22, 0x88, 0x88, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0xaa, 0xdb, 0x77, 0xdb, 0xee, 0xdb, 0x77, 0xdb, 0xee, 0xee, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xf8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xf8, 0x18, 0xf8, 0x18, 0x18, 0x18, 0x18, 0x36, 0x36, 0x36, 0x36, 0xf6, 0x36, 0x36, 0x36, 0x36, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x36, 0x36, 0x36, 0x36, 0x00, 0x00, 0xf8, 0x18, 0xf8, 0x18, 0x18, 0x18, 0x18, 0x36, 0x36, 0xf6, 0x06, 0xf6, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x00, 0x00, 0xfe, 0x06, 0xf6, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0xf6, 0x06, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x36, 0x36, 0x36, 0x36, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0xf8, 0x18, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1f, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0xff, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1f, 0x18, 0x1f, 0x18, 0x18, 0x18, 0x18, 0x36, 0x36, 0x36, 0x36, 0x37, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x37, 0x30, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x30, 0x37, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0xf7, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0xf7, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x37, 0x30, 0x37, 0x36, 0x36, 0x36, 0x36, 0x00, 0x00, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x36, 0x36, 0xf7, 0x00, 0xf7, 0x36, 0x36, 0x36, 0x36, 0x18, 0x18, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x36, 0x36, 0x36, 0x36, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0xff, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x1f, 0x18, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x18, 0x1f, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0xff, 0x36, 0x36, 0x36, 0x36, 0x18, 0x18, 0xff, 0x18, 0xff, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x18, 0x18, 0x18, 0x18, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xdc, 0xc8, 0xdc, 0x76, 0x00, 0x00, 0x78, 0xcc, 0xcc, 0xd8, 0xc6, 0xc6, 0xcc, 0x00, 0x00, 0xfc, 0xcc, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0xfe, 0x6c, 0x6c, 0x6c, 0x6c, 0x6c, 0x00, 0x00, 0xfc, 0xcc, 0x60, 0x30, 0x60, 0xcc, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x7e, 0xd8, 0xd8, 0xd8, 0x70, 0x00, 0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x7c, 0x60, 0xc0, 0x00, 0x00, 0x76, 0xdc, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0xfc, 0x30, 0x78, 0xcc, 0xcc, 0x78, 0x30, 0xfc, 0x00, 0x38, 0x6c, 0xc6, 0xfe, 0xc6, 0x6c, 0x38, 0x00, 0x00, 0x38, 0x6c, 0xc6, 0xc6, 0x6c, 0x6c, 0xee, 0x00, 0x00, 0x1c, 0x30, 0x18, 0x7c, 0xcc, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00, 0x7e, 0xdb, 0xdb, 0x7e, 0x00, 0x00, 0x00, 0x06, 0x0c, 0x7e, 0xdb, 0xdb, 0x7e, 0x60, 0xc0, 0x00, 0x38, 0x60, 0xc0, 0xf8, 0xc0, 0x60, 0x38, 0x00, 0x00, 0x78, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x30, 0x30, 0xfc, 0x30, 0x30, 0x00, 0xfc, 0x00, 0x00, 0x60, 0x30, 0x18, 0x30, 0x60, 0x00, 0xfc, 0x00, 0x00, 0x18, 0x30, 0x60, 0x30, 0x18, 0x00, 0xfc, 0x00, 0x00, 0x0e, 0x1b, 0x1b, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0xd8, 0xd8, 0x70, 0x00, 0x30, 0x30, 0x00, 0xfc, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x76, 0xdc, 0x00, 0x76, 0xdc, 0x00, 0x00, 0x00, 0x38, 0x6c, 0x6c, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0c, 0x0c, 0x0c, 0xec, 0x6c, 0x3c, 0x1c, 0x00, 0x78, 0x6c, 0x6c, 0x6c, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x18, 0x30, 0x60, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x3c, 0x3c, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; __AA_CONST struct aa_font aa_font9 = {font9data, 9, "Standard vga 8x9 font", "vga9"}; aalib-1.4.0/src/font8.c0000644000766200001440000003232107272031253010244 #include "config.h" #include "aalib.h" /* binary image of font8x8 follows */ __AA_CONST unsigned char font8data[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x81, 0xa5, 0x81, 0xbd, 0x99, 0x81, 0x7e, 0x7e, 0xff, 0xdb, 0xff, 0xc3, 0xe7, 0xff, 0x7e, 0x6c, 0xfe, 0xfe, 0xfe, 0x7c, 0x38, 0x10, 0x00, 0x10, 0x38, 0x7c, 0xfe, 0x7c, 0x38, 0x10, 0x00, 0x38, 0x7c, 0x38, 0xfe, 0xfe, 0x92, 0x10, 0x7c, 0x00, 0x10, 0x38, 0x7c, 0xfe, 0x7c, 0x38, 0x7c, 0x00, 0x00, 0x18, 0x3c, 0x3c, 0x18, 0x00, 0x00, 0xff, 0xff, 0xe7, 0xc3, 0xc3, 0xe7, 0xff, 0xff, 0x00, 0x3c, 0x66, 0x42, 0x42, 0x66, 0x3c, 0x00, 0xff, 0xc3, 0x99, 0xbd, 0xbd, 0x99, 0xc3, 0xff, 0x0f, 0x07, 0x0f, 0x7d, 0xcc, 0xcc, 0xcc, 0x78, 0x3c, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x7e, 0x18, 0x3f, 0x33, 0x3f, 0x30, 0x30, 0x70, 0xf0, 0xe0, 0x7f, 0x63, 0x7f, 0x63, 0x63, 0x67, 0xe6, 0xc0, 0x99, 0x5a, 0x3c, 0xe7, 0xe7, 0x3c, 0x5a, 0x99, 0x80, 0xe0, 0xf8, 0xfe, 0xf8, 0xe0, 0x80, 0x00, 0x02, 0x0e, 0x3e, 0xfe, 0x3e, 0x0e, 0x02, 0x00, 0x18, 0x3c, 0x7e, 0x18, 0x18, 0x7e, 0x3c, 0x18, 0x66, 0x66, 0x66, 0x66, 0x66, 0x00, 0x66, 0x00, 0x7f, 0xdb, 0xdb, 0x7b, 0x1b, 0x1b, 0x1b, 0x00, 0x3e, 0x63, 0x38, 0x6c, 0x6c, 0x38, 0x86, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x7e, 0x7e, 0x00, 0x18, 0x3c, 0x7e, 0x18, 0x7e, 0x3c, 0x18, 0xff, 0x18, 0x3c, 0x7e, 0x18, 0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 0x18, 0x18, 0x7e, 0x3c, 0x18, 0x00, 0x00, 0x18, 0x0c, 0xfe, 0x0c, 0x18, 0x00, 0x00, 0x00, 0x30, 0x60, 0xfe, 0x60, 0x30, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xc0, 0xfe, 0x00, 0x00, 0x00, 0x24, 0x66, 0xff, 0x66, 0x24, 0x00, 0x00, 0x00, 0x18, 0x3c, 0x7e, 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0x7e, 0x3c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x3c, 0x3c, 0x18, 0x18, 0x00, 0x18, 0x00, 0x6c, 0x6c, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6c, 0x6c, 0xfe, 0x6c, 0xfe, 0x6c, 0x6c, 0x00, 0x18, 0x7e, 0xc0, 0x7c, 0x06, 0xfc, 0x18, 0x00, 0x00, 0xc6, 0xcc, 0x18, 0x30, 0x66, 0xc6, 0x00, 0x38, 0x6c, 0x38, 0x76, 0xdc, 0xcc, 0x76, 0x00, 0x30, 0x30, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x30, 0x60, 0x60, 0x60, 0x30, 0x18, 0x00, 0x60, 0x30, 0x18, 0x18, 0x18, 0x30, 0x60, 0x00, 0x00, 0x66, 0x3c, 0xff, 0x3c, 0x66, 0x00, 0x00, 0x00, 0x18, 0x18, 0x7e, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x30, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x06, 0x0c, 0x18, 0x30, 0x60, 0xc0, 0x80, 0x00, 0x7c, 0xce, 0xde, 0xf6, 0xe6, 0xc6, 0x7c, 0x00, 0x30, 0x70, 0x30, 0x30, 0x30, 0x30, 0xfc, 0x00, 0x78, 0xcc, 0x0c, 0x38, 0x60, 0xcc, 0xfc, 0x00, 0x78, 0xcc, 0x0c, 0x38, 0x0c, 0xcc, 0x78, 0x00, 0x1c, 0x3c, 0x6c, 0xcc, 0xfe, 0x0c, 0x1e, 0x00, 0xfc, 0xc0, 0xf8, 0x0c, 0x0c, 0xcc, 0x78, 0x00, 0x38, 0x60, 0xc0, 0xf8, 0xcc, 0xcc, 0x78, 0x00, 0xfc, 0xcc, 0x0c, 0x18, 0x30, 0x30, 0x30, 0x00, 0x78, 0xcc, 0xcc, 0x78, 0xcc, 0xcc, 0x78, 0x00, 0x78, 0xcc, 0xcc, 0x7c, 0x0c, 0x18, 0x70, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x18, 0x18, 0x30, 0x18, 0x30, 0x60, 0xc0, 0x60, 0x30, 0x18, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x60, 0x30, 0x18, 0x0c, 0x18, 0x30, 0x60, 0x00, 0x3c, 0x66, 0x0c, 0x18, 0x18, 0x00, 0x18, 0x00, 0x7c, 0xc6, 0xde, 0xde, 0xdc, 0xc0, 0x7c, 0x00, 0x30, 0x78, 0xcc, 0xcc, 0xfc, 0xcc, 0xcc, 0x00, 0xfc, 0x66, 0x66, 0x7c, 0x66, 0x66, 0xfc, 0x00, 0x3c, 0x66, 0xc0, 0xc0, 0xc0, 0x66, 0x3c, 0x00, 0xf8, 0x6c, 0x66, 0x66, 0x66, 0x6c, 0xf8, 0x00, 0xfe, 0x62, 0x68, 0x78, 0x68, 0x62, 0xfe, 0x00, 0xfe, 0x62, 0x68, 0x78, 0x68, 0x60, 0xf0, 0x00, 0x3c, 0x66, 0xc0, 0xc0, 0xce, 0x66, 0x3a, 0x00, 0xcc, 0xcc, 0xcc, 0xfc, 0xcc, 0xcc, 0xcc, 0x00, 0x78, 0x30, 0x30, 0x30, 0x30, 0x30, 0x78, 0x00, 0x1e, 0x0c, 0x0c, 0x0c, 0xcc, 0xcc, 0x78, 0x00, 0xe6, 0x66, 0x6c, 0x78, 0x6c, 0x66, 0xe6, 0x00, 0xf0, 0x60, 0x60, 0x60, 0x62, 0x66, 0xfe, 0x00, 0xc6, 0xee, 0xfe, 0xfe, 0xd6, 0xc6, 0xc6, 0x00, 0xc6, 0xe6, 0xf6, 0xde, 0xce, 0xc6, 0xc6, 0x00, 0x38, 0x6c, 0xc6, 0xc6, 0xc6, 0x6c, 0x38, 0x00, 0xfc, 0x66, 0x66, 0x7c, 0x60, 0x60, 0xf0, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xd6, 0x7c, 0x0e, 0x00, 0xfc, 0x66, 0x66, 0x7c, 0x6c, 0x66, 0xe6, 0x00, 0x7c, 0xc6, 0xe0, 0x78, 0x0e, 0xc6, 0x7c, 0x00, 0xfc, 0xb4, 0x30, 0x30, 0x30, 0x30, 0x78, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xfc, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x78, 0x30, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xd6, 0xfe, 0x6c, 0x00, 0xc6, 0xc6, 0x6c, 0x38, 0x6c, 0xc6, 0xc6, 0x00, 0xcc, 0xcc, 0xcc, 0x78, 0x30, 0x30, 0x78, 0x00, 0xfe, 0xc6, 0x8c, 0x18, 0x32, 0x66, 0xfe, 0x00, 0x78, 0x60, 0x60, 0x60, 0x60, 0x60, 0x78, 0x00, 0xc0, 0x60, 0x30, 0x18, 0x0c, 0x06, 0x02, 0x00, 0x78, 0x18, 0x18, 0x18, 0x18, 0x18, 0x78, 0x00, 0x10, 0x38, 0x6c, 0xc6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x30, 0x30, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0x76, 0x00, 0xe0, 0x60, 0x60, 0x7c, 0x66, 0x66, 0xdc, 0x00, 0x00, 0x00, 0x78, 0xcc, 0xc0, 0xcc, 0x78, 0x00, 0x1c, 0x0c, 0x0c, 0x7c, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x78, 0xcc, 0xfc, 0xc0, 0x78, 0x00, 0x38, 0x6c, 0x64, 0xf0, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x76, 0xcc, 0xcc, 0x7c, 0x0c, 0xf8, 0xe0, 0x60, 0x6c, 0x76, 0x66, 0x66, 0xe6, 0x00, 0x30, 0x00, 0x70, 0x30, 0x30, 0x30, 0x78, 0x00, 0x0c, 0x00, 0x1c, 0x0c, 0x0c, 0xcc, 0xcc, 0x78, 0xe0, 0x60, 0x66, 0x6c, 0x78, 0x6c, 0xe6, 0x00, 0x70, 0x30, 0x30, 0x30, 0x30, 0x30, 0x78, 0x00, 0x00, 0x00, 0xcc, 0xfe, 0xfe, 0xd6, 0xd6, 0x00, 0x00, 0x00, 0xb8, 0xcc, 0xcc, 0xcc, 0xcc, 0x00, 0x00, 0x00, 0x78, 0xcc, 0xcc, 0xcc, 0x78, 0x00, 0x00, 0x00, 0xdc, 0x66, 0x66, 0x7c, 0x60, 0xf0, 0x00, 0x00, 0x76, 0xcc, 0xcc, 0x7c, 0x0c, 0x1e, 0x00, 0x00, 0xdc, 0x76, 0x62, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x7c, 0xc0, 0x70, 0x1c, 0xf8, 0x00, 0x10, 0x30, 0xfc, 0x30, 0x30, 0x34, 0x18, 0x00, 0x00, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0xcc, 0xcc, 0xcc, 0x78, 0x30, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xd6, 0xfe, 0x6c, 0x00, 0x00, 0x00, 0xc6, 0x6c, 0x38, 0x6c, 0xc6, 0x00, 0x00, 0x00, 0xcc, 0xcc, 0xcc, 0x7c, 0x0c, 0xf8, 0x00, 0x00, 0xfc, 0x98, 0x30, 0x64, 0xfc, 0x00, 0x1c, 0x30, 0x30, 0xe0, 0x30, 0x30, 0x1c, 0x00, 0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 0x18, 0x00, 0xe0, 0x30, 0x30, 0x1c, 0x30, 0x30, 0xe0, 0x00, 0x76, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0x00, 0x7c, 0xc6, 0xc0, 0xc6, 0x7c, 0x0c, 0x06, 0x7c, 0x00, 0xcc, 0x00, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x1c, 0x00, 0x78, 0xcc, 0xfc, 0xc0, 0x78, 0x00, 0x7e, 0x81, 0x3c, 0x06, 0x3e, 0x66, 0x3b, 0x00, 0xcc, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0x76, 0x00, 0xe0, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0x76, 0x00, 0x30, 0x30, 0x78, 0x0c, 0x7c, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc0, 0x78, 0x0c, 0x38, 0x7e, 0x81, 0x3c, 0x66, 0x7e, 0x60, 0x3c, 0x00, 0xcc, 0x00, 0x78, 0xcc, 0xfc, 0xc0, 0x78, 0x00, 0xe0, 0x00, 0x78, 0xcc, 0xfc, 0xc0, 0x78, 0x00, 0xcc, 0x00, 0x70, 0x30, 0x30, 0x30, 0x78, 0x00, 0x7c, 0x82, 0x38, 0x18, 0x18, 0x18, 0x3c, 0x00, 0xe0, 0x00, 0x70, 0x30, 0x30, 0x30, 0x78, 0x00, 0xc6, 0x10, 0x7c, 0xc6, 0xfe, 0xc6, 0xc6, 0x00, 0x30, 0x30, 0x00, 0x78, 0xcc, 0xfc, 0xcc, 0x00, 0x1c, 0x00, 0xfc, 0x60, 0x78, 0x60, 0xfc, 0x00, 0x00, 0x00, 0x7f, 0x0c, 0x7f, 0xcc, 0x7f, 0x00, 0x3e, 0x6c, 0xcc, 0xfe, 0xcc, 0xcc, 0xce, 0x00, 0x78, 0x84, 0x00, 0x78, 0xcc, 0xcc, 0x78, 0x00, 0x00, 0xcc, 0x00, 0x78, 0xcc, 0xcc, 0x78, 0x00, 0x00, 0xe0, 0x00, 0x78, 0xcc, 0xcc, 0x78, 0x00, 0x78, 0x84, 0x00, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0xe0, 0x00, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0xcc, 0x00, 0xcc, 0xcc, 0x7c, 0x0c, 0xf8, 0xc3, 0x18, 0x3c, 0x66, 0x66, 0x3c, 0x18, 0x00, 0xcc, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0x78, 0x00, 0x18, 0x18, 0x7e, 0xc0, 0xc0, 0x7e, 0x18, 0x18, 0x38, 0x6c, 0x64, 0xf0, 0x60, 0xe6, 0xfc, 0x00, 0xcc, 0xcc, 0x78, 0x30, 0xfc, 0x30, 0xfc, 0x30, 0xf8, 0xcc, 0xcc, 0xfa, 0xc6, 0xcf, 0xc6, 0xc3, 0x0e, 0x1b, 0x18, 0x3c, 0x18, 0x18, 0xd8, 0x70, 0x1c, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0x76, 0x00, 0x38, 0x00, 0x70, 0x30, 0x30, 0x30, 0x78, 0x00, 0x00, 0x1c, 0x00, 0x78, 0xcc, 0xcc, 0x78, 0x00, 0x00, 0x1c, 0x00, 0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0xf8, 0x00, 0xb8, 0xcc, 0xcc, 0xcc, 0x00, 0xfc, 0x00, 0xcc, 0xec, 0xfc, 0xdc, 0xcc, 0x00, 0x3c, 0x6c, 0x6c, 0x3e, 0x00, 0x7e, 0x00, 0x00, 0x38, 0x6c, 0x6c, 0x38, 0x00, 0x7c, 0x00, 0x00, 0x18, 0x00, 0x18, 0x18, 0x30, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x0c, 0x0c, 0x00, 0x00, 0xc6, 0xcc, 0xd8, 0x36, 0x6b, 0xc2, 0x84, 0x0f, 0xc3, 0xc6, 0xcc, 0xdb, 0x37, 0x6d, 0xcf, 0x03, 0x18, 0x00, 0x18, 0x18, 0x3c, 0x3c, 0x18, 0x00, 0x00, 0x33, 0x66, 0xcc, 0x66, 0x33, 0x00, 0x00, 0x00, 0xcc, 0x66, 0x33, 0x66, 0xcc, 0x00, 0x00, 0x22, 0x88, 0x22, 0x88, 0x22, 0x88, 0x22, 0x88, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0xdb, 0xf6, 0xdb, 0x6f, 0xdb, 0x7e, 0xd7, 0xed, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xf8, 0x18, 0x18, 0x18, 0x18, 0x18, 0xf8, 0x18, 0xf8, 0x18, 0x18, 0x18, 0x36, 0x36, 0x36, 0x36, 0xf6, 0x36, 0x36, 0x36, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x36, 0x36, 0x36, 0x00, 0x00, 0xf8, 0x18, 0xf8, 0x18, 0x18, 0x18, 0x36, 0x36, 0xf6, 0x06, 0xf6, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x00, 0x00, 0xfe, 0x06, 0xf6, 0x36, 0x36, 0x36, 0x36, 0x36, 0xf6, 0x06, 0xfe, 0x00, 0x00, 0x00, 0x36, 0x36, 0x36, 0x36, 0xfe, 0x00, 0x00, 0x00, 0x18, 0x18, 0xf8, 0x18, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1f, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1f, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0xff, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1f, 0x18, 0x1f, 0x18, 0x18, 0x18, 0x36, 0x36, 0x36, 0x36, 0x37, 0x36, 0x36, 0x36, 0x36, 0x36, 0x37, 0x30, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x30, 0x37, 0x36, 0x36, 0x36, 0x36, 0x36, 0xf7, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0xf7, 0x36, 0x36, 0x36, 0x36, 0x36, 0x37, 0x30, 0x37, 0x36, 0x36, 0x36, 0x00, 0x00, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0x36, 0x36, 0xf7, 0x00, 0xf7, 0x36, 0x36, 0x36, 0x18, 0x18, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0x36, 0x36, 0x36, 0x36, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0xff, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x3f, 0x00, 0x00, 0x00, 0x18, 0x18, 0x1f, 0x18, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x18, 0x1f, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0xff, 0x36, 0x36, 0x36, 0x18, 0x18, 0xff, 0x18, 0xff, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x18, 0x18, 0x18, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xdc, 0xc8, 0xdc, 0x76, 0x00, 0x00, 0x78, 0xcc, 0xf8, 0xcc, 0xf8, 0xc0, 0xc0, 0x00, 0xfc, 0xcc, 0xc0, 0xc0, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0xfe, 0x6c, 0x6c, 0x6c, 0x6c, 0x00, 0xfc, 0xcc, 0x60, 0x30, 0x60, 0xcc, 0xfc, 0x00, 0x00, 0x00, 0x7e, 0xd8, 0xd8, 0xd8, 0x70, 0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x7c, 0x60, 0xc0, 0x00, 0x76, 0xdc, 0x18, 0x18, 0x18, 0x18, 0x00, 0xfc, 0x30, 0x78, 0xcc, 0xcc, 0x78, 0x30, 0xfc, 0x38, 0x6c, 0xc6, 0xfe, 0xc6, 0x6c, 0x38, 0x00, 0x38, 0x6c, 0xc6, 0xc6, 0x6c, 0x6c, 0xee, 0x00, 0x1c, 0x30, 0x18, 0x7c, 0xcc, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x7e, 0xdb, 0xdb, 0x7e, 0x00, 0x00, 0x06, 0x0c, 0x7e, 0xdb, 0xdb, 0x7e, 0x60, 0xc0, 0x38, 0x60, 0xc0, 0xf8, 0xc0, 0x60, 0x38, 0x00, 0x78, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x00, 0x00, 0x7e, 0x00, 0x7e, 0x00, 0x7e, 0x00, 0x00, 0x18, 0x18, 0x7e, 0x18, 0x18, 0x00, 0x7e, 0x00, 0x60, 0x30, 0x18, 0x30, 0x60, 0x00, 0xfc, 0x00, 0x18, 0x30, 0x60, 0x30, 0x18, 0x00, 0xfc, 0x00, 0x0e, 0x1b, 0x1b, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xd8, 0xd8, 0x70, 0x18, 0x18, 0x00, 0x7e, 0x00, 0x18, 0x18, 0x00, 0x00, 0x76, 0xdc, 0x00, 0x76, 0xdc, 0x00, 0x00, 0x38, 0x6c, 0x6c, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x0f, 0x0c, 0x0c, 0x0c, 0xec, 0x6c, 0x3c, 0x1c, 0x58, 0x6c, 0x6c, 0x6c, 0x6c, 0x00, 0x00, 0x00, 0x70, 0x98, 0x30, 0x60, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x3c, 0x3c, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; __AA_CONST struct aa_font aa_font8 = {font8data, 8, "Standard vga 8x8 font", "vga8"}; aalib-1.4.0/src/fontline.c0000644000766200001440000003200507272031253011023 #include "config.h" #include "aalib.h" /* binary image of font8x16 follows */ __AA_CONST unsigned char fontlinedata[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x81, 0xa5, 0x81, 0xbd, 0x99, 0x81, 0x7e, 0x3f, 0x21, 0x3f, 0x20, 0x20, 0x60, 0xe0, 0xc0, 0x3f, 0x21, 0x3f, 0x21, 0x23, 0x67, 0xe6, 0xc0, 0x08, 0x5d, 0x22, 0x63, 0x22, 0x5d, 0x08, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 0x00, 0x00, 0x00, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0xf7, 0x00, 0xf7, 0x36, 0x36, 0x36, 0x36, 0x36, 0xf6, 0x06, 0xf6, 0x36, 0x36, 0x36, 0x00, 0x00, 0xff, 0x00, 0xf7, 0x36, 0x36, 0x36, 0x36, 0x36, 0x37, 0x30, 0x37, 0x36, 0x36, 0x36, 0x36, 0x36, 0xf7, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x06, 0xf6, 0x36, 0x36, 0x36, 0x00, 0x00, 0x3f, 0x30, 0x37, 0x36, 0x36, 0x36, 0x36, 0x36, 0x37, 0x30, 0x3f, 0x00, 0x00, 0x00, 0x36, 0x36, 0xf6, 0x06, 0xfe, 0x00, 0x00, 0x00, 0x40, 0x70, 0x7c, 0x7f, 0x7c, 0x70, 0x40, 0x00, 0x01, 0x07, 0x1f, 0x7f, 0x1f, 0x07, 0x01, 0x00, 0x08, 0x1c, 0x3e, 0x08, 0x08, 0x3e, 0x1c, 0x08, 0x24, 0x24, 0x24, 0x24, 0x24, 0x00, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x7e, 0x7e, 0x00, 0x08, 0x1c, 0x3e, 0x08, 0x3e, 0x1c, 0x08, 0xff, 0x08, 0x1c, 0x3e, 0x2a, 0x08, 0x08, 0x08, 0x00, 0x08, 0x08, 0x08, 0x2a, 0x3e, 0x1c, 0x08, 0x00, 0x00, 0x0c, 0x06, 0x7f, 0x06, 0x0c, 0x00, 0x00, 0x00, 0x18, 0x30, 0x7f, 0x30, 0x18, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, 0x7e, 0x00, 0x00, 0x00, 0x24, 0x66, 0xff, 0x66, 0x24, 0x00, 0x00, 0x00, 0x08, 0x1c, 0x3e, 0x7f, 0x7f, 0x00, 0x00, 0x00, 0x7f, 0x7f, 0x3e, 0x1c, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x1c, 0x1c, 0x08, 0x08, 0x00, 0x08, 0x00, 0x24, 0x24, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x24, 0x7e, 0x24, 0x7e, 0x24, 0x24, 0x00, 0x18, 0x3e, 0x40, 0x3c, 0x02, 0x7c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x24, 0x18, 0x2b, 0x44, 0x44, 0x3b, 0x00, 0x10, 0x10, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x10, 0x20, 0x20, 0x20, 0x10, 0x08, 0x00, 0x10, 0x08, 0x04, 0x04, 0x04, 0x08, 0x10, 0x00, 0x00, 0x66, 0x3c, 0xff, 0x3c, 0x66, 0x00, 0x00, 0x00, 0x08, 0x08, 0x3e, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x20, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x00, 0x18, 0x24, 0x42, 0x5a, 0x42, 0x24, 0x18, 0x00, 0x08, 0x18, 0x28, 0x08, 0x08, 0x08, 0x3e, 0x00, 0x3c, 0x42, 0x02, 0x0c, 0x30, 0x42, 0x7e, 0x00, 0x3c, 0x42, 0x02, 0x1c, 0x02, 0x42, 0x3c, 0x00, 0x04, 0x0c, 0x14, 0x24, 0x7f, 0x04, 0x0e, 0x00, 0x7e, 0x40, 0x7c, 0x02, 0x02, 0x42, 0x3c, 0x00, 0x1c, 0x20, 0x40, 0x7c, 0x42, 0x42, 0x3c, 0x00, 0x7e, 0x42, 0x04, 0x08, 0x10, 0x10, 0x10, 0x00, 0x3c, 0x42, 0x42, 0x3c, 0x42, 0x42, 0x3c, 0x00, 0x3c, 0x42, 0x42, 0x3e, 0x02, 0x04, 0x38, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x08, 0x10, 0x04, 0x08, 0x10, 0x20, 0x10, 0x08, 0x04, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x20, 0x10, 0x08, 0x04, 0x08, 0x10, 0x20, 0x00, 0x3c, 0x42, 0x02, 0x04, 0x08, 0x00, 0x08, 0x00, 0x3c, 0x42, 0x5e, 0x52, 0x5e, 0x40, 0x3c, 0x00, 0x18, 0x24, 0x42, 0x42, 0x7e, 0x42, 0x42, 0x00, 0x7c, 0x22, 0x22, 0x3c, 0x22, 0x22, 0x7c, 0x00, 0x1c, 0x22, 0x40, 0x40, 0x40, 0x22, 0x1c, 0x00, 0x78, 0x24, 0x22, 0x22, 0x22, 0x24, 0x78, 0x00, 0x7e, 0x22, 0x28, 0x38, 0x28, 0x22, 0x7e, 0x00, 0x7e, 0x22, 0x28, 0x38, 0x28, 0x20, 0x70, 0x00, 0x1c, 0x22, 0x40, 0x40, 0x4e, 0x22, 0x1e, 0x00, 0x42, 0x42, 0x42, 0x7e, 0x42, 0x42, 0x42, 0x00, 0x1c, 0x08, 0x08, 0x08, 0x08, 0x08, 0x1c, 0x00, 0x0e, 0x04, 0x04, 0x04, 0x44, 0x44, 0x38, 0x00, 0x62, 0x24, 0x28, 0x30, 0x28, 0x24, 0x62, 0x00, 0x70, 0x20, 0x20, 0x20, 0x20, 0x22, 0x7e, 0x00, 0x63, 0x55, 0x49, 0x41, 0x41, 0x41, 0x41, 0x00, 0x62, 0x52, 0x4a, 0x46, 0x42, 0x42, 0x42, 0x00, 0x3c, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3c, 0x00, 0x7c, 0x22, 0x22, 0x3c, 0x20, 0x20, 0x70, 0x00, 0x3c, 0x42, 0x42, 0x42, 0x42, 0x4a, 0x3c, 0x03, 0x7c, 0x22, 0x22, 0x3c, 0x28, 0x24, 0x72, 0x00, 0x3c, 0x42, 0x40, 0x3c, 0x02, 0x42, 0x3c, 0x00, 0x7f, 0x49, 0x08, 0x08, 0x08, 0x08, 0x1c, 0x00, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3c, 0x00, 0x41, 0x41, 0x41, 0x41, 0x22, 0x14, 0x08, 0x00, 0x41, 0x41, 0x41, 0x49, 0x49, 0x49, 0x36, 0x00, 0x41, 0x22, 0x14, 0x08, 0x14, 0x22, 0x41, 0x00, 0x41, 0x22, 0x14, 0x08, 0x08, 0x08, 0x1c, 0x00, 0x7f, 0x42, 0x04, 0x08, 0x10, 0x21, 0x7f, 0x00, 0x3c, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x00, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01, 0x00, 0x3c, 0x04, 0x04, 0x04, 0x04, 0x04, 0x3c, 0x00, 0x08, 0x14, 0x22, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x20, 0x10, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x02, 0x3e, 0x42, 0x3f, 0x00, 0x60, 0x20, 0x20, 0x3e, 0x21, 0x21, 0x3e, 0x00, 0x00, 0x00, 0x3c, 0x42, 0x40, 0x42, 0x3c, 0x00, 0x06, 0x02, 0x02, 0x3e, 0x42, 0x42, 0x3f, 0x00, 0x00, 0x00, 0x3c, 0x42, 0x7e, 0x40, 0x3c, 0x00, 0x0c, 0x12, 0x10, 0x38, 0x10, 0x10, 0x38, 0x00, 0x00, 0x00, 0x3d, 0x42, 0x42, 0x3e, 0x02, 0x7c, 0x60, 0x20, 0x2c, 0x32, 0x22, 0x22, 0x62, 0x00, 0x08, 0x00, 0x18, 0x08, 0x08, 0x08, 0x1c, 0x00, 0x02, 0x00, 0x06, 0x02, 0x02, 0x42, 0x42, 0x3c, 0x60, 0x20, 0x24, 0x28, 0x30, 0x28, 0x24, 0x00, 0x18, 0x08, 0x08, 0x08, 0x08, 0x08, 0x1c, 0x00, 0x00, 0x00, 0x76, 0x49, 0x49, 0x49, 0x49, 0x00, 0x00, 0x00, 0x5c, 0x62, 0x42, 0x42, 0x42, 0x00, 0x00, 0x00, 0x3c, 0x42, 0x42, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x6e, 0x31, 0x31, 0x2e, 0x20, 0x70, 0x00, 0x00, 0x3b, 0x46, 0x46, 0x3a, 0x02, 0x07, 0x00, 0x00, 0x6c, 0x32, 0x20, 0x20, 0x70, 0x00, 0x00, 0x00, 0x3e, 0x40, 0x3c, 0x02, 0x7c, 0x00, 0x20, 0x20, 0x3c, 0x20, 0x20, 0x22, 0x1c, 0x00, 0x00, 0x00, 0x42, 0x42, 0x42, 0x42, 0x3d, 0x00, 0x00, 0x00, 0x41, 0x41, 0x22, 0x14, 0x08, 0x00, 0x00, 0x00, 0x41, 0x49, 0x49, 0x49, 0x36, 0x00, 0x00, 0x00, 0x22, 0x14, 0x08, 0x14, 0x22, 0x00, 0x00, 0x00, 0x42, 0x42, 0x42, 0x3e, 0x02, 0x7c, 0x00, 0x00, 0x3e, 0x04, 0x08, 0x10, 0x3e, 0x00, 0x06, 0x08, 0x08, 0x30, 0x08, 0x08, 0x06, 0x00, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x30, 0x08, 0x08, 0x06, 0x08, 0x08, 0x30, 0x00, 0x32, 0x4c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x14, 0x22, 0x41, 0x41, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbd, 0x42, 0x42, 0xbd, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x10, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x10, 0x18, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x22, 0x10, 0x08, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x10, 0x0c, 0x10, 0x00, 0x00, 0x1e, 0x20, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 0x18, 0x22, 0x12, 0x22, 0x02, 0x02, 0x00, 0x00, 0x30, 0x40, 0x26, 0x49, 0x0f, 0x01, 0x42, 0x3c, 0x00, 0x02, 0x02, 0x1a, 0x22, 0x12, 0x20, 0x00, 0x06, 0x04, 0x02, 0x04, 0x30, 0xb8, 0x84, 0x78, 0x10, 0x18, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x81, 0xfe, 0x00, 0x10, 0x14, 0x00, 0x0c, 0x12, 0x11, 0x0e, 0x00, 0x00, 0x00, 0x28, 0x00, 0x01, 0x81, 0xfe, 0x00, 0x00, 0x10, 0x28, 0x00, 0x01, 0x81, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x43, 0x88, 0x80, 0x7c, 0x00, 0x00, 0x00, 0xfc, 0x43, 0x80, 0x80, 0x7c, 0x00, 0x10, 0x00, 0xfc, 0x43, 0x80, 0x80, 0x7c, 0x00, 0x00, 0x04, 0x02, 0x21, 0x3f, 0x00, 0x00, 0x00, 0x20, 0x04, 0x02, 0x21, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x22, 0x1c, 0x00, 0x00, 0x02, 0x00, 0x01, 0x01, 0x22, 0x1c, 0x00, 0x00, 0x00, 0x49, 0x49, 0x76, 0x80, 0x00, 0x08, 0x14, 0x00, 0x49, 0x49, 0x76, 0x80, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x91, 0x7e, 0x80, 0x00, 0x00, 0x08, 0x00, 0x0e, 0x91, 0x7e, 0x80, 0x00, 0x20, 0x20, 0x20, 0x2e, 0x31, 0xfe, 0x00, 0x00, 0x20, 0x24, 0x20, 0x2e, 0x31, 0xfe, 0x00, 0x00, 0x00, 0x0e, 0x10, 0x0f, 0x30, 0x40, 0x40, 0x3e, 0x20, 0x0e, 0x10, 0x0f, 0x30, 0x40, 0x40, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x04, 0x00, 0x06, 0x09, 0x85, 0xfe, 0x00, 0x00, 0x0a, 0x00, 0x06, 0x09, 0x0f, 0x81, 0x81, 0x7e, 0x01, 0x31, 0x21, 0x11, 0x81, 0xfe, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x21, 0x41, 0x41, 0x3e, 0x00, 0x00, 0x0c, 0x12, 0xe9, 0x86, 0x40, 0x20, 0x00, 0x00, 0x08, 0x00, 0x41, 0x81, 0x81, 0x7e, 0x00, 0x00, 0x0c, 0x12, 0x11, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x06, 0x09, 0x0f, 0x01, 0x42, 0x3c, 0x00, 0x00, 0x00, 0x06, 0x08, 0x86, 0x81, 0x7e, 0x00, 0x00, 0x06, 0x08, 0x86, 0x81, 0x7e, 0x24, 0x06, 0x1c, 0x30, 0x06, 0x1c, 0x30, 0x00, 0x00, 0x36, 0x36, 0x12, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x1c, 0x30, 0x06, 0x1c, 0x30, 0x06, 0x1c, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x08, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x1c, 0x30, 0x49, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x09, 0x11, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; __AA_CONST struct aa_font aa_fontline = {fontlinedata, 8, "line Font 8x8", "line"}; aalib-1.4.0/src/aacurses.c0000644000766200001440000000527107272031253011020 #include #include #include #include "config.h" #ifdef CURSES_DRIVER #ifdef USE_NCURSES #ifdef RENAMED_NCURSES #include #else #include #endif #else #include #endif #ifdef GPM_MOUSEDRIVER #include #endif #include "aalib.h" #include "aaint.h" __AA_CONST struct aa_driver curses_d; int __curses_is_up; int __resized_curses; static int uninitcurses; static int curses_init(__AA_CONST struct aa_hardware_params *p, __AA_CONST void *none, struct aa_hardware_params *dest, void **param) { int a; if (!__curses_is_up) { fflush(stdout); if ((initscr()) == NULL) return 0; __curses_is_up = 1; uninitcurses = 1; } dest->font=NULL; dest->supported=AA_NORMAL_MASK; #ifdef HAVE_TERMATTRS a = termattrs(); if (a & A_DIM) dest->supported |= AA_DIM_MASK; if (a & A_BOLD) dest->supported |= AA_BOLD_MASK; if (a & A_BOLD) dest->supported |= AA_BOLDFONT_MASK; if (a & A_REVERSE) dest->supported |= AA_REVERSE_MASK; #else dest->supported |= AA_REVERSE_MASK | AA_DIM_MASK | AA_BOLD_MASK | AA_BOLDFONT_MASK; #endif intrflush(stdscr, FALSE); aa_recommendlowkbd("curses"); return 1; } static void curses_uninit(aa_context * c) { wclear(stdscr); intrflush(stdscr, TRUE); #if 0 nocbreak(); echo(); nl(); #endif refresh(); if (uninitcurses) { uninitcurses = 0; __curses_is_up = 0; endwin(); } } static void curses_getsize(aa_context * c, int *width, int *height) { if (__resized_curses) curses_uninit(c), curses_init(&c->params, NULL,&c->driverparams, NULL), __resized_curses = 0; *width = stdscr->_maxx + 1; *height = stdscr->_maxy + 1; #ifdef GPM_MOUSEDRIVER gpm_mx = *width; gpm_my = *height; #endif } static void curses_setattr(aa_context * c, int attr) { switch (attr) { case AA_NORMAL: attrset(A_NORMAL); break; case AA_DIM: attrset(A_DIM); break; case AA_BOLD: attrset(A_BOLD); break; case AA_BOLDFONT: attrset(A_BOLD); break; case AA_REVERSE: attrset(A_REVERSE); break; case AA_SPECIAL: attrset(A_REVERSE); break; } } static void curses_print(aa_context * c, __AA_CONST char *text) { addstr(text); } static void curses_flush(aa_context * c) { refresh(); } static void curses_gotoxy(aa_context * c, int x, int y) { move(y, x); } static void curses_cursor(aa_context * c, int mode) { #ifdef HAVE_CURS_SET curs_set(mode); #endif } __AA_CONST struct aa_driver curses_d = { "curses", "Curses driver 1.0", curses_init, curses_uninit, curses_getsize, curses_setattr, curses_print, curses_gotoxy, /*curses_getchar, NULL, */ curses_flush, curses_cursor, }; #endif aalib-1.4.0/src/aacurkbd.c0000644000766200001440000000611407272034330010762 #include #include #include #include "config.h" #ifdef CURSES_KBDDRIVER #ifdef USE_NCURSES #include #else #include #endif #ifdef GPM_MOUSEDRIVER #include #endif #include "aalib.h" #include "aaint.h" static int iswaiting; static jmp_buf buf; extern int __curses_is_up; extern volatile int __resized_curses; #ifdef GPM_MOUSEDRIVER extern int __curses_usegpm; #endif static int uninitcurses; int __curses_x, __curses_y, __curses_buttons; int __curses_keyboard; #ifdef SIGWINCH static void handler(int i) { __resized_curses = 2; signal(SIGWINCH, handler); if (iswaiting) longjmp(buf, 1); } #endif static int curses_init(struct aa_context *context, int mode) { if (!__curses_is_up) { fflush(stdout); if ((initscr()) == NULL) return 0; __curses_is_up = 1; uninitcurses = 1; } __curses_keyboard = 1; cbreak(); noecho(); nonl(); keypad(stdscr, TRUE); #ifdef SIGWINCH signal(SIGWINCH, handler); #endif #ifdef GPM_MOUSEDRIVER aa_recommendlowmouse("gpm"); #endif aa_recommendlowkbd ("linux"); aa_recommendlowmouse("curses"); return 1; } static void curses_uninit(aa_context * c) { printf("uninitializing\n"); keypad(stdscr, FALSE); nodelay(stdscr, FALSE); #ifdef SIGWINCH signal(SIGWINCH, SIG_IGN); /*this line may cause problem... */ #endif nocbreak(); echo(); __curses_keyboard = 0; nl(); if (uninitcurses) { intrflush(stdscr, TRUE); wclear(stdscr); refresh(); uninitcurses = 0; __curses_is_up = 0; endwin(); } } static int curses_getchar(aa_context * c1, int wait) { int c; if (wait) { nodelay(stdscr, FALSE); setjmp(buf); iswaiting = 1; } else nodelay(stdscr, TRUE); if (__resized_curses == 2) { __resized_curses = 1; return (AA_RESIZE); } #ifdef GPM_MOUSEDRIVER if (__curses_usegpm) { c = Gpm_Wgetch(stdscr); } else #endif c = wgetch(stdscr); if (c == 27) return (AA_ESC); if (c > 0 && c < 127 && c != 127) return (c); switch (c) { case ERR: return (AA_NONE); case KEY_LEFT: return (AA_LEFT); case KEY_RIGHT: return (AA_RIGHT); case KEY_UP: return (AA_UP); case KEY_DOWN: return (AA_DOWN); #ifdef KEY_MOUDE case KEY_MOUSE: #ifdef GPM_MOUSEDRIVER if (!__curses_usegpm) #endif { MEVENT m; if (getmouse(&m) == OK) { __curses_x = m.x; __curses_y = m.y; } if (m.bstate & BUTTON1_PRESSED) __curses_buttons |= AA_BUTTON1; if (m.bstate & BUTTON1_RELEASED) __curses_buttons &= ~AA_BUTTON1; if (m.bstate & BUTTON2_PRESSED) __curses_buttons |= AA_BUTTON2; if (m.bstate & BUTTON2_RELEASED) __curses_buttons &= ~AA_BUTTON2; if (m.bstate & BUTTON3_PRESSED) __curses_buttons |= AA_BUTTON3; if (m.bstate & BUTTON3_RELEASED) __curses_buttons &= ~AA_BUTTON3; } return (AA_MOUSE); #endif case KEY_BACKSPACE: case 127: return (AA_BACKSPACE); } return (AA_UNKNOWN); } __AA_CONST struct aa_kbddriver kbd_curses_d = { "curses", "Curses keyboard driver 1.0", 0, curses_init, curses_uninit, curses_getchar, }; #endif aalib-1.4.0/src/aacurmou.c0000644000766200001440000000257207272031253011027 #include #include #include #include "config.h" #ifdef CURSES_MOUSEDRIVER #ifdef USE_NCURSES #ifdef RENAMED_NCURSES #include #else #include #endif #else #include #endif #include "aalib.h" #include "aaint.h" extern int __curses_is_up; extern int __curses_keyboard; extern int __curses_x, __curses_y, __curses_buttons; static int curses_init(struct aa_context *context, int mode) { if (!__curses_is_up || !__curses_keyboard) return 0; if (!mousemask( /*ALL_MOUSE_EVENTS */ BUTTON1_PRESSED | BUTTON1_RELEASED | BUTTON2_PRESSED | BUTTON2_RELEASED | BUTTON3_PRESSED | BUTTON3_RELEASED | REPORT_MOUSE_POSITION, NULL)) return 0; return 1; } static void curses_uninit(aa_context * c) { mousemask(0, NULL); } static void curses_mouse(aa_context * c, int *x, int *y, int *b) { #if 0 static MEVENT m; /*while(getmouse(&m)!=OK); */ while (m.bstate) getmouse(&m); *x = m.x; *y = m.y; #if 0 *b = 0; if (m.bstate & 4) *b |= AA_BUTTON1; if (m.bstate & 128) *b |= AA_BUTTON2; if (m.bstate & 8192) *b |= AA_BUTTON3; #endif *b = m.bstate; #endif *x = __curses_x; *y = __curses_y; *b = __curses_buttons; } __AA_CONST struct aa_mousedriver mouse_curses_d = { "curses", "Curses mouse driver 1.0", 0, curses_init, curses_uninit, curses_mouse, NULL, }; #endif aalib-1.4.0/src/aalib.c0000644000766200001440000001554507272031253010267 #include #include #include #include "aalib.h" #include "aaint.h" struct aa_hardware_params aa_defparams = { /*&aa_font16*/NULL, AA_NORMAL_MASK | AA_DIM_MASK | AA_BOLD_MASK }; void aa_uninitmouse(struct aa_context *c) { if (c->mousedriver != NULL) { c->mousedriver->uninit(c); if(c->mousedriverdata) free(c->mousedriverdata); c->mousedriverdata=NULL; c->mousedriver = NULL; c->mousemode=0; } } void aa_uninitkbd(struct aa_context *c) { if (c->kbddriver != NULL) { if (c->mousedriver != NULL) aa_uninitmouse(c); c->mousedriverdata=NULL; c->kbddriver->uninit(c); if(c->kbddriverdata) free(c->kbddriverdata); c->kbddriverdata=NULL; c->kbddriver = NULL; } } int aa_resize(aa_context * c) { int width, height; width = abs(c->params.width); height = abs(c->params.height); c->driver->getsize(c, &width, &height); if (width <= 0 || height <= 0) { printf("Invalid buffer sizes!\n"); exit(-1); } if (width != aa_scrwidth(c) || height != aa_imgheight(c)) { if (c->imagebuffer != NULL) free(c->imagebuffer); if (c->textbuffer != NULL) free(c->textbuffer); if (c->attrbuffer != NULL) free(c->attrbuffer); c->params.width = width; c->params.height = height; c->imgwidth = width * c->mulx; c->imgheight = height * c->mulx; if ((c->imagebuffer = calloc(1, c->imgwidth * c->imgheight)) == NULL) return 0; if ((c->textbuffer = calloc(1, aa_scrwidth(c) * aa_scrheight(c))) == NULL) { free(c->imagebuffer); return 0; } memset(c->textbuffer, ' ', c->params.width * c->params.height); if ((c->attrbuffer = calloc(1, c->params.width * c->params.height)) == NULL) { free(c->imagebuffer); free(c->textbuffer); return 0; } } if (!c->driverparams.mmwidth) c->params.mmwidth = 290; else c->params.mmwidth = c->driverparams.mmwidth; if (!c->driverparams.mmheight) c->params.mmheight = 215; else c->params.mmheight = c->driverparams.mmheight; if (!c->driverparams.minwidth) c->params.minwidth = c->params.width; else c->params.minwidth = c->driverparams.minwidth; if (!c->driverparams.minheight) c->params.minheight = c->params.height; else c->params.minheight = c->driverparams.minheight; if (!c->driverparams.maxwidth) c->params.maxwidth = c->params.width; else c->params.maxwidth = c->driverparams.maxwidth; if (!c->driverparams.maxheight) c->params.maxheight = c->params.height; else c->params.maxheight = c->driverparams.maxheight; return 1; } aa_context *aa_init(__AA_CONST struct aa_driver * driver, __AA_CONST struct aa_hardware_params * defparams, __AA_CONST void *driverdata) { struct aa_context *c; c = calloc(1, sizeof(*c)); c->driverdata=NULL; c->mousedriverdata=NULL; c->kbddriverdata=NULL; if (c == NULL) { return NULL; } if (!driver->init(defparams, driverdata,&c->driverparams,&c->driverdata)) { free(c); return NULL; } c->driver = driver; c->kbddriver = NULL; c->mousedriver = NULL; c->params.supported = c->driverparams.supported & defparams->supported; if (defparams->font) { c->params.font = defparams->font; } else c->params.font = c->driverparams.font; if (!c->params.font) c->params.font = defparams->font; if (!c->params.font) c->params.font = &aa_font16; if (!c->params.supported) c->params.supported = c->driverparams.supported; c->mulx = 2; c->muly = 2; c->cursorx = 0; c->cursory = 0; c->mousex = 0; c->mousey = 0; c->buttons = 0; c->table = NULL; c->filltable = NULL; c->parameters = NULL; if (defparams->width) c->params.width = defparams->width; else if (c->driverparams.width) c->params.width = c->driverparams.width; else if (defparams->recwidth) c->params.recwidth = defparams->recwidth; else if (c->driverparams.recwidth) c->params.recwidth = c->driverparams.recwidth; else c->params.width = 80; if (defparams->minwidth > c->params.width) c->params.width = defparams->minwidth; if (c->driverparams.minwidth > c->params.width) c->params.width = c->driverparams.minwidth; if (defparams->maxwidth && defparams->maxwidth > c->params.width) c->params.width = defparams->maxwidth; if (c->driverparams.maxwidth && c->driverparams.maxwidth > c->params.width) c->params.width = c->driverparams.maxwidth; if (defparams->height) c->params.height = defparams->height; else if (c->driverparams.height) c->params.height = c->driverparams.height; else if (defparams->recheight) c->params.recheight = defparams->recheight; else if (c->driverparams.recheight) c->params.recheight = c->driverparams.recheight; else c->params.height = 25; if (defparams->minheight > c->params.height) c->params.height = defparams->minheight; if (c->driverparams.minheight > c->params.height) c->params.height = c->driverparams.minheight; if (defparams->maxheight && defparams->maxheight > c->params.height) c->params.height = defparams->maxheight; if (c->driverparams.maxheight && c->driverparams.maxheight > c->params.height) c->params.height = c->driverparams.maxheight; c->params.width *= -1; c->params.height *= -1; c->params.dimmul = 5.3; c->params.boldmul = 2.7; if(c->driverparams.dimmul) c->params.dimmul=c->driverparams.dimmul; if(c->driverparams.boldmul) c->params.boldmul=c->driverparams.boldmul; if(defparams->dimmul) c->params.dimmul=defparams->dimmul; if(defparams->boldmul) c->params.boldmul=defparams->boldmul; c->imagebuffer = NULL; c->textbuffer = NULL; c->attrbuffer = NULL; c->resizehandler = NULL; if (!aa_resize(c)) { driver->uninit(c); if(c->driverdata!=NULL) free(c->driverdata); free(c); printf("out of memory\n"); return NULL; } if (!aa_validmode(aa_scrwidth(c), aa_scrheight(c), defparams)) { aa_close(c); return 0; } return (c); } static void aa_invalidate(aa_context * c) { if (c->table != NULL) free(c->table); if (c->filltable != NULL) free(c->filltable); if (c->parameters != NULL) free(c->parameters); c->table = NULL; c->filltable = NULL; c->parameters = NULL; } void aa_setfont(aa_context * c, __AA_CONST struct aa_font *font) { c->params.font = font; aa_invalidate(c); } void aa_setsupported(aa_context * c, int supported) { c->params.supported = c->driverparams.supported & supported; if (!c->params.supported) c->params.supported = c->driverparams.supported; aa_invalidate(c); } void aa_close(aa_context * c) { if (c->cursorstate < 0 && c->driver->cursormode) c->driver->cursormode(c, 1); if (c->kbddriver != NULL) aa_uninitkbd(c); c->driver->uninit(c); aa_invalidate(c); if (c->imagebuffer != NULL) free(c->imagebuffer); if (c->textbuffer != NULL) free(c->textbuffer); if (c->attrbuffer != NULL) free(c->attrbuffer); if(c->driverdata) free(c->driverdata); free(c); } aalib-1.4.0/src/aaflush.c0000644000766200001440000000357607272031253010643 #include #include "aalib.h" #include "aaint.h" #define HIDEMOUSE if(!hidden&&cursor&&c->mousedriver!=NULL&&(c->mousedriver->flags&AA_HIDECURSOR)) \ aa_hidemouse(c),hidden=1; static void aa_display(aa_context * c, int x1, int y1, int x2, int y2) { int x, y, pos, attr, p; unsigned char str[80]; int cursor=c->mousemode,hidden=0; if (x2 < 0 || y2 < 0 || x1 > aa_scrwidth(c) || y1 > aa_scrheight(c)) return; if (x2 >= aa_scrwidth(c)) x2 = aa_scrwidth(c); if (y2 >= aa_scrheight(c)) y2 = aa_scrheight(c); if (x1 < 0) x1 = 0; if (y1 < 0) y1 = 0; if (c->driver->print == NULL) return; pos = 0; for (y = y1; y < y2; y++) { pos = y * aa_scrwidth(c) + x1; c->driver->gotoxy(c, x1, y); for (x = x1; x < x2;) { p = 0; attr = c->attrbuffer[pos]; while (p < 79 && x < x2 && c->attrbuffer[pos] == attr) { str[p] = c->textbuffer[pos]; pos++; p++; x++; } str[p] = 0; HIDEMOUSE c->driver->setattr(c, attr); c->driver->print(c, (char *)str); } c->driver->gotoxy(c, c->cursorx, c->cursory); } if(hidden&&cursor) aa_showmouse(c); } void aa_hidemouse(aa_context *c) { if(c->mousemode) { c->mousemode=0; if(c->mousedriver!=NULL&&c->mousedriver->cursormode!=NULL) c->mousedriver->cursormode(c,0); } } void aa_showmouse(aa_context *c) { if(!c->mousemode) { c->mousemode=1; if(c->mousedriver!=NULL&&c->mousedriver->cursormode!=NULL) c->mousedriver->cursormode(c,1); } } void aa_flush(aa_context * c) { if (c->driver->print != NULL) aa_display(c, 0, 0, aa_imgwidth(c), aa_imgheight(c)); if (c->driver->flush != NULL) { int cursor=c->mousemode; if(cursor&&c->mousedriver!=NULL&&(c->mousedriver->flags&AA_HIDECURSOR)) aa_hidemouse(c); c->driver->flush(c); if(cursor&&c->mousedriver!=NULL&&(c->mousedriver->flags&AA_HIDECURSOR)) aa_showmouse(c); } } aalib-1.4.0/src/aarender.c0000644000766200001440000001270307272031253010771 #include #include #include #include "aalib.h" #include "aaint.h" #include "aamktabl.h" #include "config.h" aa_renderparams aa_defrenderparams = {0, 0, 1.0, AA_FLOYD_S, 0, 0}; #define VAL (13) /*maximum distance good for fill tables */ #define pos(i1,i2,i3,i4) (((int)(i1)<<12)+((int)(i2)<<8)+((int)(i3)<<4)+(int)(i4)) __AA_CONST char * __AA_CONST aa_dithernames[] = { "no dithering", "error-distribution", "floyd-steelberg dithering", NULL }; #define DO_CONTRAST(i,c) (i256-c)?255:(i-c)*255/(255-2*c)) aa_renderparams *aa_getrenderparams(void) { aa_renderparams *p = calloc(1, sizeof(*p)); if (p == NULL) return NULL; *p = aa_defrenderparams; return (p); } #define MYLONG_MAX 0xffffffffU /*this is enought for me. */ #define myrand() (state = ((state * 1103515245) + 12345) & MYLONG_MAX) void aa_renderpalette(aa_context * c, __AA_CONST aa_palette palette, __AA_CONST aa_renderparams * p, int x1, int y1, int x2, int y2) { static int state; int x, y; int val; int wi = c->imgwidth; int pos; int i; int pos1; int i1, i2, i3, i4, esum; int *errors[2]; int cur = 0; int mval; int gamma = p->gamma != 1.0; int randomval = p->randomval; int dither = p->dither; aa_palette table; if (x2 < 0 || y2 < 0 || x1 > aa_scrwidth(c) || y1 > aa_scrheight(c)) return; if (x2 >= aa_scrwidth(c)) x2 = aa_scrwidth(c); if (y2 >= aa_scrheight(c)) y2 = aa_scrheight(c); if (x1 < 0) x1 = 0; if (y1 < 0) y1 = 0; if (c->table == NULL) aa_mktable(c); if (dither == AA_FLOYD_S) { errors[0] = calloc(1, (x2 + 5) * sizeof(int)); if (errors[0] == NULL) dither = AA_ERRORDISTRIB; errors[0] += 3; errors[1] = calloc(1, (x2 + 5) * sizeof(int)); if (errors[1] == NULL) free(errors[0]), dither = AA_ERRORDISTRIB; errors[1] += 3; cur = 0; } for (i = 0; i < 256; i++) { y = palette[i] + p->bright; if (y > 255) y = 255; if (y < 0) y = 0; if (p->contrast) y = DO_CONTRAST(y, p->contrast); if (gamma) { y = pow(y / 255.0, p->gamma) * 255 + 0.5; } if (p->inversion) y = 255 - y; if (y > 255) y = 255; else if (y < 0) y = 0; table[i] = y; } gamma = 0; if (randomval) gamma = randomval / 2; mval = (c->parameters[c->filltable[255]].p[4]); for (y = y1; y < y2; y++) { pos = 2 * y * wi; pos1 = y * aa_scrwidth(c); esum = 0; for (x = x1; x < x2; x++) { i1 = table[((((int) c->imagebuffer[pos])))]; i2 = table[((((int) c->imagebuffer[pos + 1])))]; i3 = table[((((int) c->imagebuffer[pos + wi])))]; i4 = table[((((int) c->imagebuffer[pos + 1 + wi])))]; if (gamma) { i = myrand(); i1 += (i) % randomval - gamma; i2 += (i >> 8) % randomval - gamma; i3 += (i >> 16) % randomval - gamma; i4 += (i >> 24) % randomval - gamma; if ((i1 | i2 | i3 | i4) & (~255)) { if (i1 < 0) i1 = 0; else if (i1 > 255) i1 = 255; if (i2 < 0) i2 = 0; else if (i2 > 255) i2 = 255; if (i3 < 0) i3 = 0; else if (i3 > 255) i3 = 255; if (i4 < 0) i4 = 0; else if (i4 > 255) i4 = 255; } } switch (dither) { case AA_ERRORDISTRIB: esum = (esum + 2) >> 2; i1 += esum; i2 += esum; i3 += esum; i4 += esum; break; case AA_FLOYD_S: if (i1 | i2 | i3 | i4) { errors[cur][x - 2] += esum >> 4; errors[cur][x - 1] += (5 * esum) >> 4; errors[cur][x] = (3 * esum) >> 4; esum = (7 * esum) >> 4; esum += errors[cur ^ 1][x]; i1 += (esum + 1) >> 2; i2 += (esum) >> 2; i3 += (esum + 3) >> 2; i4 += (esum + 2) >> 2; } break; } if (dither) { esum = i1 + i2 + i3 + i4; val = (esum) >> 2; if ((abs(i1 - val) < VAL && abs(i2 - val) < VAL && abs(i3 - val) < VAL && abs(i4 - val) < VAL)) { if (esum >= 4 * 256) val = 255, esum = 4 * 256 - 1; if (val < 0) val = 0; val = c->filltable[val]; } else { if ((i1 | i2 | i3 | i4) & (~255)) { if (i1 < 0) i1 = 0; else if (i1 > 255) i1 = 255; if (i2 < 0) i2 = 0; else if (i2 > 255) i2 = 255; if (i3 < 0) i3 = 0; else if (i3 > 255) i3 = 255; if (i4 < 0) i4 = 0; else if (i4 > 255) i4 = 255; } esum = i1 + i2 + i3 + i4; i1 >>= 4; i2 >>= 4; i3 >>= 4; i4 >>= 4; val = c->table[pos(i2, i1, i4, i3)]; } esum = (esum - (c->parameters[val].p[4]) * 1020 / mval); } else { val = (i1 + i2 + i3 + i4) >> 2; if ((abs(i1 - val) < VAL && abs(i2 - val) < VAL && abs(i3 - val) < VAL && abs(i4 - val) < VAL)) { val = c->filltable[val]; } else { i1 >>= 4; i2 >>= 4; i3 >>= 4; i4 >>= 4; val = c->table[pos(i2, i1, i4, i3)]; } } c->attrbuffer[pos1] = val >> 8; c->textbuffer[pos1] = val & 0xff; pos += 2; pos1++; } if (dither == AA_FLOYD_S) { if (x2 - 1 > x1) errors[cur][x2 - 2] += (esum) >> 4; if (x2 > x1) errors[cur][x2 - 1] += (5 * esum) >> 4; cur ^= 1; errors[cur][x1] = 0; errors[cur ^ 1][-1] = 0; } } if (dither == AA_FLOYD_S) { free(errors[0] - 3); free(errors[1] - 3); } } void aa_render(aa_context * c, __AA_CONST aa_renderparams * p, int x1, int y1, int x2, int y2) { int i; static aa_palette table; if (table[255] != 255) for (i = 0; i < 256; i++) { table[i] = i; } aa_renderpalette(c, table, p, x1, y1, x2, y2); } aalib-1.4.0/src/aaout.c0000644000766200001440000000246307272031253010323 #include "aalib.h" #include "aaint.h" void aa_puts(aa_context * c, int x, int y, enum aa_attribute attr, __AA_CONST char *s) { char s1[10000]; int pos, pos1; int x1, y1; if (x < 0 || y < 0 || x >= aa_scrwidth(c) || y >= aa_scrheight(c)) return; x1 = x; y1 = y; for (pos = 0; s[pos] != 0 && pos < 10000; pos++) { s1[pos] = s[pos]; pos1 = x1 + y1 * aa_scrwidth(c); c->textbuffer[pos1] = s[pos]; c->attrbuffer[pos1] = attr; x1++; if (x1 >= aa_scrwidth(c)) { x1 = 0; y1++; if (y1 >= aa_scrheight(c)) break; } } } void aa_resizehandler(aa_context * c, void (*handler) (aa_context *)) { c->resizehandler = handler; } void aa_hidecursor(aa_context * c) { c->cursorstate--; if (c->cursorstate == -1 && c->driver->cursormode != NULL) c->driver->cursormode(c, 0); } void aa_showcursor(aa_context * c) { c->cursorstate++; if (c->cursorstate == 0 && c->driver->cursormode != NULL) c->driver->cursormode(c, 1); aa_gotoxy(c, c->cursorx, c->cursory); } void aa_gotoxy(aa_context * c, int x, int y) { if (c->cursorstate >= 0) { if (x < 0) x = 0; if (y < 0) y = 0; if (x >= aa_scrwidth(c)) x = aa_scrwidth(c) - 1; if (y >= aa_scrheight(c)) y = aa_scrheight(c) - 1; c->driver->gotoxy(c, x, y); c->cursorx = x; c->cursory = y; } } aalib-1.4.0/src/aain.c0000644000766200001440000000351507272031253010121 #include "aalib.h" #include "aaint.h" int aa_initkbd(struct aa_context *c, __AA_CONST struct aa_kbddriver *d, int mode) { if (d->init(c, mode)) { c->kbddriver = d; return 1; } return 0; } int aa_initmouse(struct aa_context *c, __AA_CONST struct aa_mousedriver *d, int mode) { if (d->init(c, mode)) { c->mousedriver = d; c->mousemode=1; return 1; } return 0; } void aa_getmouse(struct aa_context *c, int *x, int *y, int *z) { *x = 0; *y = 0; *z = 0; if (c->mousedriver) { c->mousedriver->getmouse(c, x, y, z); } } int aa_getevent(aa_context * c, int wait) { int x, y, b; int ch; if (c->mousedriver != NULL) { c->mousedriver->getmouse(c, &x, &y, &b); if (x != c->mousex || y != c->mousey || b != c->buttons) { c->mousex = x; c->mousey = y; c->buttons = b; return (AA_MOUSE); } } if (c->kbddriver == NULL) return (AA_UNKNOWN); if (wait) { while ((ch = c->kbddriver->getkey(c, 1)) == AA_NONE) { if (c->mousedriver != NULL) { c->mousedriver->getmouse(c, &x, &y, &b); if (x != c->mousex || y != c->mousey || b != c->buttons) { c->mousex = x; c->mousey = y; c->buttons = b; return (AA_MOUSE); } } } } else ch = c->kbddriver->getkey(c, 0); if (ch == AA_RESIZE && c->resizehandler != NULL) c->resizehandler(c); if (ch == AA_MOUSE) { if (c->mousedriver != NULL) { c->mousedriver->getmouse(c, &x, &y, &b); if (x != c->mousex || y != c->mousey || b != c->buttons) { c->mousex = x; c->mousey = y; c->buttons = b; return (AA_MOUSE); } else return (aa_getevent(c, wait)); } else return (AA_UNKNOWN); } return (ch); } int aa_getkey(aa_context * co, int wait) { int c; do { c = aa_getevent(co, wait); } while (c == AA_MOUSE || c == AA_RESIZE || c>=AA_RELEASE); return (c); } aalib-1.4.0/src/aaedit.c0000644000766200001440000000533607272031253010443 #include #include #include #include "aalib.h" #include "aaint.h" static void aa_editdisplay(struct aa_edit *e) { char s[1000]; int i; if (e->cursor > (int)strlen(e->data)) e->cursor = strlen(e->data); if (e->cursor < e->printpos) e->printpos = e->cursor; if (e->cursor >= e->printpos + e->size) e->printpos = e->cursor - e->size; if (e->printpos < 0) e->printpos = 0; strncpy(s, e->data + e->printpos, e->size); s[e->size] = 0; for (i = strlen(e->data) - e->printpos; i < e->size; i++) s[i] = ' '; aa_puts(e->c, e->x, e->y, e->clearafterpress ? AA_REVERSE : AA_SPECIAL, s); aa_gotoxy(e->c, e->x + e->cursor - e->printpos, e->y); } struct aa_edit *aa_createedit(aa_context * c, int x, int y, int size, char *s, int maxsize) { struct aa_edit *e; if (x < 0) x = 0; if (y < 0) y = 0; if (x >= aa_imgwidth(c) - 1) x = aa_imgwidth(c) - 2; if (y >= aa_imgheight(c) - 1) y = aa_imgwidth(c) - 2; if (x + size >= aa_imgwidth(c)) size = aa_imgwidth(c) - 1 - x; e = malloc(sizeof(struct aa_edit)); if (e == NULL) return NULL; e->maxsize = maxsize; e->data = s; e->cursor = strlen(s); e->clearafterpress = 1; e->x = x; e->y = y; e->size = size; e->c = c; e->printpos = 0; aa_editdisplay(e); return (e); } static void aa_insert(struct aa_edit *e, char ch) { int i, s = strlen(e->data); if (s == e->maxsize - 1) return; for (i = s; i >= e->cursor; i--) { e->data[i + 1] = e->data[i]; } e->data[s + 1] = 0; e->data[e->cursor] = ch; e->cursor++; } static void aa_delete(struct aa_edit *e) { int i, s = strlen(e->data); if (e->cursor == 0) return; e->cursor--; for (i = e->cursor; i <= s; i++) { e->data[i] = e->data[i + 1]; } } void aa_editkey(struct aa_edit *e, int c) { if (c < 127 && (isgraph(c) || c == ' ')) { if (e->clearafterpress) e->data[0] = 0, e->cursor = 0; e->clearafterpress = 0; aa_insert(e, c); aa_editdisplay(e); } else if (c == AA_BACKSPACE) { e->clearafterpress = 0; aa_delete(e); aa_editdisplay(e); } else if (c == AA_LEFT) { e->cursor--; e->clearafterpress = 0; if (e->cursor < 0) e->cursor = 0; aa_editdisplay(e); } else if (c == AA_RIGHT) { e->cursor++; e->clearafterpress = 0; if (e->cursor > (int)strlen(e->data)) e->cursor = strlen(e->data); aa_editdisplay(e); } aa_flush(e->c); } void aa_edit(aa_context * c, int x, int y, int size, char *s, int maxsize) { struct aa_edit *e; int ch; aa_showcursor(c); e = aa_createedit(c, x, y, size, s, maxsize); aa_flush(c); while ((ch = aa_getkey(c, 1)) != 13 && ch != '\n') { aa_editkey(e, ch); } aa_hidecursor(c); free(e); } aalib-1.4.0/src/aaregist.c0000644000766200001440000000212107272031253011000 #include #include "config.h" #include "aalib.h" #include "aaint.h" __AA_CONST struct aa_driver * __AA_CONST aa_drivers[] = { #ifdef DJGPP &dos_d, #else #ifdef X11_DRIVER &X11_d, #endif #ifdef LINUX_DRIVER &linux_d, #endif #ifdef SLANG_DRIVER &slang_d, #endif #ifdef CURSES_DRIVER &curses_d, #endif #ifdef OS2_DRIVER &os2vio_d, #endif #endif &stdout_d, &stderr_d, NULL }; aa_context *aa_autoinit(__AA_CONST struct aa_hardware_params *params) { aa_context *context = NULL; int i = 0; char *t; while ((t = aa_getfirst(&aa_displayrecommended)) != NULL) { if (context == NULL) { for (i = 0; aa_drivers[i] != NULL; i++) { if (!strcmp(t, aa_drivers[i]->name) || !strcmp(t, aa_drivers[i]->shortname)) { context = aa_init(aa_drivers[i], params, NULL); break; } } if (aa_drivers[i] == NULL) printf("Driver %s unknown", t); free(t); } } i = 0; while (context == NULL) { if (aa_drivers[i] == NULL) return NULL; context = aa_init(aa_drivers[i], params, NULL); i++; } return (context); } aalib-1.4.0/src/aakbdreg.c0000644000766200001440000000211307272031253010742 #include #include "config.h" #include "aalib.h" #include "aaint.h" __AA_CONST struct aa_kbddriver * __AA_CONST aa_kbddrivers[] = { #ifdef LINUX_KBDDRIVER &kbd_linux_d, #endif #ifdef DJGPP &kbd_dos_d, #else #ifdef X11_KBDDRIVER &kbd_X11_d, #endif #ifdef SLANG_KBDDRIVER &kbd_slang_d, #endif #ifdef CURSES_KBDDRIVER &kbd_curses_d, #endif #ifdef OS2_KBDDRIVER &kbd_os2_d, #endif #endif &kbd_stdin_d, NULL }; int aa_autoinitkbd(struct aa_context *context, int mode) { int i = 0; int ok = 0; char *t; while ((t = aa_getfirst(&aa_kbdrecommended)) != NULL) { if (!ok) { for (i = 0; aa_kbddrivers[i] != NULL; i++) { if (!strcmp(t, aa_kbddrivers[i]->name) || !strcmp(t, aa_kbddrivers[i]->shortname)) { ok = aa_initkbd(context, aa_kbddrivers[i], mode); break; } } if (aa_kbddrivers[i] == NULL) printf("Driver %s unknown", t); free(t); } } i = 0; if (!ok) while (aa_kbddrivers[i] != NULL) { if (aa_initkbd(context, aa_kbddrivers[i], mode)) { return 1; } i++; } return (ok); } aalib-1.4.0/src/aagpm.c0000644000766200001440000000274407272031253010301 #include #include #include #include "config.h" #ifdef GPM_MOUSEDRIVER #include #include "aalib.h" #include "aaint.h" static Gpm_Connect conn; int __curses_usegpm; static int mousex, mousey, mousebuttons; int __gpm_user_handler(Gpm_Event * event, void *data) { mousex = event->x; mousey = event->y; mousebuttons = event->buttons; if (event->type &= GPM_UP) mousebuttons = 0; return 0631; } static int gpm_init(struct aa_context *context, int mode) { /*conn.eventMask=~0; */ conn.eventMask = (mode & AA_MOUSEMOVEMASK ? GPM_MOVE | GPM_DRAG : 0) | GPM_DOWN | GPM_UP; conn.defaultMask = 0; conn.maxMod = ~0; conn.minMod = 0; if (Gpm_Open(&conn, 0) == -1) return 0; if (gpm_fd < 0) return 0; __curses_usegpm = 1; gpm_handler = __gpm_user_handler; gpm_visiblepointer = 1; gpm_hflag = 1; return 1; } static void gpm_uninit(aa_context * c) { __curses_usegpm = 0; Gpm_Close(); } static void gpm_mouse(aa_context * c, int *x, int *y, int *b) { *x = mousex; *y = mousey; *b = 0; if (mousebuttons & 4) *b |= AA_BUTTON1; if (mousebuttons & 2) *b |= AA_BUTTON2; if (mousebuttons & 1) *b |= AA_BUTTON3; } static void gpm_mousemode(aa_context *c,int m) { gpm_visiblepointer=m; } __AA_CONST struct aa_mousedriver mouse_gpm_d = { "gpm", "Gpm mouse driver 1.0", AA_MOUSEALLMASK | AA_HIDECURSOR, gpm_init, gpm_uninit, gpm_mouse, gpm_mousemode, }; #endif aalib-1.4.0/src/aamoureg.c0000644000766200001440000000206107272031253011004 #include #include "config.h" #include "aalib.h" #include "aaint.h" __AA_CONST struct aa_mousedriver * __AA_CONST aa_mousedrivers[] = { #ifdef DJGPP &mouse_dos_d, #else #ifdef X11_MOUSEDRIVER &mouse_X11_d, #endif #ifdef GPM_MOUSEDRIVER &mouse_gpm_d, #endif #ifdef CURSES_MOUSEDRIVER &mouse_curses_d, #endif #ifdef OS2_MOUSEDRIVER &mouse_os2_d, #endif #endif NULL }; int aa_autoinitmouse(struct aa_context *context, int mode) { int i = 0; int ok = 0; char *t; while ((t = aa_getfirst(&aa_mouserecommended)) != NULL) { if (!ok) { for (i = 0; aa_mousedrivers[i] != NULL; i++) { if (!strcmp(t, aa_mousedrivers[i]->name) || !strcmp(t, aa_mousedrivers[i]->shortname)) { ok = aa_initmouse(context, aa_mousedrivers[i], mode); break; } } if (aa_mousedrivers[i] == NULL) printf("Driver %s unknown", t); free(t); } } i = 0; if (!ok) while (aa_mousedrivers[i] != NULL) { if (aa_initmouse(context, aa_mousedrivers[i], mode)) { return 1; } i++; } return (ok); } aalib-1.4.0/src/aasave.c0000644000766200001440000002675007272031302010452 #include #include #include #include "aalib.h" #include "aaint.h" #define NORMALPRINTS { "%s", "%s", "%s", "%s", "%s", } #define NONE { "", "", "", "", "", } static __AA_CONST char * __AA_CONST html_escapes[] = {"<", "<", ">", ">", "&", "&", NULL}; static __AA_CONST char * __AA_CONST html_alt_escapes[] = {"<", "<", ">", ">", "&", "&", "\"", """, NULL}; #ifdef VYHEN_SUPPORT static __AA_CONST char * __AA_CONST vyhen_escapes[] = {"|", "||","~", "~~", NULL}; #endif __AA_CONST static char * __AA_CONST irc_escapes[] = {"@", "@@", NULL}; static char *generate_filename(__AA_CONST char *template, char *result, int x, int y, int pages, __AA_CONST char *extension); __AA_CONST struct aa_format aa_nhtml_format = { 79, 36, 79, 36, 0, AA_NORMAL_MASK | AA_BOLD_MASK | AA_BOLDFONT_MASK | AA_DIM_MASK, &aa_fontcourier, "Nestcapeized html", ".html", "\nAscii arted image done using aalib\n\n\n
\n",
    "
\n\n", "\n", NORMALPRINTS, {"", "", "", "", "" }, {"", "", "", "", "" }, html_escapes }; __AA_CONST struct aa_format aa_html_format = { 79, 25, 79, 25, 0, AA_NORMAL_MASK | AA_BOLD_MASK | AA_BOLDFONT_MASK, NULL, "Pure html", ".html", "\n Ascii arted image done using aalib\n\n
\n",
    "
\n\n", "\n", NORMALPRINTS, {"", "", "", "", "" }, {"", "", "", "", "" }, html_escapes }; __AA_CONST struct aa_format aa_ansi_format = { 80, 25, 80, 25, 0, AA_NORMAL_MASK | AA_BOLD_MASK | AA_BOLDFONT_MASK | AA_REVERSE_MASK | AA_DIM_MASK, NULL, "ANSI escape seqences", ".ansi", "", "", "\n", NORMALPRINTS, {"", "\33[8m", "\33[1m", "\33[1m", "\33[7m" }, {"", "\33[0;10m", "\33[0;10m", "\33[0;10m", "\33[0;10m", }, NULL }; #ifdef VYHEN_SUPPORT __AA_CONST struct aa_format aa_vyhen_format = { 80, 30, 80, 30, 0, AA_NORMAL_MASK | AA_BOLD_MASK | AA_REVERSE_MASK | AA_DIM_MASK | AA_EXTENDED, NULL, "vyhen", ".vyhen", "", "", "\n", NORMALPRINTS, {"|07", "|08", "|15", "||7|00", "||1|15" }, {"", "", "", "||9", "||0", }, vyhen_escapes }; #endif __AA_CONST struct aa_format aa_text_format = { 80, 25, 80, 25, 0, AA_NORMAL_MASK, NULL, "Text file", ".txt", "", "", "\n", NORMALPRINTS, NONE, NONE, NULL }; __AA_CONST struct aa_format aa_more_format = { 80, 25, 80, 25, AA_NORMAL_SPACES, AA_NORMAL_MASK | AA_BOLD_MASK | AA_BOLDFONT_MASK, NULL, "For more/less", ".cat", "", "", "\n", /* Can leave these %c iff there are no conversions to multi-character * thingies. */ {"%s", "%s", "%s\10%s", "%s\10%s", "%s"}, NONE, NONE, NULL }; __AA_CONST struct aa_format aa_hp_format = { 130 * 2, 64 * 2 - 1, 130, 64 * 2 - 1, AA_USE_PAGES, AA_NORMAL_MASK, &aa_fontline, "HP laser jet - A4 small font", ".hp", "\33(10U\33(s0p16.67h8.5v0s0b0T\33%%0A\33&/0U\33&/0Z\33&/24D", "\14", "\r\33=", NORMALPRINTS, NONE, NONE, NULL }; __AA_CONST struct aa_format aa_hp2_format = { 80 * 2, 64 - 1, 80, 64 - 1, AA_USE_PAGES, AA_NORMAL_MASK, &aa_font16, "HP laser jet - A4 big font", ".hp", "\33(s7B\33*p0Y@", "\14", "\r\n", NORMALPRINTS, NONE, NONE, NULL }; __AA_CONST struct aa_format aa_irc_format = { 70, 25, 70, 25, 0, AA_NORMAL_MASK | AA_BOLD_MASK | AA_REVERSE_MASK, &aa_font16, "For catting to an IRC channel", ".irc", "", "", "\n", NORMALPRINTS, {"", "", "", "", "" }, {"", "", "", "", "" }, NULL }; __AA_CONST struct aa_format aa_zephyr_format = { 70, 25, 70, 25, 0, AA_NORMAL_MASK | AA_DIM_MASK | AA_BOLD_MASK, &aa_font16, "For catting to an IRC channel II", ".irc", "", "", "\n", NORMALPRINTS, {"", "@color(gray50)", "@b(", "", "" }, {"", "@color(black)", ")", "", "" }, irc_escapes }; __AA_CONST struct aa_format aa_roff_format = { 70, 25, 70, 25, 0, AA_NORMAL_MASK | AA_BOLD_MASK, &aa_font16, "For including in a man page", ".man", "", "", "\n.br\n", NORMALPRINTS, {"", "", "\n.B ", "", "" }, {"", "", "\n", "", "" }, irc_escapes }; __AA_CONST struct aa_format aa_html_alt_format = { 79, 25, 79, 25, 0, AA_NORMAL_MASK, NULL, "HTML tag",\"\n",\n", "\n", NORMALPRINTS, {"", "", "", "", "" }, {"", "", "", "", "" }, html_alt_escapes }; __AA_CONST struct aa_format * __AA_CONST aa_formats[] = { #ifdef VYHEN_SUPPORT &aa_vyhen_format, #endif &aa_text_format, &aa_html_format, &aa_nhtml_format, &aa_html_alt_format, &aa_more_format, &aa_ansi_format, &aa_hp_format, &aa_hp2_format, &aa_irc_format, &aa_zephyr_format, &aa_roff_format, NULL }; __AA_CONST struct aa_driver save_d; #define FORMAT ((struct aa_savedata *)c->driverdata)->format #define DATA ((struct aa_savedata *)c->driverdata) __AA_CONST static char **build_conversions(__AA_CONST char * __AA_CONST *in, __AA_CONST char **conv) { unsigned char c; memset(conv, 0, sizeof(char *) * 256); if (in != NULL) while (*in != NULL && *(in + 1) != NULL) { c = **in; in++; conv[c] = *in; in++; } return conv; } static int save_init(__AA_CONST struct aa_hardware_params *p, __AA_CONST void *none, struct aa_hardware_params *dest, void **data) { __AA_CONST struct aa_savedata *d = (__AA_CONST struct aa_savedata *) none; static struct aa_hardware_params def; *data = (void *) malloc(sizeof(struct aa_savedata)); memcpy(*data, d, sizeof(struct aa_savedata)); *dest = def; if (p->font == NULL) dest->font = d->format->font; dest->width = d->format->width; dest->height = d->format->height; dest->supported = d->format->supported; return 1; } static void save_uninit(aa_context * c) { } static void save_getsize(aa_context * c, int *width, int *height) { } static void save_gotoxy(aa_context * c, int x, int y) { } static int lastattr; static FILE *f; static aa_context *c; static void stop_tag(void) { if (lastattr != -1) fputs(FORMAT->ends[lastattr], f); lastattr = -1; } static void start_tag(int attr) { if (attr > AA_NATTRS) attr = AA_NATTRS; lastattr = attr; fputs(FORMAT->begin[lastattr], f); } static void encodechar(unsigned char attr, unsigned char ch, __AA_CONST char **conversions) { char chr[2]; if (FORMAT->flags & AA_NORMAL_SPACES && ch == ' ' && (attr != AA_REVERSE)) attr = AA_NORMAL; if (attr != lastattr) { stop_tag(); start_tag(attr); } if (conversions[ch] == NULL) { chr[0] = ch; chr[1] = 0; fprintf(f, FORMAT->prints[attr], chr, chr, chr, chr); } else { fprintf(f, FORMAT->prints[attr], conversions[ch], conversions[ch], conversions[ch], conversions[ch]); } } static void savearea(int x1, int y1, int x2, int y2, __AA_CONST char **conversions) { int x, y; fputs(FORMAT->head, f); lastattr = -1; for (y = y1; y < y2; y++) { for (x = x1; x < x2; x++) { if (x < 0 || x >= aa_scrwidth(c) || y < 0 || y >= aa_scrheight(c)) encodechar(AA_NORMAL, ' ', conversions); else { int pos = x + y * aa_scrwidth(c); encodechar(c->attrbuffer[pos], c->textbuffer[pos], conversions); } } stop_tag(); fputs(FORMAT->newline, f); } fputs(FORMAT->end, f); fflush(f); } static void save_flush(aa_context * c1) { char fname[4096]; __AA_CONST char *conversions[256]; c = c1; build_conversions(FORMAT->conversions, conversions); if (FORMAT->flags & AA_USE_PAGES) { int xpages = (aa_scrwidth(c1) + FORMAT->pagewidth - 1) / FORMAT->pagewidth; int ypages = (aa_scrheight(c1) + FORMAT->pageheight - 1) / FORMAT->pageheight; int x, y; for (x = 0; x < xpages; x++) for (y = 0; y < ypages; y++) { if (DATA->name != NULL) { generate_filename(DATA->name, fname, x, y, 1, FORMAT->extension); f = fopen(fname, "w"); } else f = DATA->file; if (f == NULL) return; savearea(x * FORMAT->pagewidth, y * FORMAT->pageheight, (x + 1) * FORMAT->pagewidth, (y + 1) * FORMAT->pageheight, conversions); if (DATA->name != NULL) fclose(f); } } else { if (DATA->name != NULL) { generate_filename(DATA->name, fname, 0, 0, 0, FORMAT->extension); f = fopen(fname, "w"); } else f = DATA->file; if (f == NULL) return; savearea(0, 0, /*DATA->width, DATA->height */ aa_scrwidth(c1), aa_scrheight(c1), conversions); if (DATA->name != NULL) fclose(f); } } /* * Takes a template of the form blah%xfu%y.extension and will return * either blahfu.extension or blahfu.extension depending on whether * pages is true or not. %x and %y may be flipped, but may appear only once. * If you want a % in the output, you'll have to use %%. * Using %[^%xy] is not defined. The results are also undefined if you don't * include both %x and %y. * * Rewrote by Jan Hubicka to accept unlimited (and zero) number of % stuff * and %e for extension and %c for coordinates in format %x_%y. * You might now add after filename simply %c%e to get filename * blahX_Y.txt or blah.txt * Also avoided memory owerflows. */ static char *generate_filename(__AA_CONST char *template, char *result, int x, int y, int pages, __AA_CONST char *extension) { char *a; __AA_CONST char *b; char *end = result + 4090; b = template - 1, a = result - 1; while ((*++a = *++b)) { if (a >= end) break; /*Too long filename - probably bug in caller, since filenames longer than 4KB are useless :) */ if (*b == '%') { switch (b[1]) { case 'x': a--; if (pages) { char text[8]; char *e = text - 1; sprintf(text, "%i", x); while ((*++a = *++e)) if (a >= end) break; a--; } b++; break; case 'y': a--; if (pages) { char text[8]; char *e = text - 1; sprintf(text, "%i", y); while ((*++a = *++e)) if (a >= end) break; a--; } b++; break; case 'c': a--; if (pages) { char text[8]; char *e = text - 1; sprintf(text, "_%i_%i", x, y); while ((*++a = *++e)) if (a >= end) break; a--; } b++; break; case 'e': a--; { __AA_CONST char *e = extension - 1; while ((*++a = *++e)) if (a >= end) break; a--; } b++; break; case '%': a--; b++; break; } if (!*b) break; } } *a = 0; return result; } __AA_CONST struct aa_driver save_d = { "save", "Special driver for saving to files", save_init, save_uninit, save_getsize, NULL, NULL, save_gotoxy, save_flush, }; aalib-1.4.0/src/aastdout.c0000644000766200001440000000275707272031253011044 #include "config.h" #include #include "aalib.h" #include "aaint.h" static int stdout_init(__AA_CONST struct aa_hardware_params *p,__AA_CONST void *none, struct aa_hardware_params *dest, void **n) { __AA_CONST static struct aa_hardware_params def={NULL, AA_NORMAL_MASK | AA_EXTENDED}; *dest=def; return 1; } static void stdout_uninit(aa_context * c) { } static void stdout_getsize(aa_context * c, int *width, int *height) { } static void stdout_flush(aa_context * c) { int x, y; for (y = 0; y < aa_scrheight(c); y++) { for (x = 0; x < aa_scrwidth(c); x++) { putc(c->textbuffer[x + y * aa_scrwidth(c)], stdout); } putc('\n', stdout); } putc(' ', stdout); putc('\n', stdout); fflush(stdout); } static void stdout_gotoxy(aa_context * c, int x, int y) { } __AA_CONST struct aa_driver stdout_d = { "stdout", "Standard output driver", stdout_init, stdout_uninit, stdout_getsize, NULL, NULL, stdout_gotoxy, stdout_flush, NULL }; static void stderr_flush(aa_context * c) { int x, y; for (y = 0; y < aa_scrheight(c); y++) { for (x = 0; x < aa_scrwidth(c); x++) { putc(c->textbuffer[x + y * aa_scrwidth(c)], stderr); } putc('\n', stderr); } putc(' ', stderr); putc('\n', stderr); fflush(stderr); } __AA_CONST struct aa_driver stderr_d = { "stderr", "Standard error driver", stdout_init, stdout_uninit, stdout_getsize, NULL, NULL, stdout_gotoxy, stderr_flush, NULL }; aalib-1.4.0/src/aastdin.c0000644000766200001440000000376607272031253010644 #include "config.h" #include #include #include #include #include #include #ifdef GPM_MOUSEDRIVER #include #endif #include "aalib.h" #include "aaint.h" static int iswaiting; static int __resized; #ifdef GPM_MOUSEDRIVER extern int __curses_usegpm; #endif static jmp_buf buf; #ifdef SIGWINCH static void handler(int i) { __resized = 2; signal(SIGWINCH, handler); if (iswaiting) longjmp(buf, 1); } #endif static int stdin_init(struct aa_context *context, int mode) { #ifdef SIGWINCH signal(SIGWINCH, handler); #endif #ifdef GPM_MOUSEDRIVER aa_recommendlowmouse("gpm"); #endif return 1; } static void stdin_uninit(aa_context * c) { #ifdef SIGWINCH signal(SIGWINCH, SIG_IGN); /*this line may cause problem... */ #endif } static int stdin_getchar(aa_context * c1, int wait) { int c; int flag; struct timeval tv; if (wait) { setjmp(buf); iswaiting = 1; } if (__resized == 2) { __resized = 1; return (AA_RESIZE); } if (!wait) { fd_set readfds; tv.tv_sec = 0; tv.tv_usec = 0; FD_ZERO(&readfds); FD_SET(0, &readfds); #ifdef GPM_MOUSEDRIVER if (__curses_usegpm) { FD_SET(gpm_fd, &readfds); } #endif #ifdef GPM_MOUSEDRIVER if (!(flag = select((__curses_usegpm ? gpm_fd : 0) + 1, &readfds, NULL, NULL, &tv))) #else if (!(flag = select(1, &readfds, NULL, NULL, &tv))) #endif return AA_NONE; } #ifdef GPM_MOUSEDRIVER if (__curses_usegpm) { c = Gpm_Getc(stdin); } else #endif c = getc(stdin); iswaiting = 0; if (c == 27) return (AA_ESC); if (c == 10) return (13); if (c > 0 && c < 127 && c != 127) return (c); switch (c) { #ifdef KEY_MOUDE case KEY_MOUSE: return AA_MOUSE #endif case 127: return (AA_BACKSPACE); } if(feof(stdin)) return AA_NONE; return (AA_UNKNOWN); } __AA_CONST struct aa_kbddriver kbd_stdin_d = { "stdin", "Standard input keyboard driver 1.0", 0, stdin_init, stdin_uninit, stdin_getchar, }; aalib-1.4.0/src/aaparse.c0000644000766200001440000002076707272031253010635 #include #include #include "config.h" #include "aalib.h" #include "aaint.h" static int inparse; static void parseenv(struct aa_hardware_params *p, aa_renderparams * r); static void aa_remove(int i, int *argc, char **argv) { int y; if (i < 0 || i >= *argc) { printf("AA Internal error #1-please report\n"); return; } for (y = i; y < *argc - 1; y++) { argv[y] = argv[y + 1]; } argv[*argc - 1] = NULL; (*argc)--; } int aa_parseoptions(struct aa_hardware_params *p, aa_renderparams * r, int *argc, char **argv) { int i, y; int supported; if (!inparse) parseenv(p, r); if (argc == NULL || argv == NULL) return 1; supported = p != NULL ? p->supported : aa_defparams.supported; if (p == NULL) p = &aa_defparams; if (r == NULL) r = &aa_defrenderparams; for (i = 1; i < *argc; i++) { if (strcmp(argv[i], "-font") == 0) { aa_remove(i, argc, argv); if (*argc == i) { fprintf(stderr, "font name expected\n"); return (0); } for (y = 0; aa_fonts[y] != NULL; y++) { if (!strcmp(argv[i], aa_fonts[y]->name) || !strcmp(argv[i], aa_fonts[y]->shortname)) { p->font = aa_fonts[y]; aa_remove(i, argc, argv); break; } } if (aa_fonts[i] == NULL) { fprintf(stderr, "font name expected\n"); return (0); } i--; } else if (strcmp(argv[i], "-normal") == 0) { aa_remove(i, argc, argv); i--; supported |= AA_NORMAL_MASK; p->supported = supported; } else if (strcmp(argv[i], "-nonormal") == 0) { aa_remove(i, argc, argv); i--; supported &= ~AA_NORMAL_MASK; p->supported = supported; } else if (strcmp(argv[i], "-bold") == 0) { aa_remove(i, argc, argv); i--; supported |= AA_BOLD_MASK; p->supported = supported; } else if (strcmp(argv[i], "-nobold") == 0) { aa_remove(i, argc, argv); i--; supported &= ~AA_BOLD_MASK; p->supported = supported; } else if (strcmp(argv[i], "-boldfont") == 0) { aa_remove(i, argc, argv); i--; supported |= AA_BOLDFONT_MASK; p->supported = supported; } else if (strcmp(argv[i], "-noboldfont") == 0) { aa_remove(i, argc, argv); i--; supported &= ~AA_BOLDFONT_MASK; p->supported = supported; } else if (strcmp(argv[i], "-dim") == 0) { aa_remove(i, argc, argv); i--; supported |= AA_DIM_MASK; p->supported = supported; } else if (strcmp(argv[i], "-nodim") == 0) { aa_remove(i, argc, argv); i--; supported &= ~AA_DIM_MASK; p->supported = supported; } else if (strcmp(argv[i], "-reverse") == 0) { aa_remove(i, argc, argv); i--; supported |= AA_REVERSE_MASK; p->supported = supported; } else if (strcmp(argv[i], "-extended") == 0) { aa_remove(i, argc, argv); i--; supported |= AA_EXTENDED; p->supported = supported; } else if (strcmp(argv[i], "-eight") == 0) { aa_remove(i, argc, argv); i--; supported |= AA_EIGHT; p->supported = supported; } else if (strcmp(argv[i], "-noreverse") == 0) { aa_remove(i, argc, argv); i--; supported &= ~AA_REVERSE_MASK; p->supported = supported; } else if (strcmp(argv[i], "-inverse") == 0) { aa_remove(i, argc, argv); i--; r->inversion = 1; } else if (strcmp(argv[i], "-noinverse") == 0) { aa_remove(i, argc, argv); i--; r->inversion = 0; } else if (strcmp(argv[i], "-nodither") == 0) { aa_remove(i, argc, argv); i--; r->dither = AA_NONE; } else if (strcmp(argv[i], "-floyd_steinberg") == 0) { aa_remove(i, argc, argv); i--; r->dither = AA_FLOYD_S; } else if (strcmp(argv[i], "-error_distribution") == 0) { aa_remove(i, argc, argv); i--; r->dither = AA_ERRORDISTRIB; } else if (strcmp(argv[i], "-random") == 0) { aa_remove(i, argc, argv); if (*argc == i) { fprintf(stderr, "Random dithering value expected\n"); return (0); } r->randomval = atol(argv[i]); aa_remove(i, argc, argv); i--; } else if (strcmp(argv[i], "-bright") == 0) { aa_remove(i, argc, argv); if (*argc == i) { fprintf(stderr, "Bright value expected(0-255)\n"); return (0); } r->bright = atol(argv[i]); aa_remove(i, argc, argv); i--; } else if (strcmp(argv[i], "-contrast") == 0) { aa_remove(i, argc, argv); if (*argc == i) { fprintf(stderr, "Contrast value expected(0-255)\n"); return (0); } r->contrast = atol(argv[i]); aa_remove(i, argc, argv); i--; } else if (strcmp(argv[i], "-width") == 0) { aa_remove(i, argc, argv); if (*argc == i) { fprintf(stderr, "width expected\n"); return (0); } p->width = atol(argv[i]); aa_remove(i, argc, argv); i--; } else if (strcmp(argv[i], "-recwidth") == 0) { aa_remove(i, argc, argv); if (*argc == i) { fprintf(stderr, "width expected\n"); return (0); } p->recwidth = atol(argv[i]); aa_remove(i, argc, argv); i--; } else if (strcmp(argv[i], "-minwidth") == 0) { aa_remove(i, argc, argv); if (*argc == i) { fprintf(stderr, "width expected\n"); return (0); } p->minwidth = atol(argv[i]); aa_remove(i, argc, argv); i--; } else if (strcmp(argv[i], "-maxwidth") == 0) { aa_remove(i, argc, argv); if (*argc == i) { fprintf(stderr, "width expected\n"); return (0); } p->maxwidth = atol(argv[i]); aa_remove(i, argc, argv); i--; } else if (strcmp(argv[i], "-height") == 0) { aa_remove(i, argc, argv); if (*argc == i) { fprintf(stderr, "height expected\n"); return (0); } p->height = atol(argv[i]); aa_remove(i, argc, argv); i--; } else if (strcmp(argv[i], "-recheight") == 0) { aa_remove(i, argc, argv); if (*argc == i) { fprintf(stderr, "height expected\n"); return (0); } p->recheight = atol(argv[i]); aa_remove(i, argc, argv); i--; } else if (strcmp(argv[i], "-minheight") == 0) { aa_remove(i, argc, argv); if (*argc == i) { fprintf(stderr, "height expected\n"); return (0); } p->minheight = atol(argv[i]); aa_remove(i, argc, argv); i--; } else if (strcmp(argv[i], "-maxheight") == 0) { aa_remove(i, argc, argv); if (*argc == i) { fprintf(stderr, "height expected\n"); return (0); } p->maxheight = atol(argv[i]); aa_remove(i, argc, argv); i--; } else if (strcmp(argv[i], "-gamma") == 0) { aa_remove(i, argc, argv); if (*argc == i) { fprintf(stderr, "Gamma value expected\n"); return (0); } r->gamma = atof(argv[i]); aa_remove(i, argc, argv); i--; } else if (strcmp(argv[i], "-dimmul") == 0) { aa_remove(i, argc, argv); if (*argc == i) { fprintf(stderr, "Dimmul value expected\n"); return (0); } p->dimmul = atof(argv[i]); aa_remove(i, argc, argv); i--; } else if (strcmp(argv[i], "-boldmul") == 0) { aa_remove(i, argc, argv); if (*argc == i) { fprintf(stderr, "Dimmul value expected\n"); return (0); } p->boldmul = atof(argv[i]); aa_remove(i, argc, argv); i--; } else if (strcmp(argv[i], "-driver") == 0) { aa_remove(i, argc, argv); if (*argc == i) { fprintf(stderr, "Driver name expected\n"); return (0); } aa_recommendhidisplay(argv[i]); aa_remove(i, argc, argv); i--; } else if (strcmp(argv[i], "-kbddriver") == 0) { aa_remove(i, argc, argv); if (*argc == i) { fprintf(stderr, "Driver name expected\n"); return (0); } aa_recommendhikbd(argv[i]); aa_remove(i, argc, argv); i--; } else if (strcmp(argv[i], "-mousedriver") == 0) { aa_remove(i, argc, argv); if (*argc == i) { fprintf(stderr, "Driver name expected\n"); return (0); } aa_recommendhimouse(argv[i]); aa_remove(i, argc, argv); i--; } } return (1); } static void parseenv(struct aa_hardware_params *p, aa_renderparams * r) { char *env; int argc = 1; int i; char *argv[256], *argv1[256]; inparse = 1; env = getenv("AAOPTS"); if (env == NULL) return; if (env[0]) { for (i = 0; i < (int)strlen(env); i++) { int s; char stop = ' '; while (env[i] == ' ') i++; if (env[i] == '"') i++, stop = '"'; s = i; while (env[i] != stop && env[i]) i++; if (i - s) { argv1[argc] = argv[argc] = calloc(i - s + 1, 1); strncpy(argv[argc], env + s, i - s); argc++; if (argc == 255) break; } } } i = argc; if (i != 1) { aa_parseoptions(p, r, &i, argv); for (i = 1; i < argc; i++) free(argv1[i]); } inparse = 0; } aalib-1.4.0/src/aaimgwidth.c0000644000766200001440000000016407272031253011324 #include "aalib.h" #include "aaint.h" #undef aa_imgwidth int aa_imgwidth (aa_context *a) { return a->imgwidth; } aalib-1.4.0/src/aaimgheight.c0000644000766200001440000000020607272031253011452 #include "aalib.h" #define NOFAST #include "aaint.h" #undef aa_imgheight int aa_imgheight (aa_context *a) { return a->imgheight; } aalib-1.4.0/src/aascrwidth.c0000644000766200001440000000017007272031253011334 #include "aalib.h" #include "aaint.h" #undef aa_scrwidth int aa_scrwidth (aa_context *a) { return a->params.width; } aalib-1.4.0/src/aascrheight.c0000644000766200001440000000017307272031253011470 #include "aalib.h" #include "aaint.h" #undef aa_scrheight int aa_scrheight (aa_context *a) { return a->params.height; } aalib-1.4.0/src/aammwidth.c0000644000766200001440000000017007272031253011156 #include "aalib.h" #include "aaint.h" #undef aa_mmwidth int aa_mmwidth (aa_context *a) { return a->params.mmwidth; } aalib-1.4.0/src/aammheight.c0000644000766200001440000000017307272031253011312 #include "aalib.h" #include "aaint.h" #undef aa_mmheight int aa_mmheight (aa_context *a) { return a->params.mmheight; } aalib-1.4.0/src/aaimage.c0000644000766200001440000000021207272031253010564 #include "aalib.h" #define NOFAST #include "aaint.h" #undef aa_image char * aa_image (aa_context *a) { return (char *)a->imagebuffer; } aalib-1.4.0/src/aatext.c0000644000766200001440000000017007272031253010471 #include "aalib.h" #include "aaint.h" #undef aa_text char * aa_text (aa_context *a) { return (char *)a->textbuffer; } aalib-1.4.0/src/aacurrfnt.c0000644000766200001440000000022407272031253011170 #include "aalib.h" #include "aaint.h" #undef aa_currentfont __AA_CONST struct aa_font * aa_currentfont (aa_context *a) { return a->params.font; } aalib-1.4.0/src/aaattrs.c0000644000766200001440000000017207272031253010644 #include "aalib.h" #include "aaint.h" #undef aa_attrs char * aa_attrs (aa_context *a) { return (char *)a->attrbuffer; } aalib-1.4.0/src/aaputpixel.c0000644000766200001440000000024207272031253011357 #include #include "aaint.h" #undef aa_putpixel void aa_putpixel (aa_context *c, int x, int y, int color) { c->imagebuffer[x+y*aa_imgwidth(c)]=color; } aalib-1.4.0/src/aarecfunc.c0000644000766200001440000000140607272031253011135 #include "aalib.h" #include "aaint.h" #undef aa_recommendhikbd #undef aa_recommendhimouse #undef aa_recommendhidisplay #undef aa_recommendlowkbd #undef aa_recommendlowmouse #undef aa_recommendlowdisplay void aa_recommendhikbd (__AA_CONST char *t) { aa_recommendhi (&aa_kbdrecommended, t); } void aa_recommendhimouse (__AA_CONST char *t) { aa_recommendhi (&aa_mouserecommended, t); } void aa_recommendhidisplay (__AA_CONST char *t) { aa_recommendhi (&aa_displayrecommended, t); } void aa_recommendlowkbd (__AA_CONST char *t) { aa_recommendlow (&aa_kbdrecommended, t); } void aa_recommendlowmouse (__AA_CONST char *t) { aa_recommendlow (&aa_mouserecommended, t); } void aa_recommendlowdisplay (__AA_CONST char *t) { aa_recommendlow (&aa_displayrecommended, t); } aalib-1.4.0/src/aainfo.c0000644000766200001440000000314207272031253010442 #include "aalib.h" #include "aaint.h" int main(int argc, char **argv) { aa_context *c; char str[256]; char str1[256]; char str2[256]; if (!aa_parseoptions(NULL, NULL, &argc, argv) || argc != 1) { printf("%s", aa_help); exit(1); } c = aa_autoinit(&aa_defparams); if (c == NULL) { printf("aalib initialization failed\n"); exit(1); } aa_autoinitkbd(c, 0); aa_autoinitmouse(c, AA_MOUSEALLMASK); sprintf(str, "\n Current driver:%s\n" " Short name :%s\n" " Font :%s\n" " Short name :%s\n" " height :%i\n" " Width :%i\n" " Height :%i\n" " Width in mm :%i\n" " Height in mm :%i\n" " Supported :%i\n", c->driver->name, c->driver->shortname, c->params.font->name, c->params.font->shortname, c->params.font->height, c->params.width, c->params.height, c->params.mmwidth, c->params.mmheight, c->driverparams.supported); if (c->kbddriver != NULL) sprintf(str1, "\n Current driver:%s\n" " Short name :%s\n" " Flags :%i\n", c->kbddriver->name, c->kbddriver->shortname, c->kbddriver->flags); else sprintf(str1, "not available"); if (c->mousedriver != NULL) sprintf(str2, "\n Current driver:%s\n" " Short name :%s\n" " Flags :%i\n", c->mousedriver->name, c->mousedriver->shortname, c->mousedriver->flags); else sprintf(str2, "not available"); aa_close(c); printf("AAlib version:%i.%i\nDisplay:%s\nKeyboard:%s\nMouse:%s\n", AA_LIB_VERSION, AA_LIB_MINNOR, str, str1, str2); return (0); } aalib-1.4.0/src/aatest.c0000644000766200001440000000556207272031253010476 #include "aalib.h" int main(int argc, char **argv) { aa_context *c; int i, y; char s[256]; aa_renderparams *p; strcpy(s, "line editor."); if (!aa_parseoptions(NULL, NULL, &argc, argv) || argc != 1) { printf("%s\n", aa_help); exit(1); } c = aa_autoinit(&aa_defparams); if (c == NULL) { printf("Can not intialize aalib\n"); exit(2); } if (!aa_autoinitkbd(c, 0)) { printf("Can not intialize keyboard\n"); aa_close(c); exit(3); } for (i = 0; i < aa_imgwidth(c); i++) for (y = 0; y < aa_imgheight(c); y++) aa_putpixel(c, i, y, i + y < 80 ? i : ((i + y) < 100 ? (i + y == 89 ? 150 : 0) : y * 8)); aa_hidecursor(c); aa_fastrender(c, 0, 0, aa_scrwidth(c), aa_scrheight(c)); aa_printf(c, 0, 0, AA_SPECIAL, "Fast rendering routine %i",1); aa_flush(c); aa_getkey(c, 1); aa_edit(c, 0, 1, 20, s, 256); aa_puts(c, 0, 0, AA_SPECIAL, "Key lookup test "); aa_flush(c); while (aa_getkey(c, 0) == AA_NONE); if (aa_autoinitmouse(c, AA_MOUSEALLMASK)) { int co = 0; sprintf(s, "Mouse test-space to exit"); aa_puts(c, 0, 0, AA_SPECIAL, s); aa_flush(c); while (aa_getevent(c, 1) != ' ') { int x, y, b; char s[80]; co++; aa_getmouse(c, &x, &y, &b); sprintf(s, "Mouse test-space to exit. x:%i y:%i b:%i event #%i ", x, y, b, co); aa_puts(c, 0, 0, AA_SPECIAL, s); aa_flush(c); } aa_hidemouse(c); while (aa_getevent(c, 1) != ' ') { int x, y, b; char s[80]; co++; aa_getmouse(c, &x, &y, &b); sprintf(s, "Hidden mouse test-space to exit. x:%i y:%i b:%i event #%i ", x, y, b, co); aa_puts(c, 0, 0, AA_SPECIAL, s); aa_flush(c); } aa_uninitmouse(c); } p = aa_getrenderparams(); for (i = 0; i < AA_DITHERTYPES; i++) { p->dither = i; aa_render(c, p, 0, 0, aa_scrwidth(c), aa_scrheight(c)); aa_puts(c, 0, 0, AA_SPECIAL, aa_dithernames[i]); aa_flush(c); aa_getkey(c, 1); } for (i = 0; i < 255; i += 32) { p->bright = i; aa_render(c, p, 0, 0, aa_scrwidth(c), aa_scrheight(c)); aa_puts(c, 0, 0, AA_SPECIAL, "Normal rendering - bright changes"); aa_flush(c); aa_getkey(c, 1); } p->bright = 0; for (i = 0; i < 128; i += 16) { p->contrast = i; aa_render(c, p, 0, 0, aa_scrwidth(c), aa_scrheight(c)); aa_puts(c, 0, 0, AA_SPECIAL, "Normal rendering - contrast changes"); aa_flush(c); aa_getkey(c, 1); } p->contrast = 0; for (i = 0; i < 255; i += 32) { p->gamma = 1 + i / 32.0; aa_render(c, p, 0, 0, aa_scrwidth(c), aa_scrheight(c)); aa_puts(c, 0, 0, AA_SPECIAL, "Normal rendering - gamma changes"); aa_flush(c); aa_getkey(c, 1); } p->gamma = 1.0; for (i = 0; i < 255; i += 32) { p->randomval = i; aa_render(c, p, 0, 0, aa_scrwidth(c), aa_scrheight(c)); aa_puts(c, 0, 0, AA_SPECIAL, "Normal rendering - randomval changes"); aa_flush(c); aa_getkey(c, 1); } aa_close(c); return 0; } aalib-1.4.0/src/aafire.c0000644000766200001440000001275307272037373010455 #include #include "aalib.h" #define XSIZ aa_imgwidth(context) #define YSIZ (aa_imgheight(context)-4) #define MAXTABLE (256*5) static aa_context *context; static aa_renderparams *params; static aa_palette palette; static unsigned int table[MAXTABLE]; __AA_CONST static int pal[] = { 0, 0, 0, 0, 0, 6, 0, 0, 6, 0, 0, 7, 0, 0, 8, 0, 0, 8, 0, 0, 9, 0, 0, 10, 2, 0, 10, 4, 0, 9, 6, 0, 9, 8, 0, 8, 10, 0, 7, 12, 0, 7, 14, 0, 6, 16, 0, 5, 18, 0, 5, 20, 0, 4, 22, 0, 4, 24, 0, 3, 26, 0, 2, 28, 0, 2, 30, 0, 1, 32, 0, 0, 32, 0, 0, 33, 0, 0, 34, 0, 0, 35, 0, 0, 36, 0, 0, 36, 0, 0, 37, 0, 0, 38, 0, 0, 39, 0, 0, 40, 0, 0, 40, 0, 0, 41, 0, 0, 42, 0, 0, 43, 0, 0, 44, 0, 0, 45, 0, 0, 46, 1, 0, 47, 1, 0, 48, 2, 0, 49, 2, 0, 50, 3, 0, 51, 3, 0, 52, 4, 0, 53, 4, 0, 54, 5, 0, 55, 5, 0, 56, 6, 0, 57, 6, 0, 58, 7, 0, 59, 7, 0, 60, 8, 0, 61, 8, 0, 63, 9, 0, 63, 9, 0, 63, 10, 0, 63, 10, 0, 63, 11, 0, 63, 11, 0, 63, 12, 0, 63, 12, 0, 63, 13, 0, 63, 13, 0, 63, 14, 0, 63, 14, 0, 63, 15, 0, 63, 15, 0, 63, 16, 0, 63, 16, 0, 63, 17, 0, 63, 17, 0, 63, 18, 0, 63, 18, 0, 63, 19, 0, 63, 19, 0, 63, 20, 0, 63, 20, 0, 63, 21, 0, 63, 21, 0, 63, 22, 0, 63, 22, 0, 63, 23, 0, 63, 24, 0, 63, 24, 0, 63, 25, 0, 63, 25, 0, 63, 26, 0, 63, 26, 0, 63, 27, 0, 63, 27, 0, 63, 28, 0, 63, 28, 0, 63, 29, 0, 63, 29, 0, 63, 30, 0, 63, 30, 0, 63, 31, 0, 63, 31, 0, 63, 32, 0, 63, 32, 0, 63, 33, 0, 63, 33, 0, 63, 34, 0, 63, 34, 0, 63, 35, 0, 63, 35, 0, 63, 36, 0, 63, 36, 0, 63, 37, 0, 63, 38, 0, 63, 38, 0, 63, 39, 0, 63, 39, 0, 63, 40, 0, 63, 40, 0, 63, 41, 0, 63, 41, 0, 63, 42, 0, 63, 42, 0, 63, 43, 0, 63, 43, 0, 63, 44, 0, 63, 44, 0, 63, 45, 0, 63, 45, 0, 63, 46, 0, 63, 46, 0, 63, 47, 0, 63, 47, 0, 63, 48, 0, 63, 48, 0, 63, 49, 0, 63, 49, 0, 63, 50, 0, 63, 50, 0, 63, 51, 0, 63, 52, 0, 63, 52, 0, 63, 52, 0, 63, 52, 0, 63, 52, 0, 63, 53, 0, 63, 53, 0, 63, 53, 0, 63, 53, 0, 63, 54, 0, 63, 54, 0, 63, 54, 0, 63, 54, 0, 63, 54, 0, 63, 55, 0, 63, 55, 0, 63, 55, 0, 63, 55, 0, 63, 56, 0, 63, 56, 0, 63, 56, 0, 63, 56, 0, 63, 57, 0, 63, 57, 0, 63, 57, 0, 63, 57, 0, 63, 57, 0, 63, 58, 0, 63, 58, 0, 63, 58, 0, 63, 58, 0, 63, 59, 0, 63, 59, 0, 63, 59, 0, 63, 59, 0, 63, 60, 0, 63, 60, 0, 63, 60, 0, 63, 60, 0, 63, 60, 0, 63, 61, 0, 63, 61, 0, 63, 61, 0, 63, 61, 0, 63, 62, 0, 63, 62, 0, 63, 62, 0, 63, 62, 0, 63, 63, 0, 63, 63, 1, 63, 63, 2, 63, 63, 3, 63, 63, 4, 63, 63, 5, 63, 63, 6, 63, 63, 7, 63, 63, 8, 63, 63, 9, 63, 63, 10, 63, 63, 10, 63, 63, 11, 63, 63, 12, 63, 63, 13, 63, 63, 14, 63, 63, 15, 63, 63, 16, 63, 63, 17, 63, 63, 18, 63, 63, 19, 63, 63, 20, 63, 63, 21, 63, 63, 21, 63, 63, 22, 63, 63, 23, 63, 63, 24, 63, 63, 25, 63, 63, 26, 63, 63, 27, 63, 63, 28, 63, 63, 29, 63, 63, 30, 63, 63, 31, 63, 63, 31, 63, 63, 32, 63, 63, 33, 63, 63, 34, 63, 63, 35, 63, 63, 36, 63, 63, 37, 63, 63, 38, 63, 63, 39, 63, 63, 40, 63, 63, 41, 63, 63, 42, 63, 63, 42, 63, 63, 43, 63, 63, 44, 63, 63, 45, 63, 63, 46, 63, 63, 47, 63, 63, 48, 63, 63, 49, 63, 63, 50, 63, 63, 51, 63, 63, 52, 63, 63, 52, 63, 63, 53, 63, 63, 54, 63, 63, 55, 63, 63, 56, 63, 63, 57, 63, 63, 58, 63, 63, 59, 63, 63, 60, 63, 63, 61, 63, 63, 62, 63, 63, 63}; static void initialize (void) { int i; context = aa_autoinit (&aa_defparams); if (context == NULL) { printf ("Failed to initialize aalib\n"); exit (1); } aa_autoinitkbd (context, 0); params = aa_getrenderparams (); for (i = 0; i < 256; i++) aa_setpalette (palette, i, pal[i * 3] * 4, pal[i * 3 + 1] * 4, pal[i * 3 + 2] * 4); aa_hidecursor (context); } static void uninitialize (void) { aa_close (context); exit (0); } static void gentable (void) { unsigned int i, p2; int minus = 800 / YSIZ; if (minus == 0) minus = 1; for (i = 0; i < MAXTABLE; i++) { if (i > minus) { p2 = (i - minus) / 5; table[i] = p2; } else table[i] = 0; } } #define MA 5 static void firemain (void) { register unsigned int i; unsigned char *p; char *bitmap = aa_image (context); i = 0; #define END (bitmap + XSIZ * YSIZ) for (p = bitmap; p <= (unsigned char *) (END); p += 1) { *p = table[(*(p + XSIZ - 1) + *(p + XSIZ + 1) + *(p + XSIZ)) + (*(p + 2 * XSIZ - 1) + *(p + 2 * XSIZ + 1))]; } } #define min(x,y) ((x)<(y)?(x):(y)) static void drawfire (void) { unsigned int i, last1, i1, i2; static int loop = 0, sloop = 0, height = 0; register unsigned char *p; char *bitmap = aa_image (context); height++; loop--; if (loop < 0) loop = rand () % 3, sloop++;; i1 = 1; i2 = 4 * XSIZ + 1; for (p = (char *) bitmap + XSIZ * (YSIZ + 0); p < ((unsigned char *) bitmap + XSIZ * (YSIZ + 1)); p++, i1 += 4, i2 -= 4) { last1 = rand () % min (i1, min (i2, height)); i = rand () % 6; for (; p < (unsigned char *) bitmap + XSIZ * (YSIZ + 1) && i != 0; p++, i--, i1 += 4, i2 -= 4) *p = last1, last1 += rand () % 6 - 2, *(p + XSIZ) = last1, last1 += rand () % 6 - 2; *(p + 2 * XSIZ) = last1, last1 += rand () % 6 - 2; } i = 0; firemain (); aa_renderpalette (context, palette, params, 0, 0, aa_scrwidth (context), aa_scrheight (context)); aa_flush (context); } static void game (void) { int event; gentable (); while (!(event = aa_getevent (context, 0)) || event == AA_RESIZE) { drawfire (); } } int main (int argc, char **argv) { if (!aa_parseoptions (NULL, NULL, &argc, argv) || argc != 1) { printf ("%s", aa_help); exit (1); } initialize (); aa_resizehandler (context, (void *) aa_resize); game (); uninitialize (); return 1; } aalib-1.4.0/src/aasavefont.c0000644000766200001440000000162107272031253011334 #include "aalib.h" int main(int argc, char **argv) { aa_context *c; __AA_CONST struct aa_font *font; int i; FILE *f; if (!aa_parseoptions(NULL, NULL, &argc, argv) || argc != 5) { printf("Usage: %s [options] file_name variable_name long_name short_name\n%s", argv[0], aa_help); exit(1); } c = aa_autoinit(&aa_defparams); f = fopen(argv[1], "w"); if (f == NULL) { aa_close(c); printf("Can not open output file\n"); } fprintf(f, "#include \"aalib.h\"\n" "static unsigned char %sdata[] =\n" "{", argv[2]); font = aa_currentfont(c); for (i = 0; i < font->height * 256; i++) { if (!(i % font->height)) fprintf(f, "\n\t"); fprintf(f, "0x%02x, ", font->data[i]); } fprintf(f, "};\n\n" "struct aa_font %s =\n" "\t{%sdata, %i, \"%s\", \"%s\"};\n", argv[2], argv[2], font->height, argv[3], argv[4]); aa_close(c); return 1; } aalib-1.4.0/src/aalib.h0000644000766200001440000010244507272031253010270 /* * AA-lib, an ascii-art gfx library * Copyright (C) 1998,1999,2001 by * * Jan Hubicka (hubicka@freesoft.cz) * Kamil Toman (toman@artax.karlin.mff.cuni.cz) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Library 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 Library General Public * License along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef __AALIB_INCLUDED__ #define __AALIB_INCLUDED__ #include #ifdef __cplusplus extern "C" { #endif #define __AA_CONST const /* The -malign-double switch changes binarry compatibility with structures containing floating point values. To avoid this, set alignment manually to old value. */ #ifdef __GNUC__ #ifdef __i386__ #define __AA_ALIGN __attribute__ ((__aligned__ (4))) #define __AA_NOALIGN __attribute__ ((__packed__)) #endif #endif #ifndef __AA_ALIGN #define __AA_ALIGN #endif #ifndef __AA_NOALIGN #define __AA_NOALIGN #endif #define AA_LIB_VERSION 1 #define AA_LIB_MINNOR 4 #define AA_LIB_VERSIONCODE 104000 #define AA_NATTRS 5 #define AA_NPARAMS 5 #define AA_RESIZE 258 /*special keycodes */ #define AA_MOUSE 259 #define AA_UP 300 #define AA_DOWN 301 #define AA_LEFT 302 #define AA_RIGHT 303 #define AA_BACKSPACE 304 #define AA_ESC 305 #define AA_UNKNOWN 400 #define AA_RELEASE 65536 #define AA_NORMAL_MASK 1 /*masks for attributes */ #define AA_DIM_MASK 2 #define AA_BOLD_MASK 4 #define AA_BOLDFONT_MASK 8 #define AA_REVERSE_MASK 16 #define AA_ALL 128 #define AA_EIGHT 256 #define AA_EXTENDED (AA_ALL|AA_EIGHT) /* The characters may be output with following attributes: */ enum aa_attribute { AA_NORMAL=0, /* Normal characters. */ AA_DIM=1, /* Dark characters. */ AA_BOLD=2, /* Bright characters. */ AA_BOLDFONT=3, /* Characters rendered in bold font. */ AA_REVERSE=4, /* Reversed (black on whilte) characters. */ AA_SPECIAL=5 /* Render characters in a way easilly visible on the screen. The exact rendering is driver dependent, but this mode ought to be used to output texts you want to make easilly visible in the image. */ }; enum aa_dithering_mode { AA_NONE=0, AA_ERRORDISTRIB=1, /* Error distribution. */ AA_FLOYD_S=2, /* Floyd-Steinberg dithering. */ AA_DITHERTYPES=3 /* Number of supported dithering modes. */ }; #define AA_BUTTON1 1 /*mouse */ #define AA_BUTTON2 2 #define AA_BUTTON3 4 #define AA_MOUSEMOVEMASK 1 #define AA_MOUSEPRESSMASK 2 #define AA_PRESSEDMOVEMASK 4 #define AA_MOUSEALLMASK 7 #define AA_HIDECURSOR 8 #define AA_SENDRELEASE 1 #define AA_KBDALLMASK 1 #define AA_USE_PAGES 1 /*save format flags */ #define AA_NORMAL_SPACES 8 /* These structures are subject to change in future. Thus they are hidden behind final user. */ struct aa_driver; struct aa_kbddriver; struct aa_mousedriver; struct aa_edit; struct aa_hardware_params { __AA_CONST struct aa_font *font; /*Font bitmap used by hardware. */ int supported; /*Mask of supported features. Following masks are available: AA_NORMAL_MASK, AA_DIM_MASK, AA_BOLD_MASK, AA_BOLDFONT_MASK, AA_REVERSE_MASK */ int minwidth, minheight; /*Minimal alowed screen size in characters */ int maxwidth, maxheight; /*Maximal alowed screen size in characters */ int recwidth, recheight; /*Recommended screen size (driver attempts to find resolution nearest to this value within given bounds bit min and max fields */ int mmwidth, mmheight; /*Physical screen size */ int width, height; /*Current screen size */ double dimmul __AA_ALIGN; /*Bright value of dim characters (0 black, 1 white) */ double boldmul __AA_ALIGN; /*Bright value of bold characters (0 black, 1 white) */ }; /* * aa_context contains information about the display. It is passed to most * of AA-lib functions. The full definition of structure is present just * for compatibility with older programs. Dirrect access to it's fields * is not recommended, because you might surfer to problems with future * releases of AA-lib. Use standard AA-lib functions instead. */ struct aa_context { __AA_CONST struct aa_driver *driver; /*Current display driver */ __AA_CONST struct aa_kbddriver *kbddriver; /*Current keyboard driver */ __AA_CONST struct aa_mousedriver *mousedriver; /*Current mouse driver */ struct aa_hardware_params __AA_NOALIGN params; /*Parameters of output hardware used by AA-lib. */ struct aa_hardware_params __AA_NOALIGN driverparams; /*Parameters of output hardware as reported by display driver. */ int mulx, muly; /* Ratio of character size over pixel size */ int imgwidth, imgheight; /* Dimensions of emulated image */ unsigned char *imagebuffer; /* Virtual buffer containing image */ unsigned char *textbuffer; /* Virtual buffer containing text */ unsigned char *attrbuffer; /* Virtual buffer containing attributes */ unsigned short *table; /* Precalculated values used by rendering algorithm. WARNING! It is _strongly_ depreached to access fields behind this point, because they can change in future releases.*/ unsigned short *filltable; struct parameters *parameters; int cursorx, cursory, cursorstate; /* Cursor possition. */ int mousex, mousey, buttons,mousemode; /* Mouse state. */ void (*resizehandler) (struct aa_context *); /* Handler to be called when resize happends. */ void *driverdata; /* Internal data used by hardware drivers. */ void *kbddriverdata; void *mousedriverdata; }; /* * The hardware driver specification. Used internally by AA-lib only. * Provided for compatibility with older programs. */ struct aa_driver { __AA_CONST char *shortname, *name; int (*init) (__AA_CONST struct aa_hardware_params *, __AA_CONST void *, struct aa_hardware_params *,void **); void (*uninit) (struct aa_context *); void (*getsize) (struct aa_context *, int *, int *); void (*setattr) (struct aa_context *, int); void (*print) (struct aa_context *, __AA_CONST char *); void (*gotoxy) (struct aa_context *, int, int); void (*flush) (struct aa_context *); void (*cursormode) (struct aa_context *, int); }; /* * The hardware driver specification. Used internally by AA-lib only. * Provided for compatibility with older programs. */ struct aa_kbddriver { __AA_CONST char *shortname, *name; int flags; int (*init) (struct aa_context *, int mode); void (*uninit) (struct aa_context *); int (*getkey) (struct aa_context *, int); }; /* * The hardware driver specification. Used internally by AA-lib only. * Provided for compatibility with older programs. */ struct aa_mousedriver { __AA_CONST char *shortname, *name; int flags; int (*init) (struct aa_context *, int mode); void (*uninit) (struct aa_context *); void (*getmouse) (struct aa_context *, int *, int *, int *); void (*cursormode) (struct aa_context *,int); }; /* * Parameters used for rendering. */ struct aa_renderparams { int bright; /* Brighness in range 0 (normal) to 255 (white) */ int contrast; /* Contrast value in range 0 (normal) to 127 (white) */ float gamma __AA_ALIGN; /* Gama value in the standard range */ enum aa_dithering_mode dither; /* Dithering algorithm */ int inversion; /* Set 1 for inversed terminals (black on white) */ int randomval; /* Range of random value added to each pixel. Used to crate random dithering effect. */ }; struct aa_font { __AA_CONST unsigned char *data; /* Bitmap of 8xheight font. */ int height; /* Height of font. */ __AA_CONST char *name; /* Long name of font. */ __AA_CONST char *shortname; /* One-word name of the font. */ }; /* * Output format specification used by aa_save driver. */ struct aa_format { int width, height; int pagewidth, pageheight; int flags; int supported; __AA_CONST struct aa_font *font; __AA_CONST char *formatname; __AA_CONST char *extension; /*fields after this line may change in future versions*/ __AA_CONST char *head; __AA_CONST char *end; __AA_CONST char *newline; __AA_CONST char * __AA_CONST prints[AA_NATTRS]; __AA_CONST char * __AA_CONST begin[AA_NATTRS]; __AA_CONST char * __AA_CONST ends[AA_NATTRS]; __AA_CONST char * __AA_CONST *conversions; }; /* * Initialization data used by aa_save driver. */ struct aa_savedata { char *name; /* Base name of the output file. The page number and extension is attached automatically. */ __AA_CONST struct aa_format *format; /* Format to save into. */ FILE *file; /* You might specify output file by field too, in case the name field is NULL*/ }; typedef struct aa_context aa_context; typedef struct aa_linkedlist aa_linkedlist; typedef struct aa_linkedlist aa_reclist; typedef struct aa_renderparams aa_renderparams; typedef struct aa_hardware_params aa_hardwareparams; typedef struct aa_driver aa_driver; typedef struct aa_font aa_font; typedef struct aa_format aa_format; typedef struct aa_savedata aa_savedata; typedef int aa_palette[256]; /* * AA-lib driver used to save ascii-art image into file in used specified format. * Initialize this driver using aa_init function and specify the driver * dependent parameters in aa_savedata structure to save image into file. * See the texinfo documentation for details. */ extern __AA_CONST struct aa_driver save_d; /* * AA-lib memory driver. * Used to render ascii-art images into memory. * You might use this driver to render images into memory and then use your * own routines to handle them in case you want to avoid AA-lib's output * mechanizms. */ extern __AA_CONST struct aa_driver mem_d; /* * AA-lib help string for the default command line parser. */ extern __AA_CONST char * __AA_CONST aa_help; /* * NULL terminated array of save formats supported by AA-lib. */ extern __AA_CONST struct aa_format * __AA_CONST aa_formats[]; extern __AA_CONST struct aa_format aa_nhtml_format, aa_html_format, aa_html_alt_format, aa_ansi_format, aa_text_format, aa_more_format, aa_hp_format, aa_hp2_format, aa_irc_format, aa_zephyr_format, aa_htmlk_format; /* * Null-terminated array of available fonts. */ extern __AA_CONST struct aa_font *aa_fonts[]; extern __AA_CONST struct aa_font aa_font8, aa_font14, aa_font16, aa_font9, aa_fontline, aa_fontgl, aa_fontX13, aa_fontX16, aa_fontX13B, aa_fontcourier, aa_fontvyhen; /* * Names of dithering methods supported by AA-lib. * NULL terminated array containing the names of supported dithering methods * as ascii strings. */ extern __AA_CONST char * __AA_CONST aa_dithernames[]; /* * NULL-terminated array of output drivers available in AA-lib. */ extern __AA_CONST struct aa_driver * __AA_CONST aa_drivers[]; extern __AA_CONST struct aa_driver curses_d, dos_d, linux_d, slang_d, stdout_d, stderr_d, X11_d, os2vio_d; /* * NULL-terminated array of keyboard drivers available in AA_lib. */ extern __AA_CONST struct aa_kbddriver * __AA_CONST aa_kbddrivers[]; extern __AA_CONST struct aa_kbddriver kbd_curses_d, kbd_slang_d, kbd_stdin_d, kbd_dos_d, kbd_X11_d, kbd_os2_d, kbd_linux_d; /* * NULL terminated array of mouse drivers supported by AA-lib. */ extern __AA_CONST struct aa_mousedriver * __AA_CONST aa_mousedrivers[]; extern __AA_CONST struct aa_mousedriver mouse_curses_d, mouse_gpm_d, mouse_X11_d, mouse_dos_d, mouse_os2_d; /* * List of recommended drivers. * List of recommended drivers is used by aa_autoinit familly of functions * and altered by aa_recommend familly of functions. */ extern aa_linkedlist *aa_kbdrecommended, *aa_mouserecommended, *aa_displayrecommended; /* * default hardware paramters requested by AA-lib programs. Pa * Default hardware paramters requested by AA-lib programs. Passed to aa_init * function familly. */ extern struct aa_hardware_params aa_defparams; /* * default rendering parameters. * Default rendering parameters. Passed to aa_render function familly. */ extern struct aa_renderparams aa_defrenderparams; /* returns width of the output screen in characters. */ int aa_scrwidth( /* Specifies the AA-lib context to operate on. */ aa_context *a); /* returns height of the output screen in characters. */ int aa_scrheight( /* Specifies the AA-lib context to operate on. */ aa_context *a); /* returns width of the output screen in millimeters. */ int aa_mmwidth( /* Specifies the AA-lib context to operate on. */ aa_context *a); /* returns height of the output screen in millimeters. */ int aa_mmheight( /* Specifies the AA-lib context to operate on. */ aa_context *a); /* returns width of the emulated image in pixels. */ int aa_imgwidth( /* Specifies the AA-lib context to operate on. */ aa_context *a); /* returns height of the emulated image in pixels. */ int aa_imgheight( /* Specifies the AA-lib context to operate on. */ aa_context *a); /* * returns pointer to the framebuffer emulated by AA-lib. * The framebuffer is simple array of characters specifying * the brightness value (or palette index depending on the aa_render * call). The array is organizated in the aa_imgheight (a) rows of * aa_imgwidth(a) characters. * Returns pointer to framebuffer emulated by AA-lib. */ char *aa_image( /* Specifies the AA-lib context to operate on. */ aa_context *a); /* * returns pointer to the text output buffer used by AA-lib. * The text output buffer is simple array of characters specifying * the ascii-value of the characters. * The array is organizated in the aa_scrheight (a) rows of * aa_scrwidth(a) characters. * * Returns pointer the text output buffer used by AA-lib. */ char *aa_text( /* Specifies the AA-lib context to operate on. */ aa_context *a); /* * returns pointer to the text output buffer used by AA-lib. * The attribute output buffer is simple array of characters specifying * the attributes. * The array is organizated in the aa_scrheight (a) rows of * aa_scrwidth(a) characters. * * Returns pointer the text output buffer used by AA-lib. */ char *aa_attrs( /* Specifies the AA-lib context to operate on. */ aa_context *a); /* * returns specification of the fonts used by AA-lib rendering routines. */ __AA_CONST struct aa_font *aa_currentfont( /* Specifies the AA-lib context to operate on. */ aa_context *a); /* * easy to use AA-lib initialization function. * Attempts to find available output driver supporting the specified * parameters. First attempts to initialize the recommended drivers * and then in order drivers available in the aa_drivers array * (all regular output drivers compiled into AA-lib). * Returns pointer to initialized context structure when succesfull or * NULL on failure. */ aa_context *aa_autoinit( /* Hardware parameters you want. Use aa_defparams for default values. */ __AA_CONST struct aa_hardware_params *params); /* * easy to use AA-lib keyboard initialization function. * Attempts to find available keyboard driver supporting the specified * mode. First attempts to initialize the recommended drivers * and then in order drivers available in the aa_kbddrivers array * (all regular output drivers compiled into AA-lib). * * Every AA-lib program ought to have call to aa_parseoptions before * first call to aa_init. * * Returns 1 when succesfull or 0 on failure. */ int aa_autoinitkbd( /* Specifies the AA-lib context to operate on. */ struct aa_context *context, /* Mask of extra features you request. Can contain AA_SENDRELEASE if you are interested in release events too. */ int mode); /* * easy to use AA-lib mouse initialization function. * Attempts to find available mouse driver supporting the specified * mode. First attempts to initialize the recommended drivers * and then in order drivers available in the aa_kbddrivers array * (all regular output drivers compiled into AA-lib). * Returns 1 when succesfull or 0 on failure. */ int aa_autoinitmouse( /* Specifies the AA-lib context to operate on. */ struct aa_context *c, /* Mask of extra features you request. No such features are available in the current AA-lib version. */ int mode); /* insert the given driver on beggining of the list of recommended drivers. */ void aa_recommendhi( /* List to operate on (aa_displayrecommended, aa_kbdrecommended or aa_mouserecommended) */ aa_linkedlist ** l, /* Name of the driver (ought to match the "shortname" field of the driver definition structure). */ __AA_CONST char *name); /* Add the given driver to the end of list of recommended drivers. */ void aa_recommendlow( /* List to operate on (aa_displayrecommended, aa_kbdrecommended or aa_mouserecommended) */ aa_linkedlist ** l, /* Name of the driver (ought to match the "shortname" field of the driver definition structure). */ __AA_CONST char *name); char *aa_getfirst(aa_linkedlist ** l); /*init functions */ /* * open the output display for AA-lib. * This is the most primitive AA-lib initialization function. * Allows better control over the process than the easier to use * aa_autoinit function. * * Every AA-lib program ought to have call to aa_parseoptions before * first call to aa_init. * * returns pointer to new AA-lib context or NULL if failed. */ aa_context *aa_init( /* Driver you want to use. Available drivers are listed in the NULL terminated aa_drivers array. */ __AA_CONST struct aa_driver *driver, /* Hardware parameters you want. Use aa_defparams for default values. */ __AA_CONST struct aa_hardware_params *defparams, /* This pointer is passed dirrectly to driver used to specify additional driver dependent parameters. */ __AA_CONST void *driverdata); /* * initialize the AA-lib keyboard driver. * This is the most primitive AA-lib keyboard initialization function. * Allows better control over the process than the easier to use * aa_autoinitkbd function. * returns 1 on success and 0 on fail. */ int aa_initkbd( /* Specifies the AA-lib context to operate on. */ struct aa_context *context, /* Driver you wish to use */ __AA_CONST struct aa_kbddriver *drv, /* Mask of extra features you request. Can contain AA_SENDRELEASE if you are interested in release events too. */ int mode); /* * initialize the AA-lib mouse driver. * This is the most primitive AA-lib keyboard initialization function. * Allows better control over the process than the easier to use * aa_autoinitmouse function. * returns 1 on success and 0 on fail. */ int aa_initmouse( /* Specifies the AA-lib context to operate on. */ struct aa_context *c, /* Driver you wish to use. */ __AA_CONST struct aa_mousedriver *d, /* Mask of extra features you request. No such features are available in the current AA-lib version. */ int mode); /*uninicializing functions */ /* * close the AA-lib context. * Uninitialize all activated drivers and frees the memory used by context * structures. */ void aa_close(aa_context * c /* Specifies the AA-lib context to operate on. */ ); /* * uninitialize the keyboard driver. * Calls "uninitialize" function of the keyboard driver. It ought to undo * all actions done by "initialize" function. */ void aa_uninitkbd( /* Specifies the AA-lib context to operate on. */ aa_context *context); /* * uninitialize the mouse driver. * Calls "uninitialize" function of the mouse driver. It ought to undo * all actions done by "initialize" function. */ void aa_uninitmouse( /* Specifies the AA-lib context to operate on. */ aa_context *context); /* simple and fast AA-lib rendering function. * This function does the trick of converting the emulated framebuffer * into high quality ASCII-art. It is slightly faster and less flexible * the aa_render function. * * Note that to see the effect you need to call aa_flush too. * * First call to this function may take a while, because the rendering * tables are produced. */ void aa_fastrender( /* Specifies the AA-lib context to operate on. */ aa_context * c, /* column of top left coner of rendered area (in characters!) */ int x1, /* row of top left coner of rendered area */ int y1, /* column of bottom right coner of rendered area */ int x2, /* row of bottom right coner of rendered area */ int y2); /* convert image buffer to ASCII-art. * This function does the trick of converting the emulated framebuffer * into high quality ASCII-art. If you want to be really fast, you might * use aa_fastrender. If you want to emulate palette, use aa_renderpalette. * * Note that to see the effect you need to call aa_flush too. * * First call to this function may take a while, because the rendering * tables are produced. */ void aa_render( /* Specifies the AA-lib context to operate on. */ aa_context * c, /* Rendering parametters used to specify brightness, gamma correction and other usefull stuff. Use aa_defrenderparams for default values. */ __AA_CONST aa_renderparams * p, /* column of top left coner of rendered area (in characters!) */ int x1, /* row of top left coner of rendered area */ int y1, /* column of bottom right coner of rendered area */ int x2, /* row of bottom right coner of rendered area */ int y2); void aa_renderpalette(aa_context * c, __AA_CONST aa_palette table, __AA_CONST aa_renderparams * p, int x1, int y1, int x2, int y2); aa_renderparams *aa_getrenderparams(void); void aa_flush(aa_context * c); /* output string to AA-lib output buffers. Output given string to AA-lib output buffers. To see the effect you need to call aa_flush too. */ void aa_puts( /* Specifies the AA-lib context to operate on. */ aa_context * c, /* X coordinate of the first character. */ int x, /* Y coordinate of the first character. */ int y, /* Attribute to use. */ enum aa_attribute attr, /* String to output. */ __AA_CONST char *s); /* * print text to AA-lib output buffers. * Print given text to AA-lib output buffers. To see the effect you need to * call aa_flush too. */ int aa_printf( /* Specifies the AA-lib context to operate on. */ aa_context * c, /* X coordinate of the first character. */ int x, /* Y coordinate of the first character. */ int y, /* Attribute to use. */ enum aa_attribute attr, /* Text to output in standard printf format. */ __AA_CONST char *fmt, ...); /* * move the hardware cursor (if any) to specified position. * Move the hardware cursor (if any) to specified position. * To see the effect you need to call aa_flush too. */ void aa_gotoxy( /* Specifies the AA-lib context to operate on. */ aa_context * c, /* X coordinate of new position. */ int x, /* Y coordinate of the position. */ int y); /* * hide the hardware cursor. * Hide the hardware cursor. * This function may be ignored by some drivers. */ void aa_hidecursor( /* Specifies the AA-lib context to operate on. */ aa_context * c); /* * show the hardware cursor. * Show the hardware cursor. * This function may not be ignored by some drivers. */ void aa_showcursor( /* Specifies the AA-lib context to operate on. */ aa_context * c); /* * Get mouse position as specified by last mouse event read by aa_getevent. */ void aa_getmouse( /* Specifies the AA-lib context to operate on. */ aa_context * c, /* Used to return X coordinate of mouse in characters. */ int *x, /* Used to return Y coordinate of mouse in characters. */ int *y, /* Used to return button mask of mouse. (values used are AA_BUTTON1, AA_BUTTON2 and AA_BUTTON3)*/ int *b); /* * hide the mouse cursor. * Hide the mouse cursor. * This function may be ignored by some drivers. */ void aa_hidemouse(aa_context *c); /* * show the mouse cursor. * Show the mouse cursor. * This function may be ignored by some drivers. */ void aa_showmouse(aa_context *c); /* * add new font specification to aa_fonts array. * Returns 1 when succesfull or 0 on failure. */ int aa_registerfont( /* Font specification structure. */ __AA_CONST struct aa_font *f); /* * alter the "supported" field of hardware_params structure used by AA-lib * This function can be used to alter "supported" field of hardware-params * structure used by AA-lib. */ void aa_setsupported( /* Specifies the AA-lib context to operate on. */ aa_context * c, /* New mask of requested features. Can contain AA_EXTENDED to enable use of all 256 characters and AA_EIGHT to enable use of the character numbered higher than 127. */ int supported); /* set font specification to be used by rendering functions. */ void aa_setfont( /* Specifies the AA-lib context to operate on. */ aa_context * c, /* Font specification structure. */ __AA_CONST struct aa_font *font); /*keyboard functions */ /* return next event from queue. * Return next even from queue. Optionally wait for even when queue is * empty. * Returns next event from queue (values lower than 256 are used to report * ascii values of pressed keys and higher values have special meanings) * See the AA-lib texinfo documentation for more details. * 0 is returned when queue is empty and wait is set to 0. */ int aa_getevent( /* Specifies the AA-lib context to operate on. */ aa_context * c, /* 1 if you wish to wait for the even when queue is empty. */ int wait); /* return next keypress event from queue. * Returns next keypress event from queue (values lower than 256 are used * to report ascii values of pressed keys and higher values are used to * represent some special keys like arrows) * See the AA-lib texinfo documentation for more details. */ int aa_getkey( /* Specifies the AA-lib context to operate on. */ aa_context * c, /* 1 if you wish to wait for the even when queue is empty. */ int wait); /*resize functions */ /* * Do resize action. This function ought to be called when application * takes into account the AA_RESIZE event. The context is reinitialized * and set to new sizes. * Returns 0 when no resizing is done and 1 when resizing was succesfull. */ int aa_resize( /* Specifies the AA-lib context to operate on. */ aa_context * c); /* * Set user handler to be called on resize event. */ void aa_resizehandler( /* Specifies the AA-lib context to operate on. */ aa_context * c, /* Function to be called when resize happends. */ void (*handler) (aa_context *)); /* * parse the standard command line options used by AA-lib. * Use this function to parse the standard command line options used by * AA-lib. Every AA-lib program ought to call this function to let user * specify some extra parameters. The function alters the aa_hardware_params * and aa_renderparams structures and removes known options from the * argc/argv lists. It also parse the AAOPTS environment variable. * When called with NULL for the argc/argv parameters, it parses AAOPTS * only. At least this call ought to be in every AA-lib program. * Returns 1 when sucesfull and 0 on failure. The program then can * print the help text available in aa_help variable. */ int aa_parseoptions( /* Hardware parameters structure to alter. It is expected * that this structure only with necessary modifications * will be later used to initialize the AA-lib context. */ struct aa_hardware_params *p, /* Rendering prameters structure to alter. It is expected * that this structure only with necessary modifications * will be later used to render images. */ aa_renderparams * r, /* Pointer to argc parameter passed to function "main". */ int *argc, /* Pointer to argv parameter passed to function "main". */ char **argv); /* * Simple interactive line editor. * This function produces the simple interactive line editor that can * be used by AA-lib programs to input strings. */ void aa_edit( /* Specifies the AA-lib context to operate on. */ aa_context * c, /* X coordinate of the edited text. */ int x, /* Y coordinate of the edited text. */ int y, /* Length of the editor window. */ int size, /* Buffer to edit (containing default value). */ char *s, /* Size of the buffer. */ int maxsize); /* * Simple interactive line editor provided as helper function. * * You might use this function to input strings in AA-lib programs. * This function initializes the aa_edit structure used by event-based * editor. You might then call the aa_editkey function when key is pressed. * * Returns pointer to edit context when succesfull and NULL on failure. */ struct aa_edit *aa_createedit( /* Specifies the AA-lib context to operate on. */ aa_context * c, /* X coordinate of the edited text. */ int x, /* Y coordinate of the edited text. */ int y, /* Length of the editor window. */ int size, /* Buffer to edit (containing default value). */ char *s, /* Size of the buffer. */ int maxsize); /* Notify the line editor about keypress. */ void aa_editkey( /* Editor context to use (see aa_createedit) */ struct aa_edit *e, /* Key pressed */ int c); /* * put pixel to emulated framebuffer */ void aa_putpixel( /* Specifies the AA-lib context to operate on. */ aa_context * c, /* X coordinate. */ int x, /* Y coordinate. */ int y, /* Palette index or brightness value (0..255) */ int color); /* insert the given driver on beggining of the list of recommended keyboard drivers. */ void aa_recommendhikbd( /* Name of the driver (ought to match the "shortname" field of the driver definition structure). */ __AA_CONST char *name); /* Add the given driver to the end of list of keyboard recommended drivers. */ void aa_recommendlowkbd( /* Name of the driver (ought to match the "shortname" field of the driver definition structure). */ __AA_CONST char *name); /* insert the given driver on beggining of the list of recommended mouse drivers. */ void aa_recommendhimouse( /* Name of the driver (ought to match the "shortname" field of the driver definition structure). */ __AA_CONST char *name); /* Add the given driver to the end of list of mouse recommended drivers. */ void aa_recommendlowmouse( /* Name of the driver (ought to match the "shortname" field of the driver definition structure). */ __AA_CONST char *name); /* insert the given driver on beggining of the list of recommended display drivers. */ void aa_recommendhidisplay( /* Name of the driver (ought to match the "shortname" field of the driver definition structure). */ __AA_CONST char *name); /* Add the given driver to the end of list of display recommended drivers. */ void aa_recommendlowdisplay( /* Name of the driver (ought to match the "shortname" field of the driver definition structure). */ __AA_CONST char *name); /* This macro implementations are proved for faster compilation. */ #ifdef __GNUC__ /* The putpixel macro can be implemented reliably only using GNU-C extension. */ #define aa_putpixel(c,x,y,color) ({aa_context *___aa_context=(c); ((___aa_context)->imagebuffer[(x)+(y)*(aa_imgwidth(___aa_context))]=(color)); 0;}) #endif #define aa_setpalette(palette,index,r,g,b) ((palette)[index]=(((r)*30+(g)*59+(b)*11)>>8)) #define aa_recommendhikbd(t) aa_recommendhi(&aa_kbdrecommended,t); #define aa_recommendhimouse(t) aa_recommendhi(&aa_mouserecommended,t); #define aa_recommendhidisplay(t) aa_recommendhi(&aa_displayrecommended,t); #define aa_recommendlowkbd(t) aa_recommendlow(&aa_kbdrecommended,t); #define aa_recommendlowmouse(t) aa_recommendlow(&aa_mouserecommended,t); #define aa_recommendlowdisplay(t) aa_recommendlow(&aa_displayrecommended,t); #define aa_scrwidth(a) ((a)->params.width) #define aa_scrheight(a) ((a)->params.height) #define aa_mmwidth(a) ((a)->params.mmwidth) #define aa_mmheight(a) ((a)->params.mmheight) #define aa_imgwidth(a) ((a)->imgwidth) #define aa_imgheight(a) ((a)->imgheight) #define aa_image(c) ((c)->imagebuffer) #define aa_text(c) ((c)->textbuffer) #define aa_attrs(c) ((c)->attrbuffer) #ifdef __cplusplus } #endif #endif aalib-1.4.0/src/config.dos0000644000766200001440000000102507272031253011013 #ifndef CONFIG_H #define CONFIG_H /* #undef HAVE_SELECT */ /* #undef HAVE_REDRAWWIN */ /* #undef HAVE_WREDRAWLN */ /* #undef USE_NCURSES */ /* #undef inline */ /* #undef const */ /* #undef _POSIX_SOURCE */ #define STDC_HEADERS 1 #define TIME_WITH_SYS_TIME 1 /* #undef HAVE_TERMATTRS */ /* #undef HAVE_MOUSEMASK */ #define HAVE_STRDUP 1 #define HAVE_LIMITS_H 1 #define HAVE_SYS_TIME_H 1 #define HAVE_SYS_IOCTL_H 1 #define HAVE_UNISTD_H 1 #define HAVE_FCNTL_H 1 #define HAVE_MALLOC_H 1 #define CONST const #define INLINE inline #endif aalib-1.4.0/src/config.os20000644000766200001440000000174607272031253010743 /* config.h. Generated automatically by configure. */ #ifndef CONFIG_H #define CONFIG_H /* #undef HAVE_SELECT */ /* #undef HAVE_REDRAWWIN */ /* #undef HAVE_WREDRAWLN */ /* #undef USE_NCURSES */ /* #undef inline */ /* #undef const */ /* #undef _POSIX_SOURCE */ #define STDC_HEADERS 1 #define TIME_WITH_SYS_TIME 1 /* #undef HAVE_TERMATTRS */ /* #undef HAVE_CURS_SET */ /* #undef HAVE_MOUSEMASK */ #define HAVE_STRDUP 1 #define HAVE_LIMITS_H 1 #define HAVE_SYS_TIME_H 1 #define HAVE_SYS_IOCTL_H 1 #define HAVE_UNISTD_H 1 #define HAVE_FCNTL_H 1 #define HAVE_MALLOC_H 1 /* #undef CURSES_DRIVER */ /* #undef X11_DRIVER */ /* #undef SLANG_DRIVER */ /* #undef LINUX_DRIVER */ /* #undef CURSES_KBDDRIVER */ /* #undef X11_KBDDRIVER */ /* #undef SLANG_KBDDRIVER */ /* #undef CURSES_MOUSEDRIVER */ /* #undef GPM_MOUSEDRIVER */ /* #undef X11_MOUSEDRIVER */ #define OS2_DRIVER #define OS2_KBDDRIVER #define OS2_MOUSEDRIVER #define CONST const #define INLINE inline #endif aalib-1.4.0/src/Makefile.dos0000644000766200001440000000446207272031253011273 CC = gcc #CFLAGS = -O6 -m486 -fstrength-reduce -ffast-math -fomit-frame-pointer -fforce-mem -fforce-addr -I../text -Wall -funroll-loops CFLAGS = -O2 -m486 -fstrength-reduce -ffast-math -fomit-frame-pointer -I../text -Wall # -funroll-loops #CFLAGS = -O6 -m486 -fstrength-reduce -ffast-math -fomit-frame-pointer -fforce-mem -fforce-addr -funroll-loops -I/usr/include/ncurses -I/usr/X11R6/include -Wall #CFLAGS = -O6 -m486 -fstrength-reduce -ffast-math -fforce-mem -fforce-addr -funroll-loops -I/usr/include/ncurses -I/usr/X11R6/include -Wall -pg #CFLAGS = -I/usr/include/ncurses -I/usr/X11R6/include -Wall -g LIBS = libaa.a ../text/libtext.a ../vga/libvga.a LFLAGS = INCL = config.h \ SRCS = aafont.c \ aafonts.c \ aastdout.c \ aastdin.c \ aamem.c \ aadosmou.c \ aaprintf.c \ aarec.c \ aahelp.c \ fontcour.c \ aamktable.c \ aafastrender.c \ fontgl.c \ font14.c \ aakbdreg.c \ aamoureg.c \ font16.c \ fontx13.c \ fontx13b.c \ fontx16.c \ aaflush.c \ font9.c \ font8.c \ fontline.c \ aados.c \ aalib.c \ aarender.c \ aain.c \ aaout.c \ aadoskbd.c \ aaedit.c \ aaregistry.c \ aasave.c \ aaparse.c \ aaimgwidth.c \ aaimgheight.c \ aascrwidth.c \ aascrheight.c \ aammwidth.c \ aammheight.c \ aaimage.c \ aatext.c \ aacurrfnt.c \ aaattrs.c \ aaputpixel.c \ aarecfunc.c OBJS = $(SRCS:.c=.o) all: libaa.a aatest aafire aainfo config.h: copy config.dos config.h libaa.a: config.h $(OBJS) rm -f libaa.a ar rcs libaa.a $(OBJS) aatest: aatest.o libaa.a $(CC) $(CFLAGS) $(LFLAGS) -o aatest aatest.o $(LIBS) aafire: aafire.o libaa.a $(CC) $(CFLAGS) $(LFLAGS) -o aafire aafire.o $(LIBS) aainfo: aainfo.o libaa.a $(CC) $(CFLAGS) $(LFLAGS) -o aainfo aainfo.o $(LIBS) clean: rm -f libaa.a aatest fire info rm -f core `find . -name '*.[oas]' -print` rm -f core `find . -name '*~' -print` rm -f core `find . -type f -name 'core' -print` distclean:clean rm aconfig.h config.log config.status config.cache Makefile aalib-1.4.0/src/Makefile.os20000644000766200001440000000475607272031253011217 # Generated automatically from Makefile.in by configure. CC = gcc CFLAGS = -O6 -m486 -fstrength-reduce -ffast-math -fomit-frame-pointer -funroll-loops LIBS = libaa.a -lm LFLAGS = prefix= /usr/local exec_prefix= ${prefix} datadir= ${prefix}/share bindir= ${exec_prefix}/bin libdir= ${exec_prefix}/lib includedir= ${prefix}/include mandir= ${prefix}/man infodir= ${prefix}/info INCL = config.h OBJS = aaos2.o \ aaos2kbd.o \ aaos2mou.o \ aafont.o \ aafonts.o \ aamktabl.o \ aamem.o \ aahelp.o \ aaprintf.o \ aafastre.o \ fontgl.o \ font16.o \ font14.o \ fontx16.o \ fontx13.o \ fontx13b.o \ fontcour.o \ aarec.o \ font9.o \ font8.o \ fontline.o \ aalib.o \ aaflush.o \ aarender.o \ aaout.o \ aain.o \ aaedit.o \ aaregist.o \ aakbdreg.o \ aamoureg.o \ aasave.o \ aastdout.o \ aastdin.o \ aaparse.o \ aaimgwidth.c \ aaimgheight.c \ aascrwidth.c \ aascrheight.c \ aammwidth.c \ aammheight.c \ aaimage.c \ aatext.c \ aacurrfnt.c \ aaattrs.c \ aaputpixel.c \ aarecfunc.c all: libaa.a aatest.exe fire.exe savefont.exe info.exe config.h: config.os2 cp config.os2 config.h libaa.a: config.h $(OBJS) rm -f libaa.a ar rcs libaa.a $(OBJS) aatest.exe: aatest.o libaa.a $(CC) $(CFLAGS) $(LFLAGS) -o aatest.exe aatest.o $(LIBS) aafire.exe: aafire.o libaa.a $(CC) $(CFLAGS) $(LFLAGS) -o aafire.exe aafire.o $(LIBS) aasavefont.exe: aasavefont.o libaa.a $(CC) $(CFLAGS) $(LFLAGS) -o aasavefont.exe aasavefont.o $(LIBS) aainfo.exe: aainfo.o libaa.a $(CC) $(CFLAGS) $(LFLAGS) -o aainfo.exe aainfo.o $(LIBS) install: libaa.a ./install-sh -c -d $(libdir) ./install-sh -c -d $(includedir) ./install-sh -c -d $(infodir) ./install-sh -c -m 444 libaa.a $(libdir) ./install-sh -c -m 444 aalib.h $(includedir) ./install-sh -c -m 444 doc/aalib.info $(infodir) clean: rm -f libaa.a aatest.exe fire.exe info.exe savefont.exe rm -f core *.o *.a *.s *.~ distclean: clean rm config.h config.log config.status config.cache makefile #dep: # rm -f .depend # make .depend # #.depend: # echo '# Program dependencies' >.depend # gcc -I svgalib $(DEFINES) -MM $(patsubst %.o,%.c,$(OBJS)) >>.depend #include .depend aalib-1.4.0/src/aados.c0000644000766200001440000001541307272031253010300 #include #include #include #include #include #include #include #include #include "aalib.h" #include "aaint.h" int __use_nearptr_hack; struct aa_driver dos_d; static int mode; static int direction; #define addmode(mode,x,y) { \ nmodes++; \ lastmode=mode; \ if(width) { \ if(abs(p->width-x)+abs(p->height-y)width-x)+abs(p->height-y);\ } \ if(abs(recwidth-x)+abs(recheight-y)width || p->height) { if (p->width) width = p->width; else width = 80; if (p->height) width = p->height; else height = 80; } if (p->recwidth) recwidth = p->recwidth; if (p->recheight) recwidth = p->recheight; memset(modes, 0, 53); TxInit(); again:; if (!noprint) printf("Please select internal resolution\n\n"); if (!noprint) printf("VGA modes\n"); for (i = 0;; i++) { if (!noprint && i == 45) printf("\n\nVESA modes\n"); TxGetModeInfo(i, &x, &y); if (x < 0) break; if (x) { if (aa_validmode(x, y, p)) { if (!noprint) printf("%2i (= %03ix%03i),\t", i, x * 2, y * 2); modes[i] = 1; addmode(i, x, y); } } } if (aa_validmode(80, 25, p)) { if (!noprint) printf("\n\n50 - MDA\t51 - Dual monitor mode\t"); modes[50] = 1, modes[51] = 1; addmode(50, 80, 25); addmode(51, 80, 25); } if (aa_validmode(160, 25, p)) { if (!noprint) printf("52 - Dual monitor mode plus"); modes[52] = 1; addmode(51, 160, 25); } if (!noprint) printf("\n"); mode = 1; if (!xd) mode = bestmode; else { if (nmodes == 1) mode = lastmode; else { if (noprint) { if (!nmodes) return 0; noprint = 0; goto again; } printf("\b\b\nSelect resolution (press enter to set default resolution): "); do { char c[256]; gets(c); mode = -1; sscanf(c, "%i", &mode); if (mode == -1) { if (recmode >= 0) mode = recmode; else mode = 11; break; } } while (mode < 0 || mode >= 53 || !modes[mode]); } } if (mode == 52) { printf("1-MDA is at the left\t2-MDA is at the right\n"); do { scanf("%i", &direction); } while (direction < 1 || direction > 2); } if (mode < 50) { if (TxSetMode(mode) == -1) { printf("Inicialization failed\n"); return 0; } font.height = GetFontHeight(); font.data = fdata = malloc(font.height * 256); font.name = "Font used by your vgacard"; font.shortname = "current"; data = malloc(0x10000); TxGetFont(data); for (i = 0; i < 256; i++) { int y; for (y = 0; y < font.height; y++) fdata[i * font.height + y] = data[i * 32 + y]; } free(data); aa_registerfont(&font); dest->font = &font; } else { dest->font = &aa_font14; dest->supported = AA_NORMAL_MASK | AA_REVERSE_MASK | AA_BOLD_MASK | AA_EXTENDED; if (mode > 50) TxSetMode(7); } if (mode == 52) dest->mmwidth = 290 * 2; aa_recommendlowkbd("dos"); return 1; } static void dos_uninit(aa_context * c) { if (mode != 50) TxUninit(); } static void dos_getsize(aa_context * c, int *width, int *height) { if (mode < 50) { *width = /*info.screenwidtah */ TxMaxx() + 1; *height = /*info.screenheight */ TxMaxy() + 1; } else { *width = 80; *height = 25; if (mode == 52) (*width) *= 2; } } static void mymovedata(char *c1, int d, int l) { if (!__use_nearptr_hack) { movedata(_my_ds(), (int) c1, _dos_ds, d, l); } else { /*__djgpp_nearptr_enable();*/ memcpy(__djgpp_conventional_base + (char *) d, c1, l); /*__djgpp_nearptr_disable();*/ } } static void dos_flush(aa_context * c) { /*ugly..but better than previous one :) */ int x, end = aa_scrwidth(c) * aa_scrheight(c); char buffer[aa_scrwidth(c) * aa_scrheight(c) * 2], *pos; unsigned char data[] = {0x07, 0x08, 0x0f, 0x0f, 0x70, 0x17}; /*pos=__djgpp_conventional_base+0xB8000; */ pos = buffer; for (x = 0; x < end; x++) { *(pos++) = c->textbuffer[x]; /*if (c->attrbuffer[x] < 7) */ *(pos++) = data[c->attrbuffer[x]]; /*else *(pos++)=0x27; */ } if (mode == 52) { for (x = 0; x < end; x += 160) { if (direction == 2) { mymovedata(&buffer[x * 2], 0xb8000 + x, 160), mymovedata(&buffer[x * 2 + 160], 0xb0000 + x, 160); } else { mymovedata(&buffer[x * 2], 0xb0000 + x, 160), mymovedata(&buffer[x * 2 + 160], 0xb8000 + x, 160); } } } else { if (mode != 50) mymovedata(&buffer[0], 0xb8000, aa_scrwidth(c) * aa_scrheight(c) * 2); if (mode >= 50) mymovedata(&buffer[0], 0xb0000, aa_scrwidth(c) * aa_scrheight(c) * 2); } /*dosmemput(buffer,aa_scrwidth(c)*aa_scrheight(c)*2,0xB8000); */ } static void mono_gotoxy(int x, int y) { unsigned short addr=y*TxScreenSizex()+x; asm (" movw %0,%%bx movb %%bh,%%ah movb $0x0e,%%al movw $0x3b4,%%dx outw %%ax,%%dx incb %%al movb %%bl,%%ah outw %%ax,%%dx " : :"r"(addr) :"%eax","%ebx","%edx" ); } static void dos_gotoxy(aa_context * c, int x, int y) { if (mode == 52) { if(x<80) { if(direction==2) TxGotoxy(x,y),mono_gotoxy(255,255); if(direction==1) TxGotoxy(255,255),mono_gotoxy(x,y); } else { if(direction==1) TxGotoxy(x-80,y),mono_gotoxy(255,255); if(direction==2) TxGotoxy(255,255),mono_gotoxy(x-80,y); } } else { if (mode != 50) TxGotoxy(x, y); if (mode>=50) mono_gotoxy(x,y); } } static void dos_cursor(aa_context *c,int mode1) { if(!mode1) { if(mode!=50) TxGotoxy(255,255); if(mode>=50) mono_gotoxy(255,255); } else dos_gotoxy(c,c->cursorx,c->cursory); #if 0 if(!mode) { TxSetCursor(22,24); } else { TxSetCursor(1,0); } #endif } __AA_CONST struct aa_driver dos_d = { "dos", "dos pc driver 1.0", dos_init, dos_uninit, dos_getsize, NULL, NULL, dos_gotoxy, dos_flush, dos_cursor }; aalib-1.4.0/src/aadoskbd.c0000644000766200001440000005405307272031253010764 #include #include #include #include #include #include #include #include #include #include #include #include "aalib.h" #include "aaint.h" #define FALSE 0 #define TRUE 1 #define END_OF_FUNCTION(x) void x##_end() { } #define LOCK_VARIABLE(x) _go32_dpmi_lock_data((void *)&x, sizeof(x)) #define LOCK_FUNCTION(x) _go32_dpmi_lock_code(x, (long)x##_end - (long)x) #define DISABLE() asm volatile ("cli") #define ENABLE() asm volatile ("sti") #define SCANCODE_TO_KEY(c) (key_ascii_table[c]) #define SCANCODE_TO_CAPS(c) (key_capslock_table[c]) #define SCANCODE_TO_SHIFT(c) (key_shift_table[c]) #define SCANCODE_TO_CONTROL(c) (key_control_table[c]) #define SCANCODE_TO_ALT(c) (0) #define KB_SHIFT_FLAG 1 #define KB_CTRL_FLAG 2 #define KB_ALT_FLAG 4 #define KB_LWIN_FLAG 8 #define KB_RWIN_FLAG 16 #define KB_MENU_FLAG 32 #define KB_SCROLOCK_FLAG 256 #define KB_NUMLOCK_FLAG 512 #define KB_CAPSLOCK_FLAG 1024 #define KB_INALTSEQ_FLAG 4096 #define KEY_ESC 1 /* keyboard scan codes */ #define KEY_1 2 #define KEY_2 3 #define KEY_3 4 #define KEY_4 5 #define KEY_5 6 #define KEY_6 7 #define KEY_7 8 #define KEY_8 9 #define KEY_9 10 #define KEY_0 11 #define KEY_MINUS 12 #define KEY_EQUALS 13 #define KEY_BACKSPACE 14 #define KEY_TAB 15 #define KEY_Q 16 #define KEY_W 17 #define KEY_E 18 #define KEY_R 19 #define KEY_T 20 #define KEY_Y 21 #define KEY_U 22 #define KEY_I 23 #define KEY_O 24 #define KEY_P 25 #define KEY_OPENBRACE 26 #define KEY_CLOSEBRACE 27 #define KEY_ENTER 28 #define KEY_CONTROL 29 #define KEY_LCONTROL 29 #define KEY_A 30 #define KEY_S 31 #define KEY_D 32 #define KEY_F 33 #define KEY_G 34 #define KEY_H 35 #define KEY_J 36 #define KEY_K 37 #define KEY_L 38 #define KEY_COLON 39 #define KEY_QUOTE 40 #define KEY_TILDE 41 #define KEY_LSHIFT 42 #define KEY_BACKSLASH 43 #define KEY_Z 44 #define KEY_X 45 #define KEY_C 46 #define KEY_V 47 #define KEY_B 48 #define KEY_N 49 #define KEY_M 50 #define KEY_COMMA 51 #define KEY_STOP 52 #define KEY_SLASH 53 #define KEY_RSHIFT 54 #define KEY_ASTERISK 55 #define KEY_ALT 56 #define KEY_SPACE 57 #define KEY_CAPSLOCK 58 #define KEY_F1 59 #define KEY_F2 60 #define KEY_F3 61 #define KEY_F4 62 #define KEY_F5 63 #define KEY_F6 64 #define KEY_F7 65 #define KEY_F8 66 #define KEY_F9 67 #define KEY_F10 68 #define KEY_NUMLOCK 69 #define KEY_SCRLOCK 70 #define KEY_HOME 71 #define KEY_UP 72 #define KEY_PGUP 73 #define KEY_MINUS_PAD 74 #define KEY_LEFT 75 #define KEY_5_PAD 76 #define KEY_RIGHT 77 #define KEY_PLUS_PAD 78 #define KEY_END 79 #define KEY_DOWN 80 #define KEY_PGDN 81 #define KEY_INSERT 82 #define KEY_DEL 83 #define KEY_F11 87 #define KEY_F12 88 #define KEY_LWIN 91 #define KEY_RWIN 92 #define KEY_MENU 93 #define KEY_PAD 100 #define KEY_RCONTROL 120 #define KEY_ALTGR 121 /* Most of code is borrowed from allegro - an grapics library for djgpp by * By Shawn Hargreaves, * 1 Salisbury Road, * Market Drayton, * Shropshire, * England, TF9 1AJ. * */ #define KEYBOARD_INT 9 #define KB_SPECIAL_MASK 0x3F #define KB_CTRL_ALT_FLAG (KB_CTRL_FLAG | KB_ALT_FLAG) static int three_finger_flag = TRUE; static int key_led_flag = TRUE; static int keyboard_installed = FALSE; static volatile char key[128]; /* key pressed flags */ static volatile int key_shifts = 0; __AA_CONST static short key_ascii_table[128] = { /* 0 1 2 3 4 5 6 7 8 9 A B C D E F */ 0, AA_ESC, '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '-', '=', AA_BACKSPACE, 9, /* 0 */ 'q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', '[', ']', 13, 0, 'a', 's', /* 1 */ 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', 39, '`', 0, 92, 'z', 'x', 'c', 'v', /* 2 */ 'b', 'n', 'm', ',', '.', '/', 0, '*', 0, ' ', 0, 3, 3, 3, 3, 8, /* 3 */ 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, '-', 0, 0, 0, '+', 0, /* 4 */ 0, 0, 0, 127, 0, 0, 92, 3, 3, 0, 0, 0, 0, 0, 0, 0, /* 5 */ 13, 0, '/', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 127, /* 6 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 /* 7 */ }; __AA_CONST static int key_capslock_table[128] = { /* 0 1 2 3 4 5 6 7 8 9 A B C D E F */ 0, AA_ESC, '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '-', '=', AA_BACKSPACE, 9, /* 0 */ 'Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', 'O', 'P', '[', ']', 13, 0, 'A', 'S', /* 1 */ 'D', 'F', 'G', 'H', 'J', 'K', 'L', ';', 39, '`', 0, 92, 'Z', 'X', 'C', 'V', /* 2 */ 'B', 'N', 'M', ',', '.', '/', 0, '*', 0, ' ', 0, 3, 3, 3, 3, 8, /* 3 */ 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, '-', 0, 0, 0, '+', 0, /* 4 */ 0, 0, 0, 127, 0, 0, 92, 3, 3, 0, 0, 0, 0, 0, 0, 0, /* 5 */ 13, 0, '/', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 127, /* 6 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 /* 7 */ }; __AA_CONST static int key_shift_table[128] = { /* 0 1 2 3 4 5 6 7 8 9 A B C D E F */ 0, AA_ESC, '!', '@', '#', '$', '%', '^', '&', '*', '(', ')', '_', '+', AA_BACKSPACE, 126, /* 0 */ 'Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', 'O', 'P', '{', '}', 126, 0, 'A', 'S', /* 1 */ 'D', 'F', 'G', 'H', 'J', 'K', 'L', ':', 34, '~', 0, '|', 'Z', 'X', 'C', 'V', /* 2 */ 'B', 'N', 'M', '<', '>', '?', 0, '*', 0, 1, 0, 1, 1, 1, 1, 1, /* 3 */ 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, '-', 0, 0, 0, '+', 0, /* 4 */ 0, 0, 1, 127, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, /* 5 */ 13, 0, '/', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 127, /* 6 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 /* 7 */ }; __AA_CONST static int key_control_table[128] = { /* 0 1 2 3 4 5 6 7 8 9 A B C D E F */ 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 127, 127, /* 0 */ 17, 23, 5, 18, 20, 25, 21, 9, 15, 16, 2, 2, 10, 0, 1, 19, /* 1 */ 4, 6, 7, 8, 10, 11, 12, 0, 0, 0, 0, 0, 26, 24, 3, 22, /* 2 */ 2, 14, 13, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, /* 3 */ 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 4 */ 0, 0, 2, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, /* 5 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 6 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 /* 7 */ }; __AA_CONST static int key_numlock_table[128] = { /* 0 1 2 3 4 5 6 7 8 9 A B C D E F */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 1 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 2 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 3 */ 0, 0, 0, 0, 0, 0, 0, '7', '8', '9', 0, '4', '5', '6', 0, '1', /* 4 */ '2', '3', '0', '.', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 5 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 6 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 /* 7 */ }; /* Mapping: 0 = Use the second value as scan char, just like before. 1 = Ignore the key. 2 = Use the scan but put the shift flags instead of the ASCII. other = Use this value as scancode. Extended values: E0 1C = Enter E0 1D = RCtrl => fake Ctrl E0 2A = ?????? generated in conjuntion with Insert!! E0 35 = \ E0 38 = AltGr or RAlt => fake Alt E0 46 = Ctrl-Pause E0 47 = Home E0 48 = Up E0 4B = Left E0 4D = Right E0 4F = End E0 50 = Down E0 51 = Page-Down E0 52 = Insert E0 53 = Delete */ __AA_CONST static int key_extended_table[128] = { /* 0 1 2 3 4 5 6 7 8 9 A B C D E F */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 120, 0, 0, /* 1 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, /* 2 */ 0, 0, 0, 0, 0, 0, 0, 0, 121, 0, 0, 0, 0, 0, 0, 0, /* 3 */ 0, 0, 0, 0, 0, 0, 2, 2,AA_UP, 2, 0,AA_LEFT,2,AA_RIGHT,0, 2, /* 4 */ AA_DOWN,2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 5 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 6 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 /* 7 */ }; __AA_CONST static int key_special_table[128] = { /* 0 1 2 3 4 5 6 7 8 9 A B C D E F */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, /* 1 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, /* 2 */ 0, 0, 0, 0, 0, 0, 1, 0, 4, 0,1024, 0, 0, 0, 0, 0, /* 3 */ 0, 0, 0, 0, 0, 512, 256, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 4 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 16, 32, 0, 0, /* 5 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 6 */ 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 0, 0, 0, 0, 0, 0 /* 7 */ }; #define KEY_BUFFER_SIZE 256 static volatile int key_buffer[KEY_BUFFER_SIZE]; static volatile int key_buffer_start = 0; static volatile int key_buffer_end = 0; static volatile int key_extended = 0; static volatile int key_pad_seq; /* add_key: * Helper function to add a keypress to the buffer. */ static inline void add_key(int c) { key_buffer[key_buffer_end] = c; key_buffer_end++; if (key_buffer_end >= KEY_BUFFER_SIZE) key_buffer_end = 0; if (key_buffer_end == key_buffer_start) { /* buffer full */ key_buffer_start++; if (key_buffer_start >= KEY_BUFFER_SIZE) key_buffer_start = 0; } } /* clear_keybuf: * Clears the keyboard buffer. */ static void clear_keybuf() { int c; DISABLE(); key_buffer_start = 0; key_buffer_end = 0; for (c=0; c<128; c++) key[c] = FALSE; ENABLE(); } /* keypressed: * Returns TRUE if there are keypresses waiting in the keyboard buffer. */ static int keypressed() { if (key_buffer_start == key_buffer_end) { return FALSE; } else return TRUE; } /* readkey: * Returns the next character code from the keyboard buffer. If the * buffer is empty, it waits until a key is pressed. The low byte of * the return value contains the ASCII code of the key, and the high * byte the scan code. */ static int readkey() { int r; if ((!keyboard_installed)) return 0; do { /* printf("%i %i\n",key_buffer_start,key_buffer_end);*/ } while (key_buffer_start == key_buffer_end); /* wait for a press */ DISABLE(); r = key_buffer[key_buffer_start]; key_buffer_start++; if (key_buffer_start >= KEY_BUFFER_SIZE) key_buffer_start = 0; ENABLE(); return r; } /* kb_wait_for_write_ready: * Wait for the keyboard controller to set the ready-for-write bit. */ static inline void kb_wait_for_write_ready() { long i = 1000000L; while ((i--) && (inportb(0x64) & 2)) ; /* wait */ } /* kb_wait_for_read_ready: * Wait for the keyboard controller to set the ready-for-read bit. */ static inline void kb_wait_for_read_ready() { long i = 1000000L; while ((i--) && (!(inportb(0x64) & 0x01))) ; /* wait */ } /* kb_send_data: * Sends a byte to the keyboard controller. Returns 1 if all OK. */ static inline int kb_send_data(unsigned char data) { long i; int resends = 4; int temp; do { kb_wait_for_write_ready(); outportb(0x60, data); i = 2000000L; while (--i) { kb_wait_for_read_ready(); temp = inportb(0x60); if (temp == 0xFA) return 1; else if (temp == 0xFE) break; } } while ((resends-- > 0) && (i)); return 0; } /* update_leds: * Sets the state of the keyboard LED indicators. */ static inline void update_leds() { if ((!kb_send_data(0xED)) || (!kb_send_data((key_shifts>>8) & 7))) kb_send_data(0xF4); } /* my_keyint: * Hardware level keyboard interrupt (int 9) handler. */ static int my_keyint() { int t, temp, release, flag; char newchar; temp = inportb(0x60); /* read keyboard byte */ if (temp == 0xE0) { key_extended = 1; } else { release = (temp & 0x80); /* bit 7 means key was released */ temp &= 0x7F; /* bits 0-6 is the scan code */ if (key_extended) { /* if is an extended code */ key_extended = 0; if (((temp == KEY_END) || (temp == KEY_DEL)) && ((key_shifts & KB_CTRL_ALT_FLAG) == KB_CTRL_ALT_FLAG) && (!release) && (three_finger_flag)) { asm ( " movb $0x79, %%al ; " " call ___djgpp_hw_exception " : : : "%eax", "%ebx", "%ecx", "%edx", "%esi", "%edi", "memory" ); goto exit_keyboard_handler; } switch (key_extended_table[temp]) { case 0: /* process as normal */ break; case 1: /* ignore the key */ goto exit_keyboard_handler; case 2: if (release) { key[temp] = FALSE; t = (temp+AA_UNKNOWN)|AA_RELEASE; add_key(t); } else { /* report the scan code + the shift state */ key[temp] = TRUE; t = temp+AA_UNKNOWN; add_key(t); } goto exit_keyboard_handler; default: /* use a replacement value from the LUT */ temp = key_extended_table[temp]; if(temp>255) { if (release) { key[temp] = FALSE; t = temp|AA_RELEASE; add_key(t); } else { /* report the scan code + the shift state */ key[temp] = TRUE; t = temp; add_key(t); } goto exit_keyboard_handler; } break; } } if (release) { /* key was released */ key[temp] = FALSE; if ((flag = key_special_table[temp]) != 0) { if ((flag < KB_SCROLOCK_FLAG) && (flag != KB_ALT_FLAG)) { key_shifts &= ~flag; } else if (flag == KB_ALT_FLAG) { key_shifts &= ~flag; if (key_shifts & KB_INALTSEQ_FLAG) { key_shifts &= ~KB_INALTSEQ_FLAG; /*add_key(key_pad_seq & 0xFF);*/ } } } else goto addkeybuf; } else { /* key was pressed */ key[temp] = TRUE; if ((flag = key_special_table[temp]) != 0) { if (flag >= KB_SCROLOCK_FLAG) { if (key_led_flag) { key_shifts ^= flag; update_leds(); goto exit_keyboard_handler; } } else key_shifts |= flag; } else { /* normal key */ if (key_shifts & KB_ALT_FLAG) { if ((temp >= 0x47) && (key_extended_table[temp] == 2)) { if (key_shifts & KB_INALTSEQ_FLAG) { key_pad_seq = key_pad_seq*10 + key_numlock_table[temp]-'0'; } else { key_shifts |= KB_INALTSEQ_FLAG; key_pad_seq = key_numlock_table[temp] - '0'; } goto exit_keyboard_handler; } else t = SCANCODE_TO_ALT(temp); } else { addkeybuf: if (key_shifts & KB_CTRL_FLAG) t = SCANCODE_TO_CONTROL(temp); else if (key_shifts & KB_SHIFT_FLAG) t = SCANCODE_TO_SHIFT(temp); else if ((key_shifts & KB_NUMLOCK_FLAG) && (newchar = key_numlock_table[temp]) != 0) t = (KEY_PAD<<8) | newchar; else if (key_shifts & KB_CAPSLOCK_FLAG) t = SCANCODE_TO_CAPS(temp); else t = SCANCODE_TO_KEY(temp); key_shifts &= ~KB_INALTSEQ_FLAG; t&=65535; if(release) t|=AA_RELEASE; add_key(t); } } } } exit_keyboard_handler: outportb(0x20,0x20); /* ack. the interrupt */ return 0; } static END_OF_FUNCTION(my_keyint); /* install_keyboard: * Installs Allegro's keyboard handler. You must call this before using * any of the keyboard input routines. Note that Allegro completely takes * over the keyboard, so the debugger will not work properly, and under * DOS even ctrl-alt-del will have no effect. Returns -1 on failure. */ static _go32_dpmi_seginfo pmint,oldint; static int install_keyboard() { unsigned short shifts; if (keyboard_installed) return -1; LOCK_VARIABLE(three_finger_flag); LOCK_VARIABLE(key_led_flag); LOCK_VARIABLE(key_shifts); LOCK_VARIABLE(key); LOCK_VARIABLE(key_ascii_table); LOCK_VARIABLE(key_capslock_table); LOCK_VARIABLE(key_shift_table); LOCK_VARIABLE(key_control_table); LOCK_VARIABLE(key_numlock_table); LOCK_VARIABLE(key_extended_table); LOCK_VARIABLE(key_special_table); LOCK_VARIABLE(key_buffer); LOCK_VARIABLE(key_buffer_start); LOCK_VARIABLE(key_buffer_end); LOCK_VARIABLE(key_extended); LOCK_VARIABLE(key_pad_seq); LOCK_FUNCTION(my_keyint); clear_keybuf(); /* transfer keys from keyboard buffer */ while ((kbhit()) && (key_buffer_end < KEY_BUFFER_SIZE-1)) key_buffer[key_buffer_end++] = getch(); /* get state info from the BIOS */ _dosmemgetw(0x417, 1, &shifts); key_shifts = 0; if (shifts & 1) { key_shifts |= KB_SHIFT_FLAG; key[KEY_RSHIFT] = TRUE; } if (shifts & 2) { key_shifts |= KB_SHIFT_FLAG; key[KEY_LSHIFT] = TRUE; } if (shifts & 4) { key_shifts |= KB_CTRL_FLAG; key[KEY_LCONTROL] = TRUE; } if (shifts & 8) { key_shifts |= KB_ALT_FLAG; key[KEY_ALT] = TRUE; } if (shifts & 16) key_shifts |= KB_SCROLOCK_FLAG; if (shifts & 32) key_shifts |= KB_NUMLOCK_FLAG; if (shifts & 64) key_shifts |= KB_CAPSLOCK_FLAG; pmint.pm_selector = _my_cs(); pmint.pm_offset = (unsigned)&my_keyint; /*_go32_dpmi_set_protected_mode_interrupt_vector(9, &pmint);*/ _go32_dpmi_allocate_iret_wrapper(&pmint); DISABLE(); _go32_dpmi_get_protected_mode_interrupt_vector(9, &oldint); _go32_dpmi_set_protected_mode_interrupt_vector(9, &pmint); update_leds(); ENABLE(); /*_add_exit_func(remove_keyboard);*/ keyboard_installed = TRUE; return 0; } /* remove_keyboard: * Removes the keyboard handler, returning control to the BIOS. You don't * normally need to call this, because allegro_exit() will do it for you. */ static void remove_keyboard() { unsigned short shifts; if (!keyboard_installed) return; /*_remove_irq(KEYBOARD_INT);*/ /* transfer state info to the BIOS */ shifts = 0; if (key[KEY_RSHIFT]) shifts |= 1; if (key[KEY_LSHIFT]) shifts |= 2; if (key[KEY_LCONTROL]) shifts |= 4; if (key[KEY_ALT]) shifts |= 8; if (key_shifts & KB_SCROLOCK_FLAG) shifts |= 16; if (key_shifts & KB_NUMLOCK_FLAG) shifts |= 32; if (key_shifts & KB_CAPSLOCK_FLAG) shifts |= 64; _dosmemputw(&shifts, 1, 0x417); clear_keybuf(); /*_remove_exit_func(remove_keyboard);*/ _go32_dpmi_set_protected_mode_interrupt_vector(9, &oldint); _go32_dpmi_free_iret_wrapper(&pmint); keyboard_installed = FALSE; } static int dos_init(aa_context * c, int mode) { install_keyboard(); return 1; } static void dos_uninit(aa_context * c) { remove_keyboard(); } static int mygetch() { int i = readkey(); if (!i) return AA_NONE; if (i) { if (i == 8) return AA_BACKSPACE; if (i == 27) return AA_ESC; return (i); } if (!i) switch (getch()) { case 72: return AA_UP; case 80: return AA_DOWN; case 75: return AA_LEFT; case 77: return AA_RIGHT; default: return AA_UNKNOWN; } return (AA_UNKNOWN); } static int dos_getchar(aa_context * c1, int wait) { if(c1->mousedriver!=NULL) wait=0; if (wait) return (mygetch()); if (keypressed()) return (mygetch()); else return (AA_NONE); } __AA_CONST struct aa_kbddriver kbd_dos_d = { "dos", "dos keyboard driver 2.0", AA_SENDRELEASE, dos_init, dos_uninit, dos_getchar, }; aalib-1.4.0/src/aadosmou.c0000644000766200001440000000241507272031253011017 #include #include #include #include #include "aalib.h" #include "aaint.h" #include "config.h" static int dos_init(struct aa_context *context, int mode) { __dpmi_regs r; r.x.ax=0; __dpmi_int(0x33,&r); if(r.x.ax==0) return 0; r.x.ax=7; r.x.cx=0; r.x.dx=8*aa_scrwidth(context)-8; __dpmi_int(0x33,&r); r.x.ax=8; r.x.cx=0; r.x.dx=8*aa_scrheight(context)-8; __dpmi_int(0x33,&r); r.x.ax=1; __dpmi_int(0x33,&r); return 1; } static void dos_uninit(aa_context * c) { __dpmi_regs r; r.x.ax=2; __dpmi_int(0x33,&r); } static void dos_mouse(aa_context * c, int *x, int *y, int *b) { __dpmi_regs r; r.x.ax=3; __dpmi_int(0x33,&r); *x = r.x.cx/8; *y = r.x.dx/8; *b = 0; if (r.x.bx & 1) *b |= AA_BUTTON1; if (r.x.bx & 4) *b |= AA_BUTTON2; if (r.x.bx & 2) *b |= AA_BUTTON3; } static void dos_mousemode(aa_context *c,int m) { __dpmi_regs r; if(m) r.x.ax=1; else r.x.ax=2; __dpmi_int(0x33,&r); } __AA_CONST struct aa_mousedriver mouse_dos_d = { "dos", "Dos mouse driver 1.0", AA_MOUSEALLMASK | AA_HIDECURSOR, dos_init, dos_uninit, dos_mouse, dos_mousemode, }; aalib-1.4.0/src/aaos2.c0000644000766200001440000001471207272031253010217 #include "config.h" #ifdef OS2_DRIVER #define INCL_VIO #define INCL_KBD #define INCL_MOU #include #include #include #include "aalib.h" #include "aaint.h" #define WM_BLACK 0x00 #define WM_BLUE 0x01 #define WM_GREEN 0x02 #define WM_CYAN 0x03 #define WM_RED 0x04 #define WM_MAGENTA 0x05 #define WM_BROWN 0x06 #define WM_PALEGRAY 0x07 #define WM_DKGREY 0x08 #define WM_LBLUE 0x09 #define WM_LGREEN 0x0A #define WM_LCYAN 0x0B #define WM_LRED 0x0C #define WM_LMAGENTA 0x0D #define WM_YELLOW 0x0E #define WM_WHITE 0x0F #define WM_MAX_COLOR 0X0F #define TOP_ROW 0 #define LEFT_COL 0 #define BOT_ROW 25 #define RGT_COL 80 static VIOCURSORINFO oldCurInfo; static VIOMODEINFO oldMode, vio_mode; static BYTE *RowStr; static int width = 80, height = 32; void breakfunc(int signo) { BYTE bCell[2]; bCell[0] = 0x20; bCell[1] = ( WM_BLACK << 4 ) + WM_PALEGRAY; VioScrollDn(TOP_ROW,LEFT_COL,0xFFFF,0xFFFF,0xFFFF,bCell,(HVIO) 0); VioSetMode(&oldMode, (HVIO) 0); VioSetCurPos(0, 0, (HVIO)0); VioSetCurType(&oldCurInfo, (HVIO)0); switch(signo) { case SIGINT: fprintf(stderr, "Interrupt (Ctrl-C)\n"); break; case SIGQUIT: fprintf(stderr, "Quit\n"); break; case SIGILL: fprintf(stderr, "Illegal instruction\n"); break; case SIGFPE: fprintf(stderr, "Floating point\n"); break; case SIGKILL: fprintf(stderr, "Kill process\n"); break; case SIGBUS: fprintf(stderr, "Bus error\n"); break; case SIGSEGV: fprintf(stderr, "Segmentation fault\n"); break; case SIGTERM: fprintf(stderr, "Termination, process killed\n"); break; case SIGBREAK: fprintf(stderr, "Break (Ctrl-Break)\n"); break; } exit(99); } static int os2vio_init(__AA_CONST struct aa_hardware_params *p,__AA_CONST void *none, struct aa_hardware_params *dest, void *params) { static struct aa_hardware_params def= {NULL, AA_DIM_MASK | AA_REVERSE_MASK | AA_NORMAL_MASK | AA_BOLD_MASK | AA_EXTENDED, 0, 0, 0, 0, 80, 32, 0, 0}; BYTE bCell[2]; VIOCURSORINFO hidecur; #ifdef __EMX__ int idx; struct sigaction sa; #endif *dest=def; /* check size or prompt for it */ if(p->width) width = p->width; else { char c[255]; width = def.recwidth; if(p->recwidth) width = p->recwidth; printf("Width?[%i]", width); gets(c); sscanf(c, "%i", &width); } if (p->height) height = p->height; else { char c[256]; height = def.recheight; if (p->recheight) height = p->recheight; printf("Height?[%i]", height); gets(c); sscanf(c, "%i", &height); } if (p->maxwidth && width > p->maxwidth) width = p->maxwidth; if (p->minwidth && width < p->minwidth) width = p->minwidth; if (p->maxheight && height > p->maxheight) height = p->maxheight; if (p->minheight && height < p->minheight) height = p->minheight; /* set font for modes that we know the size for, default vga16 */ switch(height) { case 50: p->font = &aa_font8; break; case 43: p->font = &aa_font9; break; case 28: p->font = &aa_font14; break; } RowStr = (BYTE *)malloc(2 * width * sizeof(BYTE)); if(RowStr==NULL) return 0; oldMode.cb=sizeof(VIOMODEINFO); VioGetMode((PVIOMODEINFO) &oldMode,(HVIO) 0); VioGetCurType(&oldCurInfo, (HVIO)0); memcpy((void *) &vio_mode, (const void *) &oldMode, sizeof(VIOMODEINFO)); /* VIO, 80x50 */ vio_mode.fbType = 1; vio_mode.color = 4; vio_mode.col = width; vio_mode.row = height; if(width>=132) vio_mode.hres = 1056; else vio_mode.hres = 720; vio_mode.vres = 400; vio_mode.fmt_ID = 0; vio_mode.attrib = 1; if (VioSetMode(&vio_mode, (HVIO) 0)) return 0; #ifdef __EMX__ /* under EMX, catch the signals to clean up proberly */ sa.sa_handler = breakfunc; sa.sa_flags = 0; sigemptyset(&sa.sa_mask); for (idx=SIGHUP;idx<=SIGTERM;idx++) sigaction(idx,&sa,NULL); #endif hidecur.attr = -1; VioSetCurType(&hidecur, (HVIO)0); bCell[0] = 0x20; bCell[1] = ( WM_BLACK << 4 ) + WM_PALEGRAY; VioScrollDn(TOP_ROW,LEFT_COL,0xFFFF,0xFFFF,0xFFFF,bCell,(HVIO) 0); #ifdef 0 printf("minwidth=%d\nminheight=%d\n", p->minwidth, p->minheight); printf("maxwidth=%d\nmaxheight=%d\n", p->maxwidth, p->maxheight); printf("recwidth=%d\nrecheight=%d\n", p->recwidth, p->recheight); printf("mmwidth=%d\nmmheight=%d\n", p->mmwidth, p->mmheight); printf("width=%d\nheight=%d\n", p->width, p->height); if(p->font!=NULL) { printf("fontheight=%d\n", p->font->height); printf("fontname=%s\n", p->font->name); printf("fontname(short)=%s\n", p->font->shortname); } getchar(); #endif return 1; } static void os2vio_uninit(aa_context * c) { BYTE bCell[2]; bCell[0] = 0x20; bCell[1] = ( WM_BLACK << 4 ) + WM_PALEGRAY; VioScrollDn(TOP_ROW,LEFT_COL,0xFFFF,0xFFFF,0xFFFF,bCell,(HVIO) 0); VioSetMode(&oldMode, (HVIO) 0); VioSetCurPos(0, 0, (HVIO)0); VioSetCurType(&oldCurInfo, (HVIO)0); } static void os2vio_getsize(aa_context * c, int *w, int *h) { *w = width; *h = height; } static void os2vio_flush(aa_context * c) { char data[] = { (WM_BLACK << 4) + WM_PALEGRAY, /* NORMAL? 0 */ (WM_BLACK << 4) + WM_DKGREY, /* DIM? 1 */ (WM_BLACK << 4) + WM_WHITE, /* BOLD? 2 */ (WM_RED << 4) + WM_PALEGRAY, /* BOLDFONT? 3 */ (WM_PALEGRAY << 4) + WM_BLACK, /* REVERSE? 4 */ (WM_BLUE << 4) + WM_WHITE /* SPECIAL? 5 */ }; int x, y; for (y = 0; y < aa_scrheight(c); y++) { for (x = 0; x < aa_scrwidth(c); x++) { if(c->attrbuffer[x + y * aa_scrwidth(c)] < 7) RowStr[x*2+1] = data[c->attrbuffer[x + y * aa_scrwidth(c)]]; else RowStr[x*2+1] = (WM_BLACK << 4) + WM_PALEGRAY; RowStr[x*2] = c->textbuffer[x + y * aa_scrwidth(c)]; } VioWrtCellStr(RowStr, 2*width, y, 0, (HVIO)0); } } static void os2vio_gotoxy(aa_context * c, int x, int y) { VioSetCurPos(y, x, (HVIO)0); } __AA_CONST struct aa_driver os2vio_d = { "os2", "OS/2 VIO driver 0.1", os2vio_init, os2vio_uninit, os2vio_getsize, NULL, NULL, os2vio_gotoxy, os2vio_flush, NULL }; #endif aalib-1.4.0/src/aaos2kbd.c0000644000766200001440000000372407272031253010701 #include "config.h" #ifdef OS2_KBDDRIVER #include #define INCL_VIO #define INCL_KBD #define INCL_MOU #include #include "aalib.h" #include "aaint.h" extern HMOU hMou; /* from aaos2mou.c */ extern UCHAR but; static int os2_init(aa_context * c, int mode) { return 1; } static void os2_uninit(aa_context * c) { } static int check_keys(KBDKEYINFO k) { if(!(k.fbStatus&0x02)) { if(k.chChar==8) return AA_BACKSPACE; if(k.chChar==27) return AA_ESC; return (k.chChar); } if(k.fbStatus&0x02) { switch(k.chScan) { case 72: return AA_UP; case 80: return AA_DOWN; case 75: return AA_LEFT; case 77: return AA_RIGHT; default: return AA_UNKNOWN; } } return (AA_NONE); } static int os2_getchar(aa_context * c, int wait) { KBDKEYINFO kbdkey; MOUEVENTINFO mouEvent; USHORT mouwait = MOU_NOWAIT; if(wait) { while(1) { KbdCharIn(&kbdkey, IO_NOWAIT, 0); if(kbdkey.fbStatus!=0) return check_keys(kbdkey); if(hMou!=-1) { MouReadEventQue(&mouEvent, &mouwait, hMou); /* mouse event! */ if(!((mouEvent.fs==0)&&(mouEvent.col==0)&&(mouEvent.row==0))) { if(mouEvent.fs&0x60) but |= AA_BUTTON2; else but &= ~AA_BUTTON2; if((mouEvent.fs&0x18)||(mouEvent.fs&0x60 && mouEvent.fs&0x06)) but |= AA_BUTTON3; else but &= ~AA_BUTTON3; if(mouEvent.fs&0x06) but |= AA_BUTTON1; else but &= ~AA_BUTTON1; if(mouEvent.fs&0x01) but = 0; return AA_NONE; } } DosSleep(0); } } else { KbdCharIn(&kbdkey, IO_NOWAIT, 0); if(kbdkey.fbStatus==0) return AA_NONE; else return check_keys(kbdkey); } return (AA_NONE); } __AA_CONST struct aa_kbddriver kbd_os2_d = { "os2", "OS/2 Keyboard driver 0.1", 0, os2_init, os2_uninit, os2_getchar, }; #endif aalib-1.4.0/src/aaos2mou.c0000644000766200001440000000351507272031253010737 #include "config.h" #ifdef OS2_MOUSEDRIVER #include #define INCL_VIO #define INCL_KBD #define INCL_MOU #include #include "aalib.h" #include "aaint.h" static int but=0; static HMOU hMou; static int os2_init(aa_context * c, int mode) { USHORT mask = 0x7F; USHORT status = 0x0; if (MouOpen(NULL,&hMou) && MouOpen("POINTER$", &hMou)) { hMou = -1; return 0; } MouDrawPtr(hMou); MouSetDevStatus(&status, hMou); MouSetEventMask(&mask, hMou); return 1; } static void os2_uninit(aa_context * c) { USHORT status = 0; MouSetDevStatus(&status, hMou); MouClose(hMou); } static void os2_getmouse(aa_context * c, int *x, int *y, int *b) { MOUEVENTINFO mouEvent; PTRLOC ptrLoc; USHORT mouwait = MOU_NOWAIT; MouGetPtrPos(&ptrLoc, hMou); MouReadEventQue(&mouEvent, &mouwait, hMou); *x = ptrLoc.col; *y = ptrLoc.row; if((mouEvent.fs==0)&&(mouEvent.col==0)&&(mouEvent.row==0)) { /* no event */ *b = but; return; } if(mouEvent.fs&0x60) but |= AA_BUTTON2; else but &= ~AA_BUTTON2; if((mouEvent.fs&0x18)||(mouEvent.fs&0x60 && mouEvent.fs&0x06)) but |= AA_BUTTON3; else but &= ~AA_BUTTON3; if(mouEvent.fs&0x06) but |= AA_BUTTON1; else but &= ~AA_BUTTON1; if(mouEvent.fs&0x01) but = 0; *b = but; } /* m = 1; showmouse m = 0; hidemouse */ static void os2_cursormode(aa_context * c, int m) { USHORT statusHide = 0x0; USHORT statusShow = 0x100; if(!m) { MouSetDevStatus(&statusShow, hMou); MouDrawPtr(hMou); } else MouSetDevStatus(&statusHide, hMou); } struct aa_mousedriver mouse_os2_d = { "os2", "OS/2 Mouse driver 0.1", AA_MOUSEALLMASK|AA_HIDECURSOR, os2_init, os2_uninit, os2_getmouse, os2_cursormode, }; #endif aalib-1.4.0/src/aaint.h0000644000766200001440000000301707272031253010307 #ifndef __AAINT_INCLUDED__ #define __AAINT_INCLUDED__ #include /* Macros used for calculating fonts sizes. */ #define NCHARS (256*AA_NATTRS) /* Mode validation. */ #define aa_validmode(x,y,params) \ ((((params)->minwidth||(params)->maxwidth)||((params)->width==(x)||!(params)->width))&& \ (((params)->minheight||(params)->maxheight)||((params)->height==(y)||!(params)->height)) && \ ((params)->minwidth?(params->minwidth)<=(x):1)&& \ ((params)->minheight?(params->minheight)<=(x):1)&& \ ((params)->maxwidth?(params->maxwidth)>=(x):1)&& \ ((params)->maxheight?(params->maxheight)>=(x):1)) #define ALOWED(i,s) ((isgraph((i)&0xff)||(((i)&0xff)==' ')||(((i)&0xff)>160&&(s&AA_EIGHT))||((s&AA_ALL)&&((i)&0xff)))&&(s&TOMASK(((i)>>8)))) #define ALOWED1(i,s) (1) #define TOMASK(i) (1<<(i)) struct aa_edit { int maxsize; char *data; int cursor; int clearafterpress; int printpos; int x, y, size; struct aa_context *c; }; struct parameters { unsigned int p[AA_NPARAMS]; }; struct aa_linkedlist { char *text; struct aa_linkedlist *next, *previous; }; struct aa_graphics { char *videoram; int width; int height; struct aa_font *font; char *cache; char *attrcache; int bgcolor; int fgcolor; int dimcolor; int boldcolor; int specialcolor; char charset[AA_NATTRS]; }; void __aa_calcparams(__AA_CONST struct aa_font *font, struct parameters *parameters, int supported,double dimmul, double boldmul); #endif aalib-1.4.0/src/aamktabl.h0000644000766200001440000000037307272031253010771 #ifndef __AAMKTABLE_INCLUDED__ #define __AAMKTABLE_INCLUDED__ #include "aalib.h" unsigned short *aa_mktable(aa_context * c); void aa_calcparams(struct aa_font *font, struct parameters *parameters, int supported, double dimmul, double boldmul); #endif aalib-1.4.0/src/aaxint.h0000644000766200001440000000132707272031302010474 struct xdriverdata { Display *dp; Window wi; Pixmap pi; int imgwidth, imgheight; XSetWindowAttributes attr; int fontheight; int fontwidth; int realfontwidth; GC normalGC, dimGC, boldGC, currGC, specialGC; int cvisible; GC blackGC; Colormap cmap; int screen; long bold, normal, dim, black, special; long invertedbold, invertednormal, inverteddim, invertedblack, invertedspecial; int width; int height; XFontStruct *font_s; int Xpos; int pixmapmode; int Ypos; int mmwidth, mmheight; unsigned char *previoust, *previousa; int font; int pixelwidth, pixelheight; int inverted; }; int __aa_X_getsize(struct aa_context *c,struct xdriverdata *d); void __aa_X_redraw(aa_context *c); aalib-1.4.0/src/toc.c0000644000766200001440000000033207272031253007770 #include main() { int i; while (1) { for (i = 0; i < 32; i++) { if (i < 8) printf("0x%02x, ", getc(stdin)); else getc(stdin); if (feof(stdin)) exit(); } printf("\n"); } } aalib-1.4.0/man/0000777000766200001440000000000007272037667007130 5aalib-1.4.0/man/Makefile.in0000644000766200001440000001733107272037666011115 # 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@ AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_LIBS = @AALIB_LIBS@ AALIB_RLD_FLAGS = @AALIB_RLD_FLAGS@ AS = @AS@ CC = @CC@ DLLTOOL = @DLLTOOL@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ MAKEINFO = @MAKEINFO@ OBJDUMP = @OBJDUMP@ PACKAGE = @PACKAGE@ RANLIB = @RANLIB@ VERSION = @VERSION@ XCURSES = @XCURSES@ machine = @machine@ system = @system@ man_MANS = aa_attrs.3 aa_autoinit.3 aa_autoinitkbd.3 aa_autoinitmouse.3 aa_close.3 aa_createedit.3 aa_currentfont.3 aa_defparams.3 aa_defrenderparams.3 aa_displayrecommended.3 aa_dithernames.3 aa_drivers.3 aa_edit.3 aa_editkey.3 aa_fastrender.3 aa_fonts.3 aa_formats.3 aa_getevent.3 aa_getkey.3 aa_getmouse.3 aa_gotoxy.3 aa_help.3 aa_hidecursor.3 aa_hidemouse.3 aa_image.3 aa_imgheight.3 aa_imgwidth.3 aa_init.3 aa_initkbd.3 aa_initmouse.3 aa_kbddrivers.3 aa_kbdrecommended.3 aa_mmheight.3 aa_mmwidth.3 aa_mousedrivers.3 aa_mouserecommended.3 aa_parseoptions.3 aa_printf.3 aa_putpixel.3 aa_puts.3 aa_recommendhi.3 aa_recommendhidisplay.3 aa_recommendhikbd.3 aa_recommendhimouse.3 aa_recommendlow.3 aa_recommendlowdisplay.3 aa_recommendlowkbd.3 aa_recommendlowmouse.3 aa_registerfont.3 aa_render.3 aa_resize.3 aa_resizehandler.3 aa_scrheight.3 aa_scrwidth.3 aa_setfont.3 aa_setsupported.3 aa_showcursor.3 aa_showmouse.3 aa_text.3 aa_uninitkbd.3 aa_uninitmouse.3 mem_d.3 save_d.3 aafire.1 EXTRA_DIST = $(man_MANS) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = ../src/config.h CONFIG_CLEAN_FILES = man1dir = $(mandir)/man1 man3dir = $(mandir)/man3 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/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-man3: $(mkinstalldirs) $(DESTDIR)$(man3dir) @list='$(man3_MANS)'; \ l2='$(man_MANS)'; for i in $$l2; do \ case "$$i" in \ *.3*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ else file=$$i; fi; \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man3dir)/$$inst"; \ $(INSTALL_DATA) $$file $(DESTDIR)$(man3dir)/$$inst; \ done uninstall-man3: @list='$(man3_MANS)'; \ l2='$(man_MANS)'; for i in $$l2; do \ case "$$i" in \ *.3*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " rm -f $(DESTDIR)$(man3dir)/$$inst"; \ rm -f $(DESTDIR)$(man3dir)/$$inst; \ done install-man: $(MANS) @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-man1 install-man3 uninstall-man: @$(NORMAL_UNINSTALL) $(MAKE) $(AM_MAKEFLAGS) uninstall-man1 uninstall-man3 tags: TAGS 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 $$d/$$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 $(DESTDIR)$(mandir)/man3 mostlyclean-generic: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) -rm -f config.cache config.log stamp-h stamp-h[0-9]* maintainer-clean-generic: mostlyclean-am: mostlyclean-generic mostlyclean: mostlyclean-am clean-am: clean-generic mostlyclean-am clean: clean-am distclean-am: distclean-generic clean-am -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-man3 uninstall-man3 \ install-man uninstall-man tags distdir info-am info dvi-am dvi check \ check-am installcheck-am installcheck install-exec-am install-exec \ install-data-am install-data install-am install uninstall-am uninstall \ all-redirect all-am all installdirs mostlyclean-generic \ distclean-generic clean-generic maintainer-clean-generic clean \ mostlyclean distclean maintainer-clean # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: aalib-1.4.0/man/Makefile.am0000644000766200001440000000176407272031253011071 man_MANS = aa_attrs.3 aa_autoinit.3 aa_autoinitkbd.3 aa_autoinitmouse.3 aa_close.3 aa_createedit.3 aa_currentfont.3 aa_defparams.3 aa_defrenderparams.3 aa_displayrecommended.3 aa_dithernames.3 aa_drivers.3 aa_edit.3 aa_editkey.3 aa_fastrender.3 aa_fonts.3 aa_formats.3 aa_getevent.3 aa_getkey.3 aa_getmouse.3 aa_gotoxy.3 aa_help.3 aa_hidecursor.3 aa_hidemouse.3 aa_image.3 aa_imgheight.3 aa_imgwidth.3 aa_init.3 aa_initkbd.3 aa_initmouse.3 aa_kbddrivers.3 aa_kbdrecommended.3 aa_mmheight.3 aa_mmwidth.3 aa_mousedrivers.3 aa_mouserecommended.3 aa_parseoptions.3 aa_printf.3 aa_putpixel.3 aa_puts.3 aa_recommendhi.3 aa_recommendhidisplay.3 aa_recommendhikbd.3 aa_recommendhimouse.3 aa_recommendlow.3 aa_recommendlowdisplay.3 aa_recommendlowkbd.3 aa_recommendlowmouse.3 aa_registerfont.3 aa_render.3 aa_resize.3 aa_resizehandler.3 aa_scrheight.3 aa_scrwidth.3 aa_setfont.3 aa_setsupported.3 aa_showcursor.3 aa_showmouse.3 aa_text.3 aa_uninitkbd.3 aa_uninitmouse.3 mem_d.3 save_d.3 aafire.1 EXTRA_DIST = $(man_MANS) aalib-1.4.0/man/aa_attrs.30000644000766200001440000000333607272031253010714 .\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! .\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! .TH "aa_attrs" 3 "8 September 1999" "c2man aalib.h" .SH "NAME" aa_attrs \- returns pointer to the text output buffer used by AA-lib. .SH "SYNOPSIS" .ft B #include .sp char *aa_attrs(aa_context *a); .ft R .SH "PARAMETERS" .TP .B "aa_context *a" Specifies the AA-lib context to operate on. .SH "DESCRIPTION" The attribute output buffer is simple array of characters specifying the attributes. The array is organizated in the aa_scrheight (a) rows of aa_scrwidth(a) characters. .SH "RETURNS" Pointer the text output buffer used by AA-lib. .SH "SEE ALSO" save_d(3), mem_d(3), aa_help(3), aa_formats(3), aa_fonts(3), aa_dithernames(3), aa_drivers(3), aa_kbddrivers(3), aa_mousedrivers(3), aa_kbdrecommended(3), aa_mouserecommended(3), aa_displayrecommended(3), aa_defparams(3), aa_defrenderparams(3), aa_scrwidth(3), aa_scrheight(3), aa_mmwidth(3), aa_mmheight(3), aa_imgwidth(3), aa_imgheight(3), aa_image(3), aa_text(3), aa_currentfont(3), aa_autoinit(3), aa_autoinitkbd(3), aa_autoinitmouse(3), aa_recommendhi(3), aa_recommendlow(3), aa_init(3), aa_initkbd(3), aa_initmouse(3), aa_close(3), aa_uninitkbd(3), aa_uninitmouse(3), aa_fastrender(3), aa_render(3), aa_puts(3), aa_printf(3), aa_gotoxy(3), aa_hidecursor(3), aa_showcursor(3), aa_getmouse(3), aa_hidemouse(3), aa_showmouse(3), aa_registerfont(3), aa_setsupported(3), aa_setfont(3), aa_getevent(3), aa_getkey(3), aa_resize(3), aa_resizehandler(3), aa_parseoptions(3), aa_edit(3), aa_createedit(3), aa_editkey(3), aa_putpixel(3), aa_recommendhikbd(3), aa_recommendlowkbd(3), aa_recommendhimouse(3), aa_recommendlowmouse(3), aa_recommendhidisplay(3), aa_recommendlowdisplay(3) aalib-1.4.0/man/aa_autoinit.30000644000766200001440000000362007272031253011407 .\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! .\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! .TH "aa_autoinit" 3 "8 September 1999" "c2man aalib.h" .SH "NAME" aa_autoinit \- easy to use AA-lib initialization function. .SH "SYNOPSIS" .ft B #include .sp aa_context *aa_autoinit(const struct aa_hardware_params *params); .ft R .SH "PARAMETERS" .TP .B "const struct aa_hardware_params *params" Hardware parameters you want. Use aa_defparams for default values. .SH "DESCRIPTION" Attempts to find available output driver supporting the specified parameters. First attempts to initialize the recommended drivers and then in order drivers available in the aa_drivers array (all regular output drivers compiled into AA-lib). .SH "RETURNS" Pointer to initialized context structure when succesfull or NULL on failure. .SH "SEE ALSO" save_d(3), mem_d(3), aa_help(3), aa_formats(3), aa_fonts(3), aa_dithernames(3), aa_drivers(3), aa_kbddrivers(3), aa_mousedrivers(3), aa_kbdrecommended(3), aa_mouserecommended(3), aa_displayrecommended(3), aa_defparams(3), aa_defrenderparams(3), aa_scrwidth(3), aa_scrheight(3), aa_mmwidth(3), aa_mmheight(3), aa_imgwidth(3), aa_imgheight(3), aa_image(3), aa_text(3), aa_attrs(3), aa_currentfont(3), aa_autoinitkbd(3), aa_autoinitmouse(3), aa_recommendhi(3), aa_recommendlow(3), aa_init(3), aa_initkbd(3), aa_initmouse(3), aa_close(3), aa_uninitkbd(3), aa_uninitmouse(3), aa_fastrender(3), aa_render(3), aa_puts(3), aa_printf(3), aa_gotoxy(3), aa_hidecursor(3), aa_showcursor(3), aa_getmouse(3), aa_hidemouse(3), aa_showmouse(3), aa_registerfont(3), aa_setsupported(3), aa_setfont(3), aa_getevent(3), aa_getkey(3), aa_resize(3), aa_resizehandler(3), aa_parseoptions(3), aa_edit(3), aa_createedit(3), aa_editkey(3), aa_putpixel(3), aa_recommendhikbd(3), aa_recommendlowkbd(3), aa_recommendhimouse(3), aa_recommendlowmouse(3), aa_recommendhidisplay(3), aa_recommendlowdisplay(3) aalib-1.4.0/man/aa_autoinitkbd.30000644000766200001440000000406107272031253012070 .\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! .\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! .TH "aa_autoinitkbd" 3 "8 September 1999" "c2man aalib.h" .SH "NAME" aa_autoinitkbd \- easy to use AA-lib keyboard initialization function. .SH "SYNOPSIS" .ft B #include .sp int aa_autoinitkbd .br ( .br struct aa_context *context, .br int mode .br ); .ft R .SH "PARAMETERS" .TP .B "struct aa_context *context" Specifies the AA-lib context to operate on. .TP .B "int mode" Mask of extra features you request. Can contain AA_SENDRELEASE if you are interested in release events too. .SH "DESCRIPTION" Attempts to find available keyboard driver supporting the specified mode. First attempts to initialize the recommended drivers and then in order drivers available in the aa_kbddrivers array (all regular output drivers compiled into AA-lib). Every AA-lib program ought to have call to aa_parseoptions before first call to aa_init. .SH "RETURNS" 1 when succesfull or 0 on failure. .SH "SEE ALSO" save_d(3), mem_d(3), aa_help(3), aa_formats(3), aa_fonts(3), aa_dithernames(3), aa_drivers(3), aa_kbddrivers(3), aa_mousedrivers(3), aa_kbdrecommended(3), aa_mouserecommended(3), aa_displayrecommended(3), aa_defparams(3), aa_defrenderparams(3), aa_scrwidth(3), aa_scrheight(3), aa_mmwidth(3), aa_mmheight(3), aa_imgwidth(3), aa_imgheight(3), aa_image(3), aa_text(3), aa_attrs(3), aa_currentfont(3), aa_autoinit(3), aa_autoinitmouse(3), aa_recommendhi(3), aa_recommendlow(3), aa_init(3), aa_initkbd(3), aa_initmouse(3), aa_close(3), aa_uninitkbd(3), aa_uninitmouse(3), aa_fastrender(3), aa_render(3), aa_puts(3), aa_printf(3), aa_gotoxy(3), aa_hidecursor(3), aa_showcursor(3), aa_getmouse(3), aa_hidemouse(3), aa_showmouse(3), aa_registerfont(3), aa_setsupported(3), aa_setfont(3), aa_getevent(3), aa_getkey(3), aa_resize(3), aa_resizehandler(3), aa_parseoptions(3), aa_edit(3), aa_createedit(3), aa_editkey(3), aa_putpixel(3), aa_recommendhikbd(3), aa_recommendlowkbd(3), aa_recommendhimouse(3), aa_recommendlowmouse(3), aa_recommendhidisplay(3), aa_recommendlowdisplay(3) aalib-1.4.0/man/aa_autoinitmouse.30000644000766200001440000000370007272031253012457 .\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! .\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! .TH "aa_autoinitmouse" 3 "8 September 1999" "c2man aalib.h" .SH "NAME" aa_autoinitmouse \- easy to use AA-lib mouse initialization function. .SH "SYNOPSIS" .ft B #include .sp int aa_autoinitmouse .br ( .br struct aa_context *c, .br int mode .br ); .ft R .SH "PARAMETERS" .TP .B "struct aa_context *c" Specifies the AA-lib context to operate on. .TP .B "int mode" Mask of extra features you request. No such features are available in the current AA-lib version. .SH "DESCRIPTION" Attempts to find available mouse driver supporting the specified mode. First attempts to initialize the recommended drivers and then in order drivers available in the aa_kbddrivers array (all regular output drivers compiled into AA-lib). .SH "RETURNS" 1 when succesfull or 0 on failure. .SH "SEE ALSO" save_d(3), mem_d(3), aa_help(3), aa_formats(3), aa_fonts(3), aa_dithernames(3), aa_drivers(3), aa_kbddrivers(3), aa_mousedrivers(3), aa_kbdrecommended(3), aa_mouserecommended(3), aa_displayrecommended(3), aa_defparams(3), aa_defrenderparams(3), aa_scrwidth(3), aa_scrheight(3), aa_mmwidth(3), aa_mmheight(3), aa_imgwidth(3), aa_imgheight(3), aa_image(3), aa_text(3), aa_attrs(3), aa_currentfont(3), aa_autoinit(3), aa_autoinitkbd(3), aa_recommendhi(3), aa_recommendlow(3), aa_init(3), aa_initkbd(3), aa_initmouse(3), aa_close(3), aa_uninitkbd(3), aa_uninitmouse(3), aa_fastrender(3), aa_render(3), aa_puts(3), aa_printf(3), aa_gotoxy(3), aa_hidecursor(3), aa_showcursor(3), aa_getmouse(3), aa_hidemouse(3), aa_showmouse(3), aa_registerfont(3), aa_setsupported(3), aa_setfont(3), aa_getevent(3), aa_getkey(3), aa_resize(3), aa_resizehandler(3), aa_parseoptions(3), aa_edit(3), aa_createedit(3), aa_editkey(3), aa_putpixel(3), aa_recommendhikbd(3), aa_recommendlowkbd(3), aa_recommendhimouse(3), aa_recommendlowmouse(3), aa_recommendhidisplay(3), aa_recommendlowdisplay(3) aalib-1.4.0/man/aa_close.30000644000766200001440000000305307272031253010660 .\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! .\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! .TH "aa_close" 3 "8 September 1999" "c2man aalib.h" .SH "NAME" aa_close \- close the AA-lib context. .SH "SYNOPSIS" .ft B #include .sp void aa_close(aa_context *c); .ft R .SH "PARAMETERS" .TP .B "aa_context *c" Specifies the AA-lib context to operate on. .SH "DESCRIPTION" Uninitialize all activated drivers and frees the memory used by context structures. .SH "SEE ALSO" save_d(3), mem_d(3), aa_help(3), aa_formats(3), aa_fonts(3), aa_dithernames(3), aa_drivers(3), aa_kbddrivers(3), aa_mousedrivers(3), aa_kbdrecommended(3), aa_mouserecommended(3), aa_displayrecommended(3), aa_defparams(3), aa_defrenderparams(3), aa_scrwidth(3), aa_scrheight(3), aa_mmwidth(3), aa_mmheight(3), aa_imgwidth(3), aa_imgheight(3), aa_image(3), aa_text(3), aa_attrs(3), aa_currentfont(3), aa_autoinit(3), aa_autoinitkbd(3), aa_autoinitmouse(3), aa_recommendhi(3), aa_recommendlow(3), aa_init(3), aa_initkbd(3), aa_initmouse(3), aa_uninitkbd(3), aa_uninitmouse(3), aa_fastrender(3), aa_render(3), aa_puts(3), aa_printf(3), aa_gotoxy(3), aa_hidecursor(3), aa_showcursor(3), aa_getmouse(3), aa_hidemouse(3), aa_showmouse(3), aa_registerfont(3), aa_setsupported(3), aa_setfont(3), aa_getevent(3), aa_getkey(3), aa_resize(3), aa_resizehandler(3), aa_parseoptions(3), aa_edit(3), aa_createedit(3), aa_editkey(3), aa_putpixel(3), aa_recommendhikbd(3), aa_recommendlowkbd(3), aa_recommendhimouse(3), aa_recommendlowmouse(3), aa_recommendhidisplay(3), aa_recommendlowdisplay(3) aalib-1.4.0/man/aa_createedit.30000644000766200001440000000416207272031253011666 .\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! .\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! .TH "aa_createedit" 3 "8 September 1999" "c2man aalib.h" .SH "NAME" aa_createedit \- Simple interactive line editor provided as helper function. .SH "SYNOPSIS" .ft B #include .sp struct aa_edit *aa_createedit .br ( .br aa_context *c, .br int x, .br int y, .br int size, .br char *s, .br int maxsize .br ); .ft R .SH "PARAMETERS" .TP .B "aa_context *c" Specifies the AA-lib context to operate on. .TP .B "int x" X coordinate of the edited text. .TP .B "int y" Y coordinate of the edited text. .TP .B "int size" Length of the editor window. .TP .B "char *s" Buffer to edit (containing default value). .TP .B "int maxsize" Size of the buffer. .SH "DESCRIPTION" You might use this function to input strings in AA-lib programs. This function initializes the aa_edit structure used by event-based editor. You might then call the aa_editkey function when key is pressed. .SH "RETURNS" Pointer to edit context when succesfull and NULL on failure. .SH "SEE ALSO" save_d(3), mem_d(3), aa_help(3), aa_formats(3), aa_fonts(3), aa_dithernames(3), aa_drivers(3), aa_kbddrivers(3), aa_mousedrivers(3), aa_kbdrecommended(3), aa_mouserecommended(3), aa_displayrecommended(3), aa_defparams(3), aa_defrenderparams(3), aa_scrwidth(3), aa_scrheight(3), aa_mmwidth(3), aa_mmheight(3), aa_imgwidth(3), aa_imgheight(3), aa_image(3), aa_text(3), aa_attrs(3), aa_currentfont(3), aa_autoinit(3), aa_autoinitkbd(3), aa_autoinitmouse(3), aa_recommendhi(3), aa_recommendlow(3), aa_init(3), aa_initkbd(3), aa_initmouse(3), aa_close(3), aa_uninitkbd(3), aa_uninitmouse(3), aa_fastrender(3), aa_render(3), aa_puts(3), aa_printf(3), aa_gotoxy(3), aa_hidecursor(3), aa_showcursor(3), aa_getmouse(3), aa_hidemouse(3), aa_showmouse(3), aa_registerfont(3), aa_setsupported(3), aa_setfont(3), aa_getevent(3), aa_getkey(3), aa_resize(3), aa_resizehandler(3), aa_parseoptions(3), aa_edit(3), aa_editkey(3), aa_putpixel(3), aa_recommendhikbd(3), aa_recommendlowkbd(3), aa_recommendhimouse(3), aa_recommendlowmouse(3), aa_recommendhidisplay(3), aa_recommendlowdisplay(3) aalib-1.4.0/man/aa_currentfont.30000644000766200001440000000314607272031253012127 .\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! .\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! .TH "aa_currentfont" 3 "8 September 1999" "c2man aalib.h" .SH "NAME" aa_currentfont \- returns specification of the fonts used by AA-lib rendering routines. .SH "SYNOPSIS" .ft B #include .sp const struct aa_font *aa_currentfont(aa_context *a); .ft R .SH "PARAMETERS" .TP .B "aa_context *a" Specifies the AA-lib context to operate on. .SH "DESCRIPTION" Returns specification of the fonts used by AA-lib rendering routines. .SH "SEE ALSO" save_d(3), mem_d(3), aa_help(3), aa_formats(3), aa_fonts(3), aa_dithernames(3), aa_drivers(3), aa_kbddrivers(3), aa_mousedrivers(3), aa_kbdrecommended(3), aa_mouserecommended(3), aa_displayrecommended(3), aa_defparams(3), aa_defrenderparams(3), aa_scrwidth(3), aa_scrheight(3), aa_mmwidth(3), aa_mmheight(3), aa_imgwidth(3), aa_imgheight(3), aa_image(3), aa_text(3), aa_attrs(3), aa_autoinit(3), aa_autoinitkbd(3), aa_autoinitmouse(3), aa_recommendhi(3), aa_recommendlow(3), aa_init(3), aa_initkbd(3), aa_initmouse(3), aa_close(3), aa_uninitkbd(3), aa_uninitmouse(3), aa_fastrender(3), aa_render(3), aa_puts(3), aa_printf(3), aa_gotoxy(3), aa_hidecursor(3), aa_showcursor(3), aa_getmouse(3), aa_hidemouse(3), aa_showmouse(3), aa_registerfont(3), aa_setsupported(3), aa_setfont(3), aa_getevent(3), aa_getkey(3), aa_resize(3), aa_resizehandler(3), aa_parseoptions(3), aa_edit(3), aa_createedit(3), aa_editkey(3), aa_putpixel(3), aa_recommendhikbd(3), aa_recommendlowkbd(3), aa_recommendhimouse(3), aa_recommendlowmouse(3), aa_recommendhidisplay(3), aa_recommendlowdisplay(3) aalib-1.4.0/man/aa_defparams.30000644000766200001440000000303007272031253011510 .\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! .\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! .TH "aa_defparams" 3 "8 September 1999" "c2man aalib.h" .SH "NAME" aa_defparams \- default hardware paramters requested by AA-lib programs. .SH "SYNOPSIS" .ft B #include .sp extern struct aa_hardware_params aa_defparams; .ft R .SH "DESCRIPTION" Pa Default hardware paramters requested by AA-lib programs. Passed to aa_init function familly. .SH "SEE ALSO" save_d(3), mem_d(3), aa_help(3), aa_formats(3), aa_fonts(3), aa_dithernames(3), aa_drivers(3), aa_kbddrivers(3), aa_mousedrivers(3), aa_kbdrecommended(3), aa_mouserecommended(3), aa_displayrecommended(3), aa_defrenderparams(3), aa_scrwidth(3), aa_scrheight(3), aa_mmwidth(3), aa_mmheight(3), aa_imgwidth(3), aa_imgheight(3), aa_image(3), aa_text(3), aa_attrs(3), aa_currentfont(3), aa_autoinit(3), aa_autoinitkbd(3), aa_autoinitmouse(3), aa_recommendhi(3), aa_recommendlow(3), aa_init(3), aa_initkbd(3), aa_initmouse(3), aa_close(3), aa_uninitkbd(3), aa_uninitmouse(3), aa_fastrender(3), aa_render(3), aa_puts(3), aa_printf(3), aa_gotoxy(3), aa_hidecursor(3), aa_showcursor(3), aa_getmouse(3), aa_hidemouse(3), aa_showmouse(3), aa_registerfont(3), aa_setsupported(3), aa_setfont(3), aa_getevent(3), aa_getkey(3), aa_resize(3), aa_resizehandler(3), aa_parseoptions(3), aa_edit(3), aa_createedit(3), aa_editkey(3), aa_putpixel(3), aa_recommendhikbd(3), aa_recommendlowkbd(3), aa_recommendhimouse(3), aa_recommendlowmouse(3), aa_recommendhidisplay(3), aa_recommendlowdisplay(3) aalib-1.4.0/man/aa_defrenderparams.30000644000766200001440000000275107272031253012721 .\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! .\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! .TH "aa_defrenderparams" 3 "8 September 1999" "c2man aalib.h" .SH "NAME" aa_defrenderparams \- default rendering parameters. .SH "SYNOPSIS" .ft B #include .sp extern struct aa_renderparams aa_defrenderparams; .ft R .SH "DESCRIPTION" Default rendering parameters. Passed to aa_render function familly. .SH "SEE ALSO" save_d(3), mem_d(3), aa_help(3), aa_formats(3), aa_fonts(3), aa_dithernames(3), aa_drivers(3), aa_kbddrivers(3), aa_mousedrivers(3), aa_kbdrecommended(3), aa_mouserecommended(3), aa_displayrecommended(3), aa_defparams(3), aa_scrwidth(3), aa_scrheight(3), aa_mmwidth(3), aa_mmheight(3), aa_imgwidth(3), aa_imgheight(3), aa_image(3), aa_text(3), aa_attrs(3), aa_currentfont(3), aa_autoinit(3), aa_autoinitkbd(3), aa_autoinitmouse(3), aa_recommendhi(3), aa_recommendlow(3), aa_init(3), aa_initkbd(3), aa_initmouse(3), aa_close(3), aa_uninitkbd(3), aa_uninitmouse(3), aa_fastrender(3), aa_render(3), aa_puts(3), aa_printf(3), aa_gotoxy(3), aa_hidecursor(3), aa_showcursor(3), aa_getmouse(3), aa_hidemouse(3), aa_showmouse(3), aa_registerfont(3), aa_setsupported(3), aa_setfont(3), aa_getevent(3), aa_getkey(3), aa_resize(3), aa_resizehandler(3), aa_parseoptions(3), aa_edit(3), aa_createedit(3), aa_editkey(3), aa_putpixel(3), aa_recommendhikbd(3), aa_recommendlowkbd(3), aa_recommendhimouse(3), aa_recommendlowmouse(3), aa_recommendhidisplay(3), aa_recommendlowdisplay(3) aalib-1.4.0/man/aa_displayrecommended.30000644000766200001440000000303407272031253013422 .\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! .\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! .TH "aa_displayrecommended" 3 "8 September 1999" "c2man aalib.h" .SH "NAME" aa_displayrecommended \- List of recommended drivers. .SH "SYNOPSIS" .ft B #include .sp extern aa_linkedlist *aa_displayrecommended; .ft R .SH "DESCRIPTION" List of recommended drivers is used by aa_autoinit familly of functions and altered by aa_recommend familly of functions. .SH "SEE ALSO" save_d(3), mem_d(3), aa_help(3), aa_formats(3), aa_fonts(3), aa_dithernames(3), aa_drivers(3), aa_kbddrivers(3), aa_mousedrivers(3), aa_kbdrecommended(3), aa_mouserecommended(3), aa_defparams(3), aa_defrenderparams(3), aa_scrwidth(3), aa_scrheight(3), aa_mmwidth(3), aa_mmheight(3), aa_imgwidth(3), aa_imgheight(3), aa_image(3), aa_text(3), aa_attrs(3), aa_currentfont(3), aa_autoinit(3), aa_autoinitkbd(3), aa_autoinitmouse(3), aa_recommendhi(3), aa_recommendlow(3), aa_init(3), aa_initkbd(3), aa_initmouse(3), aa_close(3), aa_uninitkbd(3), aa_uninitmouse(3), aa_fastrender(3), aa_render(3), aa_puts(3), aa_printf(3), aa_gotoxy(3), aa_hidecursor(3), aa_showcursor(3), aa_getmouse(3), aa_hidemouse(3), aa_showmouse(3), aa_registerfont(3), aa_setsupported(3), aa_setfont(3), aa_getevent(3), aa_getkey(3), aa_resize(3), aa_resizehandler(3), aa_parseoptions(3), aa_edit(3), aa_createedit(3), aa_editkey(3), aa_putpixel(3), aa_recommendhikbd(3), aa_recommendlowkbd(3), aa_recommendhimouse(3), aa_recommendlowmouse(3), aa_recommendhidisplay(3), aa_recommendlowdisplay(3) aalib-1.4.0/man/aa_dithernames.30000644000766200001440000000301007272031253012047 .\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! .\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! .TH "aa_dithernames" 3 "8 September 1999" "c2man aalib.h" .SH "NAME" aa_dithernames \- Names of dithering methods supported by AA-lib. .SH "SYNOPSIS" .ft B #include .sp extern const char *const aa_dithernames[]; .ft R .SH "DESCRIPTION" NULL terminated array containing the names of supported dithering methods as ascii strings. .SH "SEE ALSO" save_d(3), mem_d(3), aa_help(3), aa_formats(3), aa_fonts(3), aa_drivers(3), aa_kbddrivers(3), aa_mousedrivers(3), aa_kbdrecommended(3), aa_mouserecommended(3), aa_displayrecommended(3), aa_defparams(3), aa_defrenderparams(3), aa_scrwidth(3), aa_scrheight(3), aa_mmwidth(3), aa_mmheight(3), aa_imgwidth(3), aa_imgheight(3), aa_image(3), aa_text(3), aa_attrs(3), aa_currentfont(3), aa_autoinit(3), aa_autoinitkbd(3), aa_autoinitmouse(3), aa_recommendhi(3), aa_recommendlow(3), aa_init(3), aa_initkbd(3), aa_initmouse(3), aa_close(3), aa_uninitkbd(3), aa_uninitmouse(3), aa_fastrender(3), aa_render(3), aa_puts(3), aa_printf(3), aa_gotoxy(3), aa_hidecursor(3), aa_showcursor(3), aa_getmouse(3), aa_hidemouse(3), aa_showmouse(3), aa_registerfont(3), aa_setsupported(3), aa_setfont(3), aa_getevent(3), aa_getkey(3), aa_resize(3), aa_resizehandler(3), aa_parseoptions(3), aa_edit(3), aa_createedit(3), aa_editkey(3), aa_putpixel(3), aa_recommendhikbd(3), aa_recommendlowkbd(3), aa_recommendhimouse(3), aa_recommendlowmouse(3), aa_recommendhidisplay(3), aa_recommendlowdisplay(3) aalib-1.4.0/man/aa_drivers.30000644000766200001440000000277207272031253011240 .\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! .\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! .TH "aa_drivers" 3 "8 September 1999" "c2man aalib.h" .SH "NAME" aa_drivers \- NULL-terminated array of output drivers available in AA-lib. .SH "SYNOPSIS" .ft B #include .sp extern const struct aa_driver *const aa_drivers[]; .ft R .SH "DESCRIPTION" NULL-terminated array of output drivers available in AA-lib. .SH "SEE ALSO" save_d(3), mem_d(3), aa_help(3), aa_formats(3), aa_fonts(3), aa_dithernames(3), aa_kbddrivers(3), aa_mousedrivers(3), aa_kbdrecommended(3), aa_mouserecommended(3), aa_displayrecommended(3), aa_defparams(3), aa_defrenderparams(3), aa_scrwidth(3), aa_scrheight(3), aa_mmwidth(3), aa_mmheight(3), aa_imgwidth(3), aa_imgheight(3), aa_image(3), aa_text(3), aa_attrs(3), aa_currentfont(3), aa_autoinit(3), aa_autoinitkbd(3), aa_autoinitmouse(3), aa_recommendhi(3), aa_recommendlow(3), aa_init(3), aa_initkbd(3), aa_initmouse(3), aa_close(3), aa_uninitkbd(3), aa_uninitmouse(3), aa_fastrender(3), aa_render(3), aa_puts(3), aa_printf(3), aa_gotoxy(3), aa_hidecursor(3), aa_showcursor(3), aa_getmouse(3), aa_hidemouse(3), aa_showmouse(3), aa_registerfont(3), aa_setsupported(3), aa_setfont(3), aa_getevent(3), aa_getkey(3), aa_resize(3), aa_resizehandler(3), aa_parseoptions(3), aa_edit(3), aa_createedit(3), aa_editkey(3), aa_putpixel(3), aa_recommendhikbd(3), aa_recommendlowkbd(3), aa_recommendhimouse(3), aa_recommendlowmouse(3), aa_recommendhidisplay(3), aa_recommendlowdisplay(3) aalib-1.4.0/man/aa_edit.30000644000766200001440000000362607272031253010506 .\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! .\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! .TH "aa_edit" 3 "8 September 1999" "c2man aalib.h" .SH "NAME" aa_edit \- Simple interactive line editor. .SH "SYNOPSIS" .ft B #include .sp void aa_edit .br ( .br aa_context *c, .br int x, .br int y, .br int size, .br char *s, .br int maxsize .br ); .ft R .SH "PARAMETERS" .TP .B "aa_context *c" Specifies the AA-lib context to operate on. .TP .B "int x" X coordinate of the edited text. .TP .B "int y" Y coordinate of the edited text. .TP .B "int size" Length of the editor window. .TP .B "char *s" Buffer to edit (containing default value). .TP .B "int maxsize" Size of the buffer. .SH "DESCRIPTION" This function produces the simple interactive line editor that can be used by AA-lib programs to input strings. .SH "SEE ALSO" save_d(3), mem_d(3), aa_help(3), aa_formats(3), aa_fonts(3), aa_dithernames(3), aa_drivers(3), aa_kbddrivers(3), aa_mousedrivers(3), aa_kbdrecommended(3), aa_mouserecommended(3), aa_displayrecommended(3), aa_defparams(3), aa_defrenderparams(3), aa_scrwidth(3), aa_scrheight(3), aa_mmwidth(3), aa_mmheight(3), aa_imgwidth(3), aa_imgheight(3), aa_image(3), aa_text(3), aa_attrs(3), aa_currentfont(3), aa_autoinit(3), aa_autoinitkbd(3), aa_autoinitmouse(3), aa_recommendhi(3), aa_recommendlow(3), aa_init(3), aa_initkbd(3), aa_initmouse(3), aa_close(3), aa_uninitkbd(3), aa_uninitmouse(3), aa_fastrender(3), aa_render(3), aa_puts(3), aa_printf(3), aa_gotoxy(3), aa_hidecursor(3), aa_showcursor(3), aa_getmouse(3), aa_hidemouse(3), aa_showmouse(3), aa_registerfont(3), aa_setsupported(3), aa_setfont(3), aa_getevent(3), aa_getkey(3), aa_resize(3), aa_resizehandler(3), aa_parseoptions(3), aa_createedit(3), aa_editkey(3), aa_putpixel(3), aa_recommendhikbd(3), aa_recommendlowkbd(3), aa_recommendhimouse(3), aa_recommendlowmouse(3), aa_recommendhidisplay(3), aa_recommendlowdisplay(3) aalib-1.4.0/man/aa_editkey.30000644000766200001440000000311607272031253011211 .\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! .\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! .TH "aa_editkey" 3 "8 September 1999" "c2man aalib.h" .SH "NAME" aa_editkey \- Notify the line editor about keypress. .SH "SYNOPSIS" .ft B #include .sp void aa_editkey .br ( .br struct aa_edit *e, .br int c .br ); .ft R .SH "PARAMETERS" .TP .B "struct aa_edit *e" Editor context to use (see aa_createedit). .TP .B "int c" Key pressed. .SH "DESCRIPTION" Notify the line editor about keypress. .SH "SEE ALSO" save_d(3), mem_d(3), aa_help(3), aa_formats(3), aa_fonts(3), aa_dithernames(3), aa_drivers(3), aa_kbddrivers(3), aa_mousedrivers(3), aa_kbdrecommended(3), aa_mouserecommended(3), aa_displayrecommended(3), aa_defparams(3), aa_defrenderparams(3), aa_scrwidth(3), aa_scrheight(3), aa_mmwidth(3), aa_mmheight(3), aa_imgwidth(3), aa_imgheight(3), aa_image(3), aa_text(3), aa_attrs(3), aa_currentfont(3), aa_autoinit(3), aa_autoinitkbd(3), aa_autoinitmouse(3), aa_recommendhi(3), aa_recommendlow(3), aa_init(3), aa_initkbd(3), aa_initmouse(3), aa_close(3), aa_uninitkbd(3), aa_uninitmouse(3), aa_fastrender(3), aa_render(3), aa_puts(3), aa_printf(3), aa_gotoxy(3), aa_hidecursor(3), aa_showcursor(3), aa_getmouse(3), aa_hidemouse(3), aa_showmouse(3), aa_registerfont(3), aa_setsupported(3), aa_setfont(3), aa_getevent(3), aa_getkey(3), aa_resize(3), aa_resizehandler(3), aa_parseoptions(3), aa_edit(3), aa_createedit(3), aa_putpixel(3), aa_recommendhikbd(3), aa_recommendlowkbd(3), aa_recommendhimouse(3), aa_recommendlowmouse(3), aa_recommendhidisplay(3), aa_recommendlowdisplay(3) aalib-1.4.0/man/aa_fastrender.30000644000766200001440000000415407272031253011713 .\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! .\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! .TH "aa_fastrender" 3 "8 September 1999" "c2man aalib.h" .SH "NAME" aa_fastrender \- simple and fast AA-lib rendering function. .SH "SYNOPSIS" .ft B #include .sp void aa_fastrender .br ( .br aa_context *c, .br int x1, .br int y1, .br int x2, .br int y2 .br ); .ft R .SH "PARAMETERS" .TP .B "aa_context *c" Specifies the AA-lib context to operate on. .TP .B "int x1" Column of top left coner of rendered area (in characters!). .TP .B "int y1" Row of top left coner of rendered area. .TP .B "int x2" Column of bottom right coner of rendered area. .TP .B "int y2" Row of bottom right coner of rendered area. .SH "DESCRIPTION" This function does the trick of converting the emulated framebuffer into high quality ASCII-art. It is slightly faster and less flexible the aa_render function. Note that to see the effect you need to call aa_flush too. First call to this function may take a while, because the rendering tables are produced. .SH "SEE ALSO" save_d(3), mem_d(3), aa_help(3), aa_formats(3), aa_fonts(3), aa_dithernames(3), aa_drivers(3), aa_kbddrivers(3), aa_mousedrivers(3), aa_kbdrecommended(3), aa_mouserecommended(3), aa_displayrecommended(3), aa_defparams(3), aa_defrenderparams(3), aa_scrwidth(3), aa_scrheight(3), aa_mmwidth(3), aa_mmheight(3), aa_imgwidth(3), aa_imgheight(3), aa_image(3), aa_text(3), aa_attrs(3), aa_currentfont(3), aa_autoinit(3), aa_autoinitkbd(3), aa_autoinitmouse(3), aa_recommendhi(3), aa_recommendlow(3), aa_init(3), aa_initkbd(3), aa_initmouse(3), aa_close(3), aa_uninitkbd(3), aa_uninitmouse(3), aa_render(3), aa_puts(3), aa_printf(3), aa_gotoxy(3), aa_hidecursor(3), aa_showcursor(3), aa_getmouse(3), aa_hidemouse(3), aa_showmouse(3), aa_registerfont(3), aa_setsupported(3), aa_setfont(3), aa_getevent(3), aa_getkey(3), aa_resize(3), aa_resizehandler(3), aa_parseoptions(3), aa_edit(3), aa_createedit(3), aa_editkey(3), aa_putpixel(3), aa_recommendhikbd(3), aa_recommendlowkbd(3), aa_recommendhimouse(3), aa_recommendlowmouse(3), aa_recommendhidisplay(3), aa_recommendlowdisplay(3) aalib-1.4.0/man/aa_fonts.30000644000766200001440000000271007272031253010703 .\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! .\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! .TH "aa_fonts" 3 "8 September 1999" "c2man aalib.h" .SH "NAME" aa_fonts \- Null-terminated array of available fonts. .SH "SYNOPSIS" .ft B #include .sp extern const struct aa_font *aa_fonts[]; .ft R .SH "DESCRIPTION" Null-terminated array of available fonts. .SH "SEE ALSO" save_d(3), mem_d(3), aa_help(3), aa_formats(3), aa_dithernames(3), aa_drivers(3), aa_kbddrivers(3), aa_mousedrivers(3), aa_kbdrecommended(3), aa_mouserecommended(3), aa_displayrecommended(3), aa_defparams(3), aa_defrenderparams(3), aa_scrwidth(3), aa_scrheight(3), aa_mmwidth(3), aa_mmheight(3), aa_imgwidth(3), aa_imgheight(3), aa_image(3), aa_text(3), aa_attrs(3), aa_currentfont(3), aa_autoinit(3), aa_autoinitkbd(3), aa_autoinitmouse(3), aa_recommendhi(3), aa_recommendlow(3), aa_init(3), aa_initkbd(3), aa_initmouse(3), aa_close(3), aa_uninitkbd(3), aa_uninitmouse(3), aa_fastrender(3), aa_render(3), aa_puts(3), aa_printf(3), aa_gotoxy(3), aa_hidecursor(3), aa_showcursor(3), aa_getmouse(3), aa_hidemouse(3), aa_showmouse(3), aa_registerfont(3), aa_setsupported(3), aa_setfont(3), aa_getevent(3), aa_getkey(3), aa_resize(3), aa_resizehandler(3), aa_parseoptions(3), aa_edit(3), aa_createedit(3), aa_editkey(3), aa_putpixel(3), aa_recommendhikbd(3), aa_recommendlowkbd(3), aa_recommendhimouse(3), aa_recommendlowmouse(3), aa_recommendhidisplay(3), aa_recommendlowdisplay(3) aalib-1.4.0/man/aa_formats.30000644000766200001440000000276607272031253011240 .\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! .\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! .TH "aa_formats" 3 "8 September 1999" "c2man aalib.h" .SH "NAME" aa_formats \- NULL terminated array of save formats supported by AA-lib. .SH "SYNOPSIS" .ft B #include .sp extern const struct aa_format *const aa_formats[]; .ft R .SH "DESCRIPTION" NULL terminated array of save formats supported by AA-lib. .SH "SEE ALSO" save_d(3), mem_d(3), aa_help(3), aa_fonts(3), aa_dithernames(3), aa_drivers(3), aa_kbddrivers(3), aa_mousedrivers(3), aa_kbdrecommended(3), aa_mouserecommended(3), aa_displayrecommended(3), aa_defparams(3), aa_defrenderparams(3), aa_scrwidth(3), aa_scrheight(3), aa_mmwidth(3), aa_mmheight(3), aa_imgwidth(3), aa_imgheight(3), aa_image(3), aa_text(3), aa_attrs(3), aa_currentfont(3), aa_autoinit(3), aa_autoinitkbd(3), aa_autoinitmouse(3), aa_recommendhi(3), aa_recommendlow(3), aa_init(3), aa_initkbd(3), aa_initmouse(3), aa_close(3), aa_uninitkbd(3), aa_uninitmouse(3), aa_fastrender(3), aa_render(3), aa_puts(3), aa_printf(3), aa_gotoxy(3), aa_hidecursor(3), aa_showcursor(3), aa_getmouse(3), aa_hidemouse(3), aa_showmouse(3), aa_registerfont(3), aa_setsupported(3), aa_setfont(3), aa_getevent(3), aa_getkey(3), aa_resize(3), aa_resizehandler(3), aa_parseoptions(3), aa_edit(3), aa_createedit(3), aa_editkey(3), aa_putpixel(3), aa_recommendhikbd(3), aa_recommendlowkbd(3), aa_recommendhimouse(3), aa_recommendlowmouse(3), aa_recommendhidisplay(3), aa_recommendlowdisplay(3) aalib-1.4.0/man/aa_getevent.30000644000766200001440000000365207272031253011401 .\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! .\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! .TH "aa_getevent" 3 "8 September 1999" "c2man aalib.h" .SH "NAME" aa_getevent \- keyboard functions .SH "SYNOPSIS" .ft B #include .sp int aa_getevent .br ( .br aa_context *c, .br int wait .br ); .ft R .SH "PARAMETERS" .TP .B "aa_context *c" Specifies the AA-lib context to operate on. .TP .B "int wait" 1 if you wish to wait for the even when queue is empty. .SH "DESCRIPTION" Return next event from queue. Return next even from queue. Optionally wait for even when queue is empty. .SH "RETURNS" Next event from queue (values lower than 256 are used to report ascii values of pressed keys and higher values have special meanings) See the AA-lib texinfo documentation for more details. 0 is returned when queue is empty and wait is set to 0. .SH "SEE ALSO" save_d(3), mem_d(3), aa_help(3), aa_formats(3), aa_fonts(3), aa_dithernames(3), aa_drivers(3), aa_kbddrivers(3), aa_mousedrivers(3), aa_kbdrecommended(3), aa_mouserecommended(3), aa_displayrecommended(3), aa_defparams(3), aa_defrenderparams(3), aa_scrwidth(3), aa_scrheight(3), aa_mmwidth(3), aa_mmheight(3), aa_imgwidth(3), aa_imgheight(3), aa_image(3), aa_text(3), aa_attrs(3), aa_currentfont(3), aa_autoinit(3), aa_autoinitkbd(3), aa_autoinitmouse(3), aa_recommendhi(3), aa_recommendlow(3), aa_init(3), aa_initkbd(3), aa_initmouse(3), aa_close(3), aa_uninitkbd(3), aa_uninitmouse(3), aa_fastrender(3), aa_render(3), aa_puts(3), aa_printf(3), aa_gotoxy(3), aa_hidecursor(3), aa_showcursor(3), aa_getmouse(3), aa_hidemouse(3), aa_showmouse(3), aa_registerfont(3), aa_setsupported(3), aa_setfont(3), aa_getkey(3), aa_resize(3), aa_resizehandler(3), aa_parseoptions(3), aa_edit(3), aa_createedit(3), aa_editkey(3), aa_putpixel(3), aa_recommendhikbd(3), aa_recommendlowkbd(3), aa_recommendhimouse(3), aa_recommendlowmouse(3), aa_recommendhidisplay(3), aa_recommendlowdisplay(3) aalib-1.4.0/man/aa_getkey.30000644000766200001440000000354707272031253011053 .\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! .\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! .TH "aa_getkey" 3 "8 September 1999" "c2man aalib.h" .SH "NAME" aa_getkey \- return next keypress event from queue. .SH "SYNOPSIS" .ft B #include .sp int aa_getkey .br ( .br aa_context *c, .br int wait .br ); .ft R .SH "PARAMETERS" .TP .B "aa_context *c" Specifies the AA-lib context to operate on. .TP .B "int wait" 1 if you wish to wait for the even when queue is empty. .SH "DESCRIPTION" Return next keypress event from queue. .SH "RETURNS" Next keypress event from queue (values lower than 256 are used to report ascii values of pressed keys and higher values are used to represent some special keys like arrows) See the AA-lib texinfo documentation for more details. .SH "SEE ALSO" save_d(3), mem_d(3), aa_help(3), aa_formats(3), aa_fonts(3), aa_dithernames(3), aa_drivers(3), aa_kbddrivers(3), aa_mousedrivers(3), aa_kbdrecommended(3), aa_mouserecommended(3), aa_displayrecommended(3), aa_defparams(3), aa_defrenderparams(3), aa_scrwidth(3), aa_scrheight(3), aa_mmwidth(3), aa_mmheight(3), aa_imgwidth(3), aa_imgheight(3), aa_image(3), aa_text(3), aa_attrs(3), aa_currentfont(3), aa_autoinit(3), aa_autoinitkbd(3), aa_autoinitmouse(3), aa_recommendhi(3), aa_recommendlow(3), aa_init(3), aa_initkbd(3), aa_initmouse(3), aa_close(3), aa_uninitkbd(3), aa_uninitmouse(3), aa_fastrender(3), aa_render(3), aa_puts(3), aa_printf(3), aa_gotoxy(3), aa_hidecursor(3), aa_showcursor(3), aa_getmouse(3), aa_hidemouse(3), aa_showmouse(3), aa_registerfont(3), aa_setsupported(3), aa_setfont(3), aa_getevent(3), aa_resize(3), aa_resizehandler(3), aa_parseoptions(3), aa_edit(3), aa_createedit(3), aa_editkey(3), aa_putpixel(3), aa_recommendhikbd(3), aa_recommendlowkbd(3), aa_recommendhimouse(3), aa_recommendlowmouse(3), aa_recommendhidisplay(3), aa_recommendlowdisplay(3) aalib-1.4.0/man/aa_getmouse.30000644000766200001440000000360207272031253011403 .\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! .\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! .TH "aa_getmouse" 3 "8 September 1999" "c2man aalib.h" .SH "NAME" aa_getmouse \- Get mouse position as specified by last mouse event read by aa_getevent. .SH "SYNOPSIS" .ft B #include .sp void aa_getmouse .br ( .br aa_context *c, .br int *x, .br int *y, .br int *b .br ); .ft R .SH "PARAMETERS" .TP .B "aa_context *c" Specifies the AA-lib context to operate on. .TP .B "int *x" Used to return X coordinate of mouse in characters. .TP .B "int *y" Used to return Y coordinate of mouse in characters. .TP .B "int *b" Used to return button mask of mouse. (Values used are AA_BUTTON1, AA_BUTTON2 and AA_BUTTON3). .SH "DESCRIPTION" Get mouse position as specified by last mouse event read by aa_getevent. .SH "SEE ALSO" save_d(3), mem_d(3), aa_help(3), aa_formats(3), aa_fonts(3), aa_dithernames(3), aa_drivers(3), aa_kbddrivers(3), aa_mousedrivers(3), aa_kbdrecommended(3), aa_mouserecommended(3), aa_displayrecommended(3), aa_defparams(3), aa_defrenderparams(3), aa_scrwidth(3), aa_scrheight(3), aa_mmwidth(3), aa_mmheight(3), aa_imgwidth(3), aa_imgheight(3), aa_image(3), aa_text(3), aa_attrs(3), aa_currentfont(3), aa_autoinit(3), aa_autoinitkbd(3), aa_autoinitmouse(3), aa_recommendhi(3), aa_recommendlow(3), aa_init(3), aa_initkbd(3), aa_initmouse(3), aa_close(3), aa_uninitkbd(3), aa_uninitmouse(3), aa_fastrender(3), aa_render(3), aa_puts(3), aa_printf(3), aa_gotoxy(3), aa_hidecursor(3), aa_showcursor(3), aa_hidemouse(3), aa_showmouse(3), aa_registerfont(3), aa_setsupported(3), aa_setfont(3), aa_getevent(3), aa_getkey(3), aa_resize(3), aa_resizehandler(3), aa_parseoptions(3), aa_edit(3), aa_createedit(3), aa_editkey(3), aa_putpixel(3), aa_recommendhikbd(3), aa_recommendlowkbd(3), aa_recommendhimouse(3), aa_recommendlowmouse(3), aa_recommendhidisplay(3), aa_recommendlowdisplay(3) aalib-1.4.0/man/aa_gotoxy.30000644000766200001440000000334407272031253011107 .\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! .\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! .TH "aa_gotoxy" 3 "8 September 1999" "c2man aalib.h" .SH "NAME" aa_gotoxy \- move the hardware cursor (if any) to specified position. .SH "SYNOPSIS" .ft B #include .sp void aa_gotoxy .br ( .br aa_context *c, .br int x, .br int y .br ); .ft R .SH "PARAMETERS" .TP .B "aa_context *c" Specifies the AA-lib context to operate on. .TP .B "int x" X coordinate of new position. .TP .B "int y" Y coordinate of the position. .SH "DESCRIPTION" Move the hardware cursor (if any) to specified position. To see the effect you need to call aa_flush too. .SH "SEE ALSO" save_d(3), mem_d(3), aa_help(3), aa_formats(3), aa_fonts(3), aa_dithernames(3), aa_drivers(3), aa_kbddrivers(3), aa_mousedrivers(3), aa_kbdrecommended(3), aa_mouserecommended(3), aa_displayrecommended(3), aa_defparams(3), aa_defrenderparams(3), aa_scrwidth(3), aa_scrheight(3), aa_mmwidth(3), aa_mmheight(3), aa_imgwidth(3), aa_imgheight(3), aa_image(3), aa_text(3), aa_attrs(3), aa_currentfont(3), aa_autoinit(3), aa_autoinitkbd(3), aa_autoinitmouse(3), aa_recommendhi(3), aa_recommendlow(3), aa_init(3), aa_initkbd(3), aa_initmouse(3), aa_close(3), aa_uninitkbd(3), aa_uninitmouse(3), aa_fastrender(3), aa_render(3), aa_puts(3), aa_printf(3), aa_hidecursor(3), aa_showcursor(3), aa_getmouse(3), aa_hidemouse(3), aa_showmouse(3), aa_registerfont(3), aa_setsupported(3), aa_setfont(3), aa_getevent(3), aa_getkey(3), aa_resize(3), aa_resizehandler(3), aa_parseoptions(3), aa_edit(3), aa_createedit(3), aa_editkey(3), aa_putpixel(3), aa_recommendhikbd(3), aa_recommendlowkbd(3), aa_recommendhimouse(3), aa_recommendlowmouse(3), aa_recommendhidisplay(3), aa_recommendlowdisplay(3) aalib-1.4.0/man/aa_help.30000644000766200001440000000273407272031253010510 .\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! .\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! .TH "aa_help" 3 "8 September 1999" "c2man aalib.h" .SH "NAME" aa_help \- AA-lib help string for the default command line parser. .SH "SYNOPSIS" .ft B #include .sp extern const char *const aa_help; .ft R .SH "DESCRIPTION" AA-lib help string for the default command line parser. .SH "SEE ALSO" save_d(3), mem_d(3), aa_formats(3), aa_fonts(3), aa_dithernames(3), aa_drivers(3), aa_kbddrivers(3), aa_mousedrivers(3), aa_kbdrecommended(3), aa_mouserecommended(3), aa_displayrecommended(3), aa_defparams(3), aa_defrenderparams(3), aa_scrwidth(3), aa_scrheight(3), aa_mmwidth(3), aa_mmheight(3), aa_imgwidth(3), aa_imgheight(3), aa_image(3), aa_text(3), aa_attrs(3), aa_currentfont(3), aa_autoinit(3), aa_autoinitkbd(3), aa_autoinitmouse(3), aa_recommendhi(3), aa_recommendlow(3), aa_init(3), aa_initkbd(3), aa_initmouse(3), aa_close(3), aa_uninitkbd(3), aa_uninitmouse(3), aa_fastrender(3), aa_render(3), aa_puts(3), aa_printf(3), aa_gotoxy(3), aa_hidecursor(3), aa_showcursor(3), aa_getmouse(3), aa_hidemouse(3), aa_showmouse(3), aa_registerfont(3), aa_setsupported(3), aa_setfont(3), aa_getevent(3), aa_getkey(3), aa_resize(3), aa_resizehandler(3), aa_parseoptions(3), aa_edit(3), aa_createedit(3), aa_editkey(3), aa_putpixel(3), aa_recommendhikbd(3), aa_recommendlowkbd(3), aa_recommendhimouse(3), aa_recommendlowmouse(3), aa_recommendhidisplay(3), aa_recommendlowdisplay(3) aalib-1.4.0/man/aa_hidecursor.30000644000766200001440000000305107272031253011720 .\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! .\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! .TH "aa_hidecursor" 3 "8 September 1999" "c2man aalib.h" .SH "NAME" aa_hidecursor \- hide the hardware cursor. .SH "SYNOPSIS" .ft B #include .sp void aa_hidecursor(aa_context *c); .ft R .SH "PARAMETERS" .TP .B "aa_context *c" Specifies the AA-lib context to operate on. .SH "DESCRIPTION" Hide the hardware cursor. This function may be ignored by some drivers. .SH "SEE ALSO" save_d(3), mem_d(3), aa_help(3), aa_formats(3), aa_fonts(3), aa_dithernames(3), aa_drivers(3), aa_kbddrivers(3), aa_mousedrivers(3), aa_kbdrecommended(3), aa_mouserecommended(3), aa_displayrecommended(3), aa_defparams(3), aa_defrenderparams(3), aa_scrwidth(3), aa_scrheight(3), aa_mmwidth(3), aa_mmheight(3), aa_imgwidth(3), aa_imgheight(3), aa_image(3), aa_text(3), aa_attrs(3), aa_currentfont(3), aa_autoinit(3), aa_autoinitkbd(3), aa_autoinitmouse(3), aa_recommendhi(3), aa_recommendlow(3), aa_init(3), aa_initkbd(3), aa_initmouse(3), aa_close(3), aa_uninitkbd(3), aa_uninitmouse(3), aa_fastrender(3), aa_render(3), aa_puts(3), aa_printf(3), aa_gotoxy(3), aa_showcursor(3), aa_getmouse(3), aa_hidemouse(3), aa_showmouse(3), aa_registerfont(3), aa_setsupported(3), aa_setfont(3), aa_getevent(3), aa_getkey(3), aa_resize(3), aa_resizehandler(3), aa_parseoptions(3), aa_edit(3), aa_createedit(3), aa_editkey(3), aa_putpixel(3), aa_recommendhikbd(3), aa_recommendlowkbd(3), aa_recommendhimouse(3), aa_recommendlowmouse(3), aa_recommendhidisplay(3), aa_recommendlowdisplay(3) aalib-1.4.0/man/aa_hidemouse.30000644000766200001440000000300507272031253011532 .\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! .\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! .TH "aa_hidemouse" 3 "8 September 1999" "c2man aalib.h" .SH "NAME" aa_hidemouse \- hide the mouse cursor. .SH "SYNOPSIS" .ft B #include .sp void aa_hidemouse(aa_context *c); .ft R .SH "PARAMETERS" .TP .B "aa_context *c" Not Documented. .SH "DESCRIPTION" Hide the mouse cursor. This function may be ignored by some drivers. .SH "SEE ALSO" save_d(3), mem_d(3), aa_help(3), aa_formats(3), aa_fonts(3), aa_dithernames(3), aa_drivers(3), aa_kbddrivers(3), aa_mousedrivers(3), aa_kbdrecommended(3), aa_mouserecommended(3), aa_displayrecommended(3), aa_defparams(3), aa_defrenderparams(3), aa_scrwidth(3), aa_scrheight(3), aa_mmwidth(3), aa_mmheight(3), aa_imgwidth(3), aa_imgheight(3), aa_image(3), aa_text(3), aa_attrs(3), aa_currentfont(3), aa_autoinit(3), aa_autoinitkbd(3), aa_autoinitmouse(3), aa_recommendhi(3), aa_recommendlow(3), aa_init(3), aa_initkbd(3), aa_initmouse(3), aa_close(3), aa_uninitkbd(3), aa_uninitmouse(3), aa_fastrender(3), aa_render(3), aa_puts(3), aa_printf(3), aa_gotoxy(3), aa_hidecursor(3), aa_showcursor(3), aa_getmouse(3), aa_showmouse(3), aa_registerfont(3), aa_setsupported(3), aa_setfont(3), aa_getevent(3), aa_getkey(3), aa_resize(3), aa_resizehandler(3), aa_parseoptions(3), aa_edit(3), aa_createedit(3), aa_editkey(3), aa_putpixel(3), aa_recommendhikbd(3), aa_recommendlowkbd(3), aa_recommendhimouse(3), aa_recommendlowmouse(3), aa_recommendhidisplay(3), aa_recommendlowdisplay(3) aalib-1.4.0/man/aa_image.30000644000766200001440000000340407272031253010635 .\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! .\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! .TH "aa_image" 3 "8 September 1999" "c2man aalib.h" .SH "NAME" aa_image \- returns pointer to the framebuffer emulated by AA-lib. .SH "SYNOPSIS" .ft B #include .sp char *aa_image(aa_context *a); .ft R .SH "PARAMETERS" .TP .B "aa_context *a" Specifies the AA-lib context to operate on. .SH "DESCRIPTION" The framebuffer is simple array of characters specifying the brightness value (or palette index depending on the aa_render call). The array is organizated in the aa_imgheight (a) rows of aa_imgwidth(a) characters. .SH "RETURNS" Pointer to framebuffer emulated by AA-lib. .SH "SEE ALSO" save_d(3), mem_d(3), aa_help(3), aa_formats(3), aa_fonts(3), aa_dithernames(3), aa_drivers(3), aa_kbddrivers(3), aa_mousedrivers(3), aa_kbdrecommended(3), aa_mouserecommended(3), aa_displayrecommended(3), aa_defparams(3), aa_defrenderparams(3), aa_scrwidth(3), aa_scrheight(3), aa_mmwidth(3), aa_mmheight(3), aa_imgwidth(3), aa_imgheight(3), aa_text(3), aa_attrs(3), aa_currentfont(3), aa_autoinit(3), aa_autoinitkbd(3), aa_autoinitmouse(3), aa_recommendhi(3), aa_recommendlow(3), aa_init(3), aa_initkbd(3), aa_initmouse(3), aa_close(3), aa_uninitkbd(3), aa_uninitmouse(3), aa_fastrender(3), aa_render(3), aa_puts(3), aa_printf(3), aa_gotoxy(3), aa_hidecursor(3), aa_showcursor(3), aa_getmouse(3), aa_hidemouse(3), aa_showmouse(3), aa_registerfont(3), aa_setsupported(3), aa_setfont(3), aa_getevent(3), aa_getkey(3), aa_resize(3), aa_resizehandler(3), aa_parseoptions(3), aa_edit(3), aa_createedit(3), aa_editkey(3), aa_putpixel(3), aa_recommendhikbd(3), aa_recommendlowkbd(3), aa_recommendhimouse(3), aa_recommendlowmouse(3), aa_recommendhidisplay(3), aa_recommendlowdisplay(3) aalib-1.4.0/man/aa_imgheight.30000644000766200001440000000304407272031253011520 .\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! .\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! .TH "aa_imgheight" 3 "8 September 1999" "c2man aalib.h" .SH "NAME" aa_imgheight \- returns height of the emulated image in pixels. .SH "SYNOPSIS" .ft B #include .sp int aa_imgheight(aa_context *a); .ft R .SH "PARAMETERS" .TP .B "aa_context *a" Specifies the AA-lib context to operate on. .SH "DESCRIPTION" Returns height of the emulated image in pixels. .SH "SEE ALSO" save_d(3), mem_d(3), aa_help(3), aa_formats(3), aa_fonts(3), aa_dithernames(3), aa_drivers(3), aa_kbddrivers(3), aa_mousedrivers(3), aa_kbdrecommended(3), aa_mouserecommended(3), aa_displayrecommended(3), aa_defparams(3), aa_defrenderparams(3), aa_scrwidth(3), aa_scrheight(3), aa_mmwidth(3), aa_mmheight(3), aa_imgwidth(3), aa_image(3), aa_text(3), aa_attrs(3), aa_currentfont(3), aa_autoinit(3), aa_autoinitkbd(3), aa_autoinitmouse(3), aa_recommendhi(3), aa_recommendlow(3), aa_init(3), aa_initkbd(3), aa_initmouse(3), aa_close(3), aa_uninitkbd(3), aa_uninitmouse(3), aa_fastrender(3), aa_render(3), aa_puts(3), aa_printf(3), aa_gotoxy(3), aa_hidecursor(3), aa_showcursor(3), aa_getmouse(3), aa_hidemouse(3), aa_showmouse(3), aa_registerfont(3), aa_setsupported(3), aa_setfont(3), aa_getevent(3), aa_getkey(3), aa_resize(3), aa_resizehandler(3), aa_parseoptions(3), aa_edit(3), aa_createedit(3), aa_editkey(3), aa_putpixel(3), aa_recommendhikbd(3), aa_recommendlowkbd(3), aa_recommendhimouse(3), aa_recommendlowmouse(3), aa_recommendhidisplay(3), aa_recommendlowdisplay(3) aalib-1.4.0/man/aa_imgwidth.30000644000766200001440000000304007272031253011363 .\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! .\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! .TH "aa_imgwidth" 3 "8 September 1999" "c2man aalib.h" .SH "NAME" aa_imgwidth \- returns width of the emulated image in pixels. .SH "SYNOPSIS" .ft B #include .sp int aa_imgwidth(aa_context *a); .ft R .SH "PARAMETERS" .TP .B "aa_context *a" Specifies the AA-lib context to operate on. .SH "DESCRIPTION" Returns width of the emulated image in pixels. .SH "SEE ALSO" save_d(3), mem_d(3), aa_help(3), aa_formats(3), aa_fonts(3), aa_dithernames(3), aa_drivers(3), aa_kbddrivers(3), aa_mousedrivers(3), aa_kbdrecommended(3), aa_mouserecommended(3), aa_displayrecommended(3), aa_defparams(3), aa_defrenderparams(3), aa_scrwidth(3), aa_scrheight(3), aa_mmwidth(3), aa_mmheight(3), aa_imgheight(3), aa_image(3), aa_text(3), aa_attrs(3), aa_currentfont(3), aa_autoinit(3), aa_autoinitkbd(3), aa_autoinitmouse(3), aa_recommendhi(3), aa_recommendlow(3), aa_init(3), aa_initkbd(3), aa_initmouse(3), aa_close(3), aa_uninitkbd(3), aa_uninitmouse(3), aa_fastrender(3), aa_render(3), aa_puts(3), aa_printf(3), aa_gotoxy(3), aa_hidecursor(3), aa_showcursor(3), aa_getmouse(3), aa_hidemouse(3), aa_showmouse(3), aa_registerfont(3), aa_setsupported(3), aa_setfont(3), aa_getevent(3), aa_getkey(3), aa_resize(3), aa_resizehandler(3), aa_parseoptions(3), aa_edit(3), aa_createedit(3), aa_editkey(3), aa_putpixel(3), aa_recommendhikbd(3), aa_recommendlowkbd(3), aa_recommendhimouse(3), aa_recommendlowmouse(3), aa_recommendhidisplay(3), aa_recommendlowdisplay(3) aalib-1.4.0/man/aa_init.30000644000766200001440000000427407272031253010524 .\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! .\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! .TH "aa_init" 3 "8 September 1999" "c2man aalib.h" .SH "NAME" aa_init \- open the output display for AA-lib. .SH "SYNOPSIS" .ft B #include .sp aa_context *aa_init .br ( .br const struct aa_driver *driver, .br const struct aa_hardware_params *defparams, .br const void *driverdata .br ); .ft R .SH "PARAMETERS" .TP .B "const struct aa_driver *driver" Driver you want to use. Available drivers are listed in the NULL terminated aa_drivers array. .TP .B "const struct aa_hardware_params *defparams" Hardware parameters you want. Use aa_defparams for default values. .TP .B "const void *driverdata" This pointer is passed dirrectly to driver used to specify additional driver dependent parameters. .SH "DESCRIPTION" This is the most primitive AA-lib initialization function. Allows better control over the process than the easier to use aa_autoinit function. Every AA-lib program ought to have call to aa_parseoptions before first call to aa_init. .SH "RETURNS" Pointer to new AA-lib context or NULL if failed. .SH "SEE ALSO" save_d(3), mem_d(3), aa_help(3), aa_formats(3), aa_fonts(3), aa_dithernames(3), aa_drivers(3), aa_kbddrivers(3), aa_mousedrivers(3), aa_kbdrecommended(3), aa_mouserecommended(3), aa_displayrecommended(3), aa_defparams(3), aa_defrenderparams(3), aa_scrwidth(3), aa_scrheight(3), aa_mmwidth(3), aa_mmheight(3), aa_imgwidth(3), aa_imgheight(3), aa_image(3), aa_text(3), aa_attrs(3), aa_currentfont(3), aa_autoinit(3), aa_autoinitkbd(3), aa_autoinitmouse(3), aa_recommendhi(3), aa_recommendlow(3), aa_initkbd(3), aa_initmouse(3), aa_close(3), aa_uninitkbd(3), aa_uninitmouse(3), aa_fastrender(3), aa_render(3), aa_puts(3), aa_printf(3), aa_gotoxy(3), aa_hidecursor(3), aa_showcursor(3), aa_getmouse(3), aa_hidemouse(3), aa_showmouse(3), aa_registerfont(3), aa_setsupported(3), aa_setfont(3), aa_getevent(3), aa_getkey(3), aa_resize(3), aa_resizehandler(3), aa_parseoptions(3), aa_edit(3), aa_createedit(3), aa_editkey(3), aa_putpixel(3), aa_recommendhikbd(3), aa_recommendlowkbd(3), aa_recommendhimouse(3), aa_recommendlowmouse(3), aa_recommendhidisplay(3), aa_recommendlowdisplay(3) aalib-1.4.0/man/aa_initkbd.30000644000766200001440000000371007272031253011177 .\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! .\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! .TH "aa_initkbd" 3 "8 September 1999" "c2man aalib.h" .SH "NAME" aa_initkbd \- initialize the AA-lib keyboard driver. .SH "SYNOPSIS" .ft B #include .sp int aa_initkbd .br ( .br struct aa_context *context, .br const struct aa_kbddriver *drv, .br int mode .br ); .ft R .SH "PARAMETERS" .TP .B "struct aa_context *context" Specifies the AA-lib context to operate on. .TP .B "const struct aa_kbddriver *drv" Driver you wish to use. .TP .B "int mode" Mask of extra features you request. Can contain AA_SENDRELEASE if you are interested in release events too. .SH "DESCRIPTION" This is the most primitive AA-lib keyboard initialization function. Allows better control over the process than the easier to use aa_autoinitkbd function. .SH "RETURNS" 1 on success and 0 on fail. .SH "SEE ALSO" save_d(3), mem_d(3), aa_help(3), aa_formats(3), aa_fonts(3), aa_dithernames(3), aa_drivers(3), aa_kbddrivers(3), aa_mousedrivers(3), aa_kbdrecommended(3), aa_mouserecommended(3), aa_displayrecommended(3), aa_defparams(3), aa_defrenderparams(3), aa_scrwidth(3), aa_scrheight(3), aa_mmwidth(3), aa_mmheight(3), aa_imgwidth(3), aa_imgheight(3), aa_image(3), aa_text(3), aa_attrs(3), aa_currentfont(3), aa_autoinit(3), aa_autoinitkbd(3), aa_autoinitmouse(3), aa_recommendhi(3), aa_recommendlow(3), aa_init(3), aa_initmouse(3), aa_close(3), aa_uninitkbd(3), aa_uninitmouse(3), aa_fastrender(3), aa_render(3), aa_puts(3), aa_printf(3), aa_gotoxy(3), aa_hidecursor(3), aa_showcursor(3), aa_getmouse(3), aa_hidemouse(3), aa_showmouse(3), aa_registerfont(3), aa_setsupported(3), aa_setfont(3), aa_getevent(3), aa_getkey(3), aa_resize(3), aa_resizehandler(3), aa_parseoptions(3), aa_edit(3), aa_createedit(3), aa_editkey(3), aa_putpixel(3), aa_recommendhikbd(3), aa_recommendlowkbd(3), aa_recommendhimouse(3), aa_recommendlowmouse(3), aa_recommendhidisplay(3), aa_recommendlowdisplay(3) aalib-1.4.0/man/aa_initmouse.30000644000766200001440000000366607272031253011601 .\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! .\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! .TH "aa_initmouse" 3 "8 September 1999" "c2man aalib.h" .SH "NAME" aa_initmouse \- initialize the AA-lib mouse driver. .SH "SYNOPSIS" .ft B #include .sp int aa_initmouse .br ( .br struct aa_context *c, .br const struct aa_mousedriver *d, .br int mode .br ); .ft R .SH "PARAMETERS" .TP .B "struct aa_context *c" Specifies the AA-lib context to operate on. .TP .B "const struct aa_mousedriver *d" Driver you wish to use. .TP .B "int mode" Mask of extra features you request. No such features are available in the current AA-lib version. .SH "DESCRIPTION" This is the most primitive AA-lib keyboard initialization function. Allows better control over the process than the easier to use aa_autoinitmouse function. .SH "RETURNS" 1 on success and 0 on fail. .SH "SEE ALSO" save_d(3), mem_d(3), aa_help(3), aa_formats(3), aa_fonts(3), aa_dithernames(3), aa_drivers(3), aa_kbddrivers(3), aa_mousedrivers(3), aa_kbdrecommended(3), aa_mouserecommended(3), aa_displayrecommended(3), aa_defparams(3), aa_defrenderparams(3), aa_scrwidth(3), aa_scrheight(3), aa_mmwidth(3), aa_mmheight(3), aa_imgwidth(3), aa_imgheight(3), aa_image(3), aa_text(3), aa_attrs(3), aa_currentfont(3), aa_autoinit(3), aa_autoinitkbd(3), aa_autoinitmouse(3), aa_recommendhi(3), aa_recommendlow(3), aa_init(3), aa_initkbd(3), aa_close(3), aa_uninitkbd(3), aa_uninitmouse(3), aa_fastrender(3), aa_render(3), aa_puts(3), aa_printf(3), aa_gotoxy(3), aa_hidecursor(3), aa_showcursor(3), aa_getmouse(3), aa_hidemouse(3), aa_showmouse(3), aa_registerfont(3), aa_setsupported(3), aa_setfont(3), aa_getevent(3), aa_getkey(3), aa_resize(3), aa_resizehandler(3), aa_parseoptions(3), aa_edit(3), aa_createedit(3), aa_editkey(3), aa_putpixel(3), aa_recommendhikbd(3), aa_recommendlowkbd(3), aa_recommendhimouse(3), aa_recommendlowmouse(3), aa_recommendhidisplay(3), aa_recommendlowdisplay(3) aalib-1.4.0/man/aa_kbddrivers.30000644000766200001440000000300707272031253011711 .\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! .\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! .TH "aa_kbddrivers" 3 "8 September 1999" "c2man aalib.h" .SH "NAME" aa_kbddrivers \- NULL-terminated array of keyboard drivers available in AA_lib. .SH "SYNOPSIS" .ft B #include .sp extern const struct aa_kbddriver *const aa_kbddrivers[]; .ft R .SH "DESCRIPTION" NULL-terminated array of keyboard drivers available in AA_lib. .SH "SEE ALSO" save_d(3), mem_d(3), aa_help(3), aa_formats(3), aa_fonts(3), aa_dithernames(3), aa_drivers(3), aa_mousedrivers(3), aa_kbdrecommended(3), aa_mouserecommended(3), aa_displayrecommended(3), aa_defparams(3), aa_defrenderparams(3), aa_scrwidth(3), aa_scrheight(3), aa_mmwidth(3), aa_mmheight(3), aa_imgwidth(3), aa_imgheight(3), aa_image(3), aa_text(3), aa_attrs(3), aa_currentfont(3), aa_autoinit(3), aa_autoinitkbd(3), aa_autoinitmouse(3), aa_recommendhi(3), aa_recommendlow(3), aa_init(3), aa_initkbd(3), aa_initmouse(3), aa_close(3), aa_uninitkbd(3), aa_uninitmouse(3), aa_fastrender(3), aa_render(3), aa_puts(3), aa_printf(3), aa_gotoxy(3), aa_hidecursor(3), aa_showcursor(3), aa_getmouse(3), aa_hidemouse(3), aa_showmouse(3), aa_registerfont(3), aa_setsupported(3), aa_setfont(3), aa_getevent(3), aa_getkey(3), aa_resize(3), aa_resizehandler(3), aa_parseoptions(3), aa_edit(3), aa_createedit(3), aa_editkey(3), aa_putpixel(3), aa_recommendhikbd(3), aa_recommendlowkbd(3), aa_recommendhimouse(3), aa_recommendlowmouse(3), aa_recommendhidisplay(3), aa_recommendlowdisplay(3) aalib-1.4.0/man/aa_kbdrecommended.30000644000766200001440000000302407272031253012514 .\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! .\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! .TH "aa_kbdrecommended" 3 "8 September 1999" "c2man aalib.h" .SH "NAME" aa_kbdrecommended \- List of recommended drivers. .SH "SYNOPSIS" .ft B #include .sp extern aa_linkedlist *aa_kbdrecommended; .ft R .SH "DESCRIPTION" List of recommended drivers is used by aa_autoinit familly of functions and altered by aa_recommend familly of functions. .SH "SEE ALSO" save_d(3), mem_d(3), aa_help(3), aa_formats(3), aa_fonts(3), aa_dithernames(3), aa_drivers(3), aa_kbddrivers(3), aa_mousedrivers(3), aa_mouserecommended(3), aa_displayrecommended(3), aa_defparams(3), aa_defrenderparams(3), aa_scrwidth(3), aa_scrheight(3), aa_mmwidth(3), aa_mmheight(3), aa_imgwidth(3), aa_imgheight(3), aa_image(3), aa_text(3), aa_attrs(3), aa_currentfont(3), aa_autoinit(3), aa_autoinitkbd(3), aa_autoinitmouse(3), aa_recommendhi(3), aa_recommendlow(3), aa_init(3), aa_initkbd(3), aa_initmouse(3), aa_close(3), aa_uninitkbd(3), aa_uninitmouse(3), aa_fastrender(3), aa_render(3), aa_puts(3), aa_printf(3), aa_gotoxy(3), aa_hidecursor(3), aa_showcursor(3), aa_getmouse(3), aa_hidemouse(3), aa_showmouse(3), aa_registerfont(3), aa_setsupported(3), aa_setfont(3), aa_getevent(3), aa_getkey(3), aa_resize(3), aa_resizehandler(3), aa_parseoptions(3), aa_edit(3), aa_createedit(3), aa_editkey(3), aa_putpixel(3), aa_recommendhikbd(3), aa_recommendlowkbd(3), aa_recommendhimouse(3), aa_recommendlowmouse(3), aa_recommendhidisplay(3), aa_recommendlowdisplay(3) aalib-1.4.0/man/aa_mmheight.30000644000766200001440000000305207272031253011354 .\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! .\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! .TH "aa_mmheight" 3 "8 September 1999" "c2man aalib.h" .SH "NAME" aa_mmheight \- returns height of the output screen in millimeters. .SH "SYNOPSIS" .ft B #include .sp int aa_mmheight(aa_context *a); .ft R .SH "PARAMETERS" .TP .B "aa_context *a" Specifies the AA-lib context to operate on. .SH "DESCRIPTION" Returns height of the output screen in millimeters. .SH "SEE ALSO" save_d(3), mem_d(3), aa_help(3), aa_formats(3), aa_fonts(3), aa_dithernames(3), aa_drivers(3), aa_kbddrivers(3), aa_mousedrivers(3), aa_kbdrecommended(3), aa_mouserecommended(3), aa_displayrecommended(3), aa_defparams(3), aa_defrenderparams(3), aa_scrwidth(3), aa_scrheight(3), aa_mmwidth(3), aa_imgwidth(3), aa_imgheight(3), aa_image(3), aa_text(3), aa_attrs(3), aa_currentfont(3), aa_autoinit(3), aa_autoinitkbd(3), aa_autoinitmouse(3), aa_recommendhi(3), aa_recommendlow(3), aa_init(3), aa_initkbd(3), aa_initmouse(3), aa_close(3), aa_uninitkbd(3), aa_uninitmouse(3), aa_fastrender(3), aa_render(3), aa_puts(3), aa_printf(3), aa_gotoxy(3), aa_hidecursor(3), aa_showcursor(3), aa_getmouse(3), aa_hidemouse(3), aa_showmouse(3), aa_registerfont(3), aa_setsupported(3), aa_setfont(3), aa_getevent(3), aa_getkey(3), aa_resize(3), aa_resizehandler(3), aa_parseoptions(3), aa_edit(3), aa_createedit(3), aa_editkey(3), aa_putpixel(3), aa_recommendhikbd(3), aa_recommendlowkbd(3), aa_recommendhimouse(3), aa_recommendlowmouse(3), aa_recommendhidisplay(3), aa_recommendlowdisplay(3) aalib-1.4.0/man/aa_mmwidth.30000644000766200001440000000304607272031253011226 .\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! .\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! .TH "aa_mmwidth" 3 "8 September 1999" "c2man aalib.h" .SH "NAME" aa_mmwidth \- returns width of the output screen in millimeters. .SH "SYNOPSIS" .ft B #include .sp int aa_mmwidth(aa_context *a); .ft R .SH "PARAMETERS" .TP .B "aa_context *a" Specifies the AA-lib context to operate on. .SH "DESCRIPTION" Returns width of the output screen in millimeters. .SH "SEE ALSO" save_d(3), mem_d(3), aa_help(3), aa_formats(3), aa_fonts(3), aa_dithernames(3), aa_drivers(3), aa_kbddrivers(3), aa_mousedrivers(3), aa_kbdrecommended(3), aa_mouserecommended(3), aa_displayrecommended(3), aa_defparams(3), aa_defrenderparams(3), aa_scrwidth(3), aa_scrheight(3), aa_mmheight(3), aa_imgwidth(3), aa_imgheight(3), aa_image(3), aa_text(3), aa_attrs(3), aa_currentfont(3), aa_autoinit(3), aa_autoinitkbd(3), aa_autoinitmouse(3), aa_recommendhi(3), aa_recommendlow(3), aa_init(3), aa_initkbd(3), aa_initmouse(3), aa_close(3), aa_uninitkbd(3), aa_uninitmouse(3), aa_fastrender(3), aa_render(3), aa_puts(3), aa_printf(3), aa_gotoxy(3), aa_hidecursor(3), aa_showcursor(3), aa_getmouse(3), aa_hidemouse(3), aa_showmouse(3), aa_registerfont(3), aa_setsupported(3), aa_setfont(3), aa_getevent(3), aa_getkey(3), aa_resize(3), aa_resizehandler(3), aa_parseoptions(3), aa_edit(3), aa_createedit(3), aa_editkey(3), aa_putpixel(3), aa_recommendhikbd(3), aa_recommendlowkbd(3), aa_recommendhimouse(3), aa_recommendlowmouse(3), aa_recommendhidisplay(3), aa_recommendlowdisplay(3) aalib-1.4.0/man/aa_mousedrivers.30000644000766200001440000000300707272031253012301 .\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! .\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! .TH "aa_mousedrivers" 3 "8 September 1999" "c2man aalib.h" .SH "NAME" aa_mousedrivers \- NULL terminated array of mouse drivers supported by AA-lib. .SH "SYNOPSIS" .ft B #include .sp extern const struct aa_mousedriver *const aa_mousedrivers[]; .ft R .SH "DESCRIPTION" NULL terminated array of mouse drivers supported by AA-lib. .SH "SEE ALSO" save_d(3), mem_d(3), aa_help(3), aa_formats(3), aa_fonts(3), aa_dithernames(3), aa_drivers(3), aa_kbddrivers(3), aa_kbdrecommended(3), aa_mouserecommended(3), aa_displayrecommended(3), aa_defparams(3), aa_defrenderparams(3), aa_scrwidth(3), aa_scrheight(3), aa_mmwidth(3), aa_mmheight(3), aa_imgwidth(3), aa_imgheight(3), aa_image(3), aa_text(3), aa_attrs(3), aa_currentfont(3), aa_autoinit(3), aa_autoinitkbd(3), aa_autoinitmouse(3), aa_recommendhi(3), aa_recommendlow(3), aa_init(3), aa_initkbd(3), aa_initmouse(3), aa_close(3), aa_uninitkbd(3), aa_uninitmouse(3), aa_fastrender(3), aa_render(3), aa_puts(3), aa_printf(3), aa_gotoxy(3), aa_hidecursor(3), aa_showcursor(3), aa_getmouse(3), aa_hidemouse(3), aa_showmouse(3), aa_registerfont(3), aa_setsupported(3), aa_setfont(3), aa_getevent(3), aa_getkey(3), aa_resize(3), aa_resizehandler(3), aa_parseoptions(3), aa_edit(3), aa_createedit(3), aa_editkey(3), aa_putpixel(3), aa_recommendhikbd(3), aa_recommendlowkbd(3), aa_recommendhimouse(3), aa_recommendlowmouse(3), aa_recommendhidisplay(3), aa_recommendlowdisplay(3) aalib-1.4.0/man/aa_mouserecommended.30000644000766200001440000000303007272031253013101 .\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! .\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! .TH "aa_mouserecommended" 3 "8 September 1999" "c2man aalib.h" .SH "NAME" aa_mouserecommended \- List of recommended drivers. .SH "SYNOPSIS" .ft B #include .sp extern aa_linkedlist *aa_mouserecommended; .ft R .SH "DESCRIPTION" List of recommended drivers is used by aa_autoinit familly of functions and altered by aa_recommend familly of functions. .SH "SEE ALSO" save_d(3), mem_d(3), aa_help(3), aa_formats(3), aa_fonts(3), aa_dithernames(3), aa_drivers(3), aa_kbddrivers(3), aa_mousedrivers(3), aa_kbdrecommended(3), aa_displayrecommended(3), aa_defparams(3), aa_defrenderparams(3), aa_scrwidth(3), aa_scrheight(3), aa_mmwidth(3), aa_mmheight(3), aa_imgwidth(3), aa_imgheight(3), aa_image(3), aa_text(3), aa_attrs(3), aa_currentfont(3), aa_autoinit(3), aa_autoinitkbd(3), aa_autoinitmouse(3), aa_recommendhi(3), aa_recommendlow(3), aa_init(3), aa_initkbd(3), aa_initmouse(3), aa_close(3), aa_uninitkbd(3), aa_uninitmouse(3), aa_fastrender(3), aa_render(3), aa_puts(3), aa_printf(3), aa_gotoxy(3), aa_hidecursor(3), aa_showcursor(3), aa_getmouse(3), aa_hidemouse(3), aa_showmouse(3), aa_registerfont(3), aa_setsupported(3), aa_setfont(3), aa_getevent(3), aa_getkey(3), aa_resize(3), aa_resizehandler(3), aa_parseoptions(3), aa_edit(3), aa_createedit(3), aa_editkey(3), aa_putpixel(3), aa_recommendhikbd(3), aa_recommendlowkbd(3), aa_recommendhimouse(3), aa_recommendlowmouse(3), aa_recommendhidisplay(3), aa_recommendlowdisplay(3) aalib-1.4.0/man/aa_parseoptions.30000644000766200001440000000516407272031253012306 .\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! .\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! .TH "aa_parseoptions" 3 "8 September 1999" "c2man aalib.h" .SH "NAME" aa_parseoptions \- parse the standard command line options used by AA-lib. .SH "SYNOPSIS" .ft B #include .sp int aa_parseoptions .br ( .br struct aa_hardware_params *p, .br aa_renderparams *r, .br int *argc, .br char **argv .br ); .ft R .SH "PARAMETERS" .TP .B "struct aa_hardware_params *p" Hardware parameters structure to alter. It is expected that this structure only with necessary modifications will be later used to initialize the AA-lib context. .TP .B "aa_renderparams *r" Rendering prameters structure to alter. It is expected that this structure only with necessary modifications will be later used to render images. .TP .B "int *argc" Pointer to argc parameter passed to function "main". .TP .B "char **argv" Pointer to argv parameter passed to function "main". .SH "DESCRIPTION" Use this function to parse the standard command line options used by AA-lib. Every AA-lib program ought to call this function to let user specify some extra parameters. The function alters the aa_hardware_params and aa_renderparams structures and removes known options from the argc/argv lists. It also parse the AAOPTS environment variable. When called with NULL for the argc/argv parameters, it parses AAOPTS only. At least this call ought to be in every AA-lib program. .SH "RETURNS" 1 when sucesfull and 0 on failure. The program then can print the help text available in aa_help variable. .SH "SEE ALSO" save_d(3), mem_d(3), aa_help(3), aa_formats(3), aa_fonts(3), aa_dithernames(3), aa_drivers(3), aa_kbddrivers(3), aa_mousedrivers(3), aa_kbdrecommended(3), aa_mouserecommended(3), aa_displayrecommended(3), aa_defparams(3), aa_defrenderparams(3), aa_scrwidth(3), aa_scrheight(3), aa_mmwidth(3), aa_mmheight(3), aa_imgwidth(3), aa_imgheight(3), aa_image(3), aa_text(3), aa_attrs(3), aa_currentfont(3), aa_autoinit(3), aa_autoinitkbd(3), aa_autoinitmouse(3), aa_recommendhi(3), aa_recommendlow(3), aa_init(3), aa_initkbd(3), aa_initmouse(3), aa_close(3), aa_uninitkbd(3), aa_uninitmouse(3), aa_fastrender(3), aa_render(3), aa_puts(3), aa_printf(3), aa_gotoxy(3), aa_hidecursor(3), aa_showcursor(3), aa_getmouse(3), aa_hidemouse(3), aa_showmouse(3), aa_registerfont(3), aa_setsupported(3), aa_setfont(3), aa_getevent(3), aa_getkey(3), aa_resize(3), aa_resizehandler(3), aa_edit(3), aa_createedit(3), aa_editkey(3), aa_putpixel(3), aa_recommendhikbd(3), aa_recommendlowkbd(3), aa_recommendhimouse(3), aa_recommendlowmouse(3), aa_recommendhidisplay(3), aa_recommendlowdisplay(3) aalib-1.4.0/man/aa_printf.30000644000766200001440000000500707272031253011056 .\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! .\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! .TH "aa_printf" 3 "8 September 1999" "c2man aalib.h" .SH "NAME" aa_printf \- print text to AA-lib output buffers. .SH "SYNOPSIS" .ft B #include .sp int aa_printf .br ( .br aa_context *c, .br int x, .br int y, .br enum aa_attribute attr, .br const char *fmt, .br ... .br ); .ft R .SH "PARAMETERS" .TP .B "aa_context *c" Specifies the AA-lib context to operate on. .TP .B "int x" X coordinate of the first character. .TP .B "int y" Y coordinate of the first character. .TP .B "enum aa_attribute attr" Attribute to use. .sp Possible values for an \fBenum aa_attribute\fR are as follows: .RS 0.75in .PD 0 .ft B .nr TL \w'AA_BOLDFONT'u+0.2i .ft R .TP \n(TLu \fBAA_NORMAL\fR Normal characters. .TP \n(TLu \fBAA_DIM\fR Dark characters. .TP \n(TLu \fBAA_BOLD\fR Bright characters. .TP \n(TLu \fBAA_BOLDFONT\fR Characters rendered in bold font. .TP \n(TLu \fBAA_REVERSE\fR Reversed (black on whilte) characters. .TP \n(TLu \fBAA_SPECIAL\fR Render characters in a way easilly visible on the screen. The exact rendering is driver dependent, but this mode ought to be used to output texts you want to make easilly visible in the image. .RE .PD .TP .B "const char *fmt" Text to output in standard printf format. .TP .B "..." Not Documented. .SH "DESCRIPTION" Print given text to AA-lib output buffers. To see the effect you need to call aa_flush too. .SH "SEE ALSO" save_d(3), mem_d(3), aa_help(3), aa_formats(3), aa_fonts(3), aa_dithernames(3), aa_drivers(3), aa_kbddrivers(3), aa_mousedrivers(3), aa_kbdrecommended(3), aa_mouserecommended(3), aa_displayrecommended(3), aa_defparams(3), aa_defrenderparams(3), aa_scrwidth(3), aa_scrheight(3), aa_mmwidth(3), aa_mmheight(3), aa_imgwidth(3), aa_imgheight(3), aa_image(3), aa_text(3), aa_attrs(3), aa_currentfont(3), aa_autoinit(3), aa_autoinitkbd(3), aa_autoinitmouse(3), aa_recommendhi(3), aa_recommendlow(3), aa_init(3), aa_initkbd(3), aa_initmouse(3), aa_close(3), aa_uninitkbd(3), aa_uninitmouse(3), aa_fastrender(3), aa_render(3), aa_puts(3), aa_gotoxy(3), aa_hidecursor(3), aa_showcursor(3), aa_getmouse(3), aa_hidemouse(3), aa_showmouse(3), aa_registerfont(3), aa_setsupported(3), aa_setfont(3), aa_getevent(3), aa_getkey(3), aa_resize(3), aa_resizehandler(3), aa_parseoptions(3), aa_edit(3), aa_createedit(3), aa_editkey(3), aa_putpixel(3), aa_recommendhikbd(3), aa_recommendlowkbd(3), aa_recommendhimouse(3), aa_recommendlowmouse(3), aa_recommendhidisplay(3), aa_recommendlowdisplay(3) aalib-1.4.0/man/aa_putpixel.30000644000766200001440000000327107272031253011427 .\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! .\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! .TH "aa_putpixel" 3 "8 September 1999" "c2man aalib.h" .SH "NAME" aa_putpixel \- put pixel to emulated framebuffer .SH "SYNOPSIS" .ft B #include .sp void aa_putpixel .br ( .br aa_context *c, .br int x, .br int y, .br int color .br ); .ft R .SH "PARAMETERS" .TP .B "aa_context *c" Specifies the AA-lib context to operate on. .TP .B "int x" X coordinate. .TP .B "int y" Y coordinate. .TP .B "int color" Palette index or brightness value (0..255). .SH "DESCRIPTION" Put pixel to emulated framebuffer. .SH "SEE ALSO" save_d(3), mem_d(3), aa_help(3), aa_formats(3), aa_fonts(3), aa_dithernames(3), aa_drivers(3), aa_kbddrivers(3), aa_mousedrivers(3), aa_kbdrecommended(3), aa_mouserecommended(3), aa_displayrecommended(3), aa_defparams(3), aa_defrenderparams(3), aa_scrwidth(3), aa_scrheight(3), aa_mmwidth(3), aa_mmheight(3), aa_imgwidth(3), aa_imgheight(3), aa_image(3), aa_text(3), aa_attrs(3), aa_currentfont(3), aa_autoinit(3), aa_autoinitkbd(3), aa_autoinitmouse(3), aa_recommendhi(3), aa_recommendlow(3), aa_init(3), aa_initkbd(3), aa_initmouse(3), aa_close(3), aa_uninitkbd(3), aa_uninitmouse(3), aa_fastrender(3), aa_render(3), aa_puts(3), aa_printf(3), aa_gotoxy(3), aa_hidecursor(3), aa_showcursor(3), aa_getmouse(3), aa_hidemouse(3), aa_showmouse(3), aa_registerfont(3), aa_setsupported(3), aa_setfont(3), aa_getevent(3), aa_getkey(3), aa_resize(3), aa_resizehandler(3), aa_parseoptions(3), aa_edit(3), aa_createedit(3), aa_editkey(3), aa_recommendhikbd(3), aa_recommendlowkbd(3), aa_recommendhimouse(3), aa_recommendlowmouse(3), aa_recommendhidisplay(3), aa_recommendlowdisplay(3) aalib-1.4.0/man/aa_puts.30000644000766200001440000000470707272031253010555 .\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! .\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! .TH "aa_puts" 3 "8 September 1999" "c2man aalib.h" .SH "NAME" aa_puts \- output string to AA-lib output buffers. .SH "SYNOPSIS" .ft B #include .sp void aa_puts .br ( .br aa_context *c, .br int x, .br int y, .br enum aa_attribute attr, .br const char *s .br ); .ft R .SH "PARAMETERS" .TP .B "aa_context *c" Specifies the AA-lib context to operate on. .TP .B "int x" X coordinate of the first character. .TP .B "int y" Y coordinate of the first character. .TP .B "enum aa_attribute attr" Attribute to use. .sp Possible values for an \fBenum aa_attribute\fR are as follows: .RS 0.75in .PD 0 .ft B .nr TL \w'AA_BOLDFONT'u+0.2i .ft R .TP \n(TLu \fBAA_NORMAL\fR Normal characters. .TP \n(TLu \fBAA_DIM\fR Dark characters. .TP \n(TLu \fBAA_BOLD\fR Bright characters. .TP \n(TLu \fBAA_BOLDFONT\fR Characters rendered in bold font. .TP \n(TLu \fBAA_REVERSE\fR Reversed (black on whilte) characters. .TP \n(TLu \fBAA_SPECIAL\fR Render characters in a way easilly visible on the screen. The exact rendering is driver dependent, but this mode ought to be used to output texts you want to make easilly visible in the image. .RE .PD .TP .B "const char *s" String to output. .SH "DESCRIPTION" Output given string to AA-lib output buffers. To see the effect you need to call aa_flush too. .SH "SEE ALSO" save_d(3), mem_d(3), aa_help(3), aa_formats(3), aa_fonts(3), aa_dithernames(3), aa_drivers(3), aa_kbddrivers(3), aa_mousedrivers(3), aa_kbdrecommended(3), aa_mouserecommended(3), aa_displayrecommended(3), aa_defparams(3), aa_defrenderparams(3), aa_scrwidth(3), aa_scrheight(3), aa_mmwidth(3), aa_mmheight(3), aa_imgwidth(3), aa_imgheight(3), aa_image(3), aa_text(3), aa_attrs(3), aa_currentfont(3), aa_autoinit(3), aa_autoinitkbd(3), aa_autoinitmouse(3), aa_recommendhi(3), aa_recommendlow(3), aa_init(3), aa_initkbd(3), aa_initmouse(3), aa_close(3), aa_uninitkbd(3), aa_uninitmouse(3), aa_fastrender(3), aa_render(3), aa_printf(3), aa_gotoxy(3), aa_hidecursor(3), aa_showcursor(3), aa_getmouse(3), aa_hidemouse(3), aa_showmouse(3), aa_registerfont(3), aa_setsupported(3), aa_setfont(3), aa_getevent(3), aa_getkey(3), aa_resize(3), aa_resizehandler(3), aa_parseoptions(3), aa_edit(3), aa_createedit(3), aa_editkey(3), aa_putpixel(3), aa_recommendhikbd(3), aa_recommendlowkbd(3), aa_recommendhimouse(3), aa_recommendlowmouse(3), aa_recommendhidisplay(3), aa_recommendlowdisplay(3) aalib-1.4.0/man/aa_recommendhi.30000644000766200001440000000345407272031253012052 .\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! .\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! .TH "aa_recommendhi" 3 "8 September 1999" "c2man aalib.h" .SH "NAME" aa_recommendhi \- insert the given driver on beggining of the list of recommended drivers. .SH "SYNOPSIS" .ft B #include .sp void aa_recommendhi .br ( .br aa_linkedlist **l, .br const char *name .br ); .ft R .SH "PARAMETERS" .TP .B "aa_linkedlist **l" List to operate on (aa_displayrecommended, aa_kbdrecommended or aa_mouserecommended). .TP .B "const char *name" Name of the driver (ought to match the "shortname" field of the driver definition structure). .SH "DESCRIPTION" Insert the given driver on beggining of the list of recommended drivers. .SH "SEE ALSO" save_d(3), mem_d(3), aa_help(3), aa_formats(3), aa_fonts(3), aa_dithernames(3), aa_drivers(3), aa_kbddrivers(3), aa_mousedrivers(3), aa_kbdrecommended(3), aa_mouserecommended(3), aa_displayrecommended(3), aa_defparams(3), aa_defrenderparams(3), aa_scrwidth(3), aa_scrheight(3), aa_mmwidth(3), aa_mmheight(3), aa_imgwidth(3), aa_imgheight(3), aa_image(3), aa_text(3), aa_attrs(3), aa_currentfont(3), aa_autoinit(3), aa_autoinitkbd(3), aa_autoinitmouse(3), aa_recommendlow(3), aa_init(3), aa_initkbd(3), aa_initmouse(3), aa_close(3), aa_uninitkbd(3), aa_uninitmouse(3), aa_fastrender(3), aa_render(3), aa_puts(3), aa_printf(3), aa_gotoxy(3), aa_hidecursor(3), aa_showcursor(3), aa_getmouse(3), aa_hidemouse(3), aa_showmouse(3), aa_registerfont(3), aa_setsupported(3), aa_setfont(3), aa_getevent(3), aa_getkey(3), aa_resize(3), aa_resizehandler(3), aa_parseoptions(3), aa_edit(3), aa_createedit(3), aa_editkey(3), aa_putpixel(3), aa_recommendhikbd(3), aa_recommendlowkbd(3), aa_recommendhimouse(3), aa_recommendlowmouse(3), aa_recommendhidisplay(3), aa_recommendlowdisplay(3) aalib-1.4.0/man/aa_recommendhidisplay.30000644000766200001440000000326107272031253013434 .\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! .\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! .TH "aa_recommendhidisplay" 3 "8 September 1999" "c2man aalib.h" .SH "NAME" aa_recommendhidisplay \- insert the given driver on beggining of the list of recommended display drivers. .SH "SYNOPSIS" .ft B #include .sp void aa_recommendhidisplay(const char *name); .ft R .SH "PARAMETERS" .TP .B "const char *name" Name of the driver (ought to match the "shortname" field of the driver definition structure). .SH "DESCRIPTION" Insert the given driver on beggining of the list of recommended display drivers. .SH "SEE ALSO" save_d(3), mem_d(3), aa_help(3), aa_formats(3), aa_fonts(3), aa_dithernames(3), aa_drivers(3), aa_kbddrivers(3), aa_mousedrivers(3), aa_kbdrecommended(3), aa_mouserecommended(3), aa_displayrecommended(3), aa_defparams(3), aa_defrenderparams(3), aa_scrwidth(3), aa_scrheight(3), aa_mmwidth(3), aa_mmheight(3), aa_imgwidth(3), aa_imgheight(3), aa_image(3), aa_text(3), aa_attrs(3), aa_currentfont(3), aa_autoinit(3), aa_autoinitkbd(3), aa_autoinitmouse(3), aa_recommendhi(3), aa_recommendlow(3), aa_init(3), aa_initkbd(3), aa_initmouse(3), aa_close(3), aa_uninitkbd(3), aa_uninitmouse(3), aa_fastrender(3), aa_render(3), aa_puts(3), aa_printf(3), aa_gotoxy(3), aa_hidecursor(3), aa_showcursor(3), aa_getmouse(3), aa_hidemouse(3), aa_showmouse(3), aa_registerfont(3), aa_setsupported(3), aa_setfont(3), aa_getevent(3), aa_getkey(3), aa_resize(3), aa_resizehandler(3), aa_parseoptions(3), aa_edit(3), aa_createedit(3), aa_editkey(3), aa_putpixel(3), aa_recommendhikbd(3), aa_recommendlowkbd(3), aa_recommendhimouse(3), aa_recommendlowmouse(3), aa_recommendlowdisplay(3) aalib-1.4.0/man/aa_recommendhikbd.30000644000766200001440000000325307272031253012530 .\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! .\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! .TH "aa_recommendhikbd" 3 "8 September 1999" "c2man aalib.h" .SH "NAME" aa_recommendhikbd \- insert the given driver on beggining of the list of recommended keyboard drivers. .SH "SYNOPSIS" .ft B #include .sp void aa_recommendhikbd(const char *name); .ft R .SH "PARAMETERS" .TP .B "const char *name" Name of the driver (ought to match the "shortname" field of the driver definition structure). .SH "DESCRIPTION" Insert the given driver on beggining of the list of recommended keyboard drivers. .SH "SEE ALSO" save_d(3), mem_d(3), aa_help(3), aa_formats(3), aa_fonts(3), aa_dithernames(3), aa_drivers(3), aa_kbddrivers(3), aa_mousedrivers(3), aa_kbdrecommended(3), aa_mouserecommended(3), aa_displayrecommended(3), aa_defparams(3), aa_defrenderparams(3), aa_scrwidth(3), aa_scrheight(3), aa_mmwidth(3), aa_mmheight(3), aa_imgwidth(3), aa_imgheight(3), aa_image(3), aa_text(3), aa_attrs(3), aa_currentfont(3), aa_autoinit(3), aa_autoinitkbd(3), aa_autoinitmouse(3), aa_recommendhi(3), aa_recommendlow(3), aa_init(3), aa_initkbd(3), aa_initmouse(3), aa_close(3), aa_uninitkbd(3), aa_uninitmouse(3), aa_fastrender(3), aa_render(3), aa_puts(3), aa_printf(3), aa_gotoxy(3), aa_hidecursor(3), aa_showcursor(3), aa_getmouse(3), aa_hidemouse(3), aa_showmouse(3), aa_registerfont(3), aa_setsupported(3), aa_setfont(3), aa_getevent(3), aa_getkey(3), aa_resize(3), aa_resizehandler(3), aa_parseoptions(3), aa_edit(3), aa_createedit(3), aa_editkey(3), aa_putpixel(3), aa_recommendlowkbd(3), aa_recommendhimouse(3), aa_recommendlowmouse(3), aa_recommendhidisplay(3), aa_recommendlowdisplay(3) aalib-1.4.0/man/aa_recommendhimouse.30000644000766200001440000000325107272031253013116 .\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! .\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! .TH "aa_recommendhimouse" 3 "8 September 1999" "c2man aalib.h" .SH "NAME" aa_recommendhimouse \- insert the given driver on beggining of the list of recommended mouse drivers. .SH "SYNOPSIS" .ft B #include .sp void aa_recommendhimouse(const char *name); .ft R .SH "PARAMETERS" .TP .B "const char *name" Name of the driver (ought to match the "shortname" field of the driver definition structure). .SH "DESCRIPTION" Insert the given driver on beggining of the list of recommended mouse drivers. .SH "SEE ALSO" save_d(3), mem_d(3), aa_help(3), aa_formats(3), aa_fonts(3), aa_dithernames(3), aa_drivers(3), aa_kbddrivers(3), aa_mousedrivers(3), aa_kbdrecommended(3), aa_mouserecommended(3), aa_displayrecommended(3), aa_defparams(3), aa_defrenderparams(3), aa_scrwidth(3), aa_scrheight(3), aa_mmwidth(3), aa_mmheight(3), aa_imgwidth(3), aa_imgheight(3), aa_image(3), aa_text(3), aa_attrs(3), aa_currentfont(3), aa_autoinit(3), aa_autoinitkbd(3), aa_autoinitmouse(3), aa_recommendhi(3), aa_recommendlow(3), aa_init(3), aa_initkbd(3), aa_initmouse(3), aa_close(3), aa_uninitkbd(3), aa_uninitmouse(3), aa_fastrender(3), aa_render(3), aa_puts(3), aa_printf(3), aa_gotoxy(3), aa_hidecursor(3), aa_showcursor(3), aa_getmouse(3), aa_hidemouse(3), aa_showmouse(3), aa_registerfont(3), aa_setsupported(3), aa_setfont(3), aa_getevent(3), aa_getkey(3), aa_resize(3), aa_resizehandler(3), aa_parseoptions(3), aa_edit(3), aa_createedit(3), aa_editkey(3), aa_putpixel(3), aa_recommendhikbd(3), aa_recommendlowkbd(3), aa_recommendlowmouse(3), aa_recommendhidisplay(3), aa_recommendlowdisplay(3) aalib-1.4.0/man/aa_recommendlow.30000644000766200001440000000343407272031253012251 .\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! .\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! .TH "aa_recommendlow" 3 "8 September 1999" "c2man aalib.h" .SH "NAME" aa_recommendlow \- Add the given driver to the end of list of recommended drivers. .SH "SYNOPSIS" .ft B #include .sp void aa_recommendlow .br ( .br aa_linkedlist **l, .br const char *name .br ); .ft R .SH "PARAMETERS" .TP .B "aa_linkedlist **l" List to operate on (aa_displayrecommended, aa_kbdrecommended or aa_mouserecommended). .TP .B "const char *name" Name of the driver (ought to match the "shortname" field of the driver definition structure). .SH "DESCRIPTION" Add the given driver to the end of list of recommended drivers. .SH "SEE ALSO" save_d(3), mem_d(3), aa_help(3), aa_formats(3), aa_fonts(3), aa_dithernames(3), aa_drivers(3), aa_kbddrivers(3), aa_mousedrivers(3), aa_kbdrecommended(3), aa_mouserecommended(3), aa_displayrecommended(3), aa_defparams(3), aa_defrenderparams(3), aa_scrwidth(3), aa_scrheight(3), aa_mmwidth(3), aa_mmheight(3), aa_imgwidth(3), aa_imgheight(3), aa_image(3), aa_text(3), aa_attrs(3), aa_currentfont(3), aa_autoinit(3), aa_autoinitkbd(3), aa_autoinitmouse(3), aa_recommendhi(3), aa_init(3), aa_initkbd(3), aa_initmouse(3), aa_close(3), aa_uninitkbd(3), aa_uninitmouse(3), aa_fastrender(3), aa_render(3), aa_puts(3), aa_printf(3), aa_gotoxy(3), aa_hidecursor(3), aa_showcursor(3), aa_getmouse(3), aa_hidemouse(3), aa_showmouse(3), aa_registerfont(3), aa_setsupported(3), aa_setfont(3), aa_getevent(3), aa_getkey(3), aa_resize(3), aa_resizehandler(3), aa_parseoptions(3), aa_edit(3), aa_createedit(3), aa_editkey(3), aa_putpixel(3), aa_recommendhikbd(3), aa_recommendlowkbd(3), aa_recommendhimouse(3), aa_recommendlowmouse(3), aa_recommendhidisplay(3), aa_recommendlowdisplay(3) aalib-1.4.0/man/aa_recommendlowdisplay.30000644000766200001440000000324107272031253013633 .\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! .\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! .TH "aa_recommendlowdisplay" 3 "8 September 1999" "c2man aalib.h" .SH "NAME" aa_recommendlowdisplay \- Add the given driver to the end of list of display recommended drivers. .SH "SYNOPSIS" .ft B #include .sp void aa_recommendlowdisplay(const char *name); .ft R .SH "PARAMETERS" .TP .B "const char *name" Name of the driver (ought to match the "shortname" field of the driver definition structure). .SH "DESCRIPTION" Add the given driver to the end of list of display recommended drivers. .SH "SEE ALSO" save_d(3), mem_d(3), aa_help(3), aa_formats(3), aa_fonts(3), aa_dithernames(3), aa_drivers(3), aa_kbddrivers(3), aa_mousedrivers(3), aa_kbdrecommended(3), aa_mouserecommended(3), aa_displayrecommended(3), aa_defparams(3), aa_defrenderparams(3), aa_scrwidth(3), aa_scrheight(3), aa_mmwidth(3), aa_mmheight(3), aa_imgwidth(3), aa_imgheight(3), aa_image(3), aa_text(3), aa_attrs(3), aa_currentfont(3), aa_autoinit(3), aa_autoinitkbd(3), aa_autoinitmouse(3), aa_recommendhi(3), aa_recommendlow(3), aa_init(3), aa_initkbd(3), aa_initmouse(3), aa_close(3), aa_uninitkbd(3), aa_uninitmouse(3), aa_fastrender(3), aa_render(3), aa_puts(3), aa_printf(3), aa_gotoxy(3), aa_hidecursor(3), aa_showcursor(3), aa_getmouse(3), aa_hidemouse(3), aa_showmouse(3), aa_registerfont(3), aa_setsupported(3), aa_setfont(3), aa_getevent(3), aa_getkey(3), aa_resize(3), aa_resizehandler(3), aa_parseoptions(3), aa_edit(3), aa_createedit(3), aa_editkey(3), aa_putpixel(3), aa_recommendhikbd(3), aa_recommendlowkbd(3), aa_recommendhimouse(3), aa_recommendlowmouse(3), aa_recommendhidisplay(3) aalib-1.4.0/man/aa_recommendlowkbd.30000644000766200001440000000323307272031253012727 .\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! .\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! .TH "aa_recommendlowkbd" 3 "8 September 1999" "c2man aalib.h" .SH "NAME" aa_recommendlowkbd \- Add the given driver to the end of list of keyboard recommended drivers. .SH "SYNOPSIS" .ft B #include .sp void aa_recommendlowkbd(const char *name); .ft R .SH "PARAMETERS" .TP .B "const char *name" Name of the driver (ought to match the "shortname" field of the driver definition structure). .SH "DESCRIPTION" Add the given driver to the end of list of keyboard recommended drivers. .SH "SEE ALSO" save_d(3), mem_d(3), aa_help(3), aa_formats(3), aa_fonts(3), aa_dithernames(3), aa_drivers(3), aa_kbddrivers(3), aa_mousedrivers(3), aa_kbdrecommended(3), aa_mouserecommended(3), aa_displayrecommended(3), aa_defparams(3), aa_defrenderparams(3), aa_scrwidth(3), aa_scrheight(3), aa_mmwidth(3), aa_mmheight(3), aa_imgwidth(3), aa_imgheight(3), aa_image(3), aa_text(3), aa_attrs(3), aa_currentfont(3), aa_autoinit(3), aa_autoinitkbd(3), aa_autoinitmouse(3), aa_recommendhi(3), aa_recommendlow(3), aa_init(3), aa_initkbd(3), aa_initmouse(3), aa_close(3), aa_uninitkbd(3), aa_uninitmouse(3), aa_fastrender(3), aa_render(3), aa_puts(3), aa_printf(3), aa_gotoxy(3), aa_hidecursor(3), aa_showcursor(3), aa_getmouse(3), aa_hidemouse(3), aa_showmouse(3), aa_registerfont(3), aa_setsupported(3), aa_setfont(3), aa_getevent(3), aa_getkey(3), aa_resize(3), aa_resizehandler(3), aa_parseoptions(3), aa_edit(3), aa_createedit(3), aa_editkey(3), aa_putpixel(3), aa_recommendhikbd(3), aa_recommendhimouse(3), aa_recommendlowmouse(3), aa_recommendhidisplay(3), aa_recommendlowdisplay(3) aalib-1.4.0/man/aa_recommendlowmouse.30000644000766200001440000000323107272031253013315 .\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! .\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! .TH "aa_recommendlowmouse" 3 "8 September 1999" "c2man aalib.h" .SH "NAME" aa_recommendlowmouse \- Add the given driver to the end of list of mouse recommended drivers. .SH "SYNOPSIS" .ft B #include .sp void aa_recommendlowmouse(const char *name); .ft R .SH "PARAMETERS" .TP .B "const char *name" Name of the driver (ought to match the "shortname" field of the driver definition structure). .SH "DESCRIPTION" Add the given driver to the end of list of mouse recommended drivers. .SH "SEE ALSO" save_d(3), mem_d(3), aa_help(3), aa_formats(3), aa_fonts(3), aa_dithernames(3), aa_drivers(3), aa_kbddrivers(3), aa_mousedrivers(3), aa_kbdrecommended(3), aa_mouserecommended(3), aa_displayrecommended(3), aa_defparams(3), aa_defrenderparams(3), aa_scrwidth(3), aa_scrheight(3), aa_mmwidth(3), aa_mmheight(3), aa_imgwidth(3), aa_imgheight(3), aa_image(3), aa_text(3), aa_attrs(3), aa_currentfont(3), aa_autoinit(3), aa_autoinitkbd(3), aa_autoinitmouse(3), aa_recommendhi(3), aa_recommendlow(3), aa_init(3), aa_initkbd(3), aa_initmouse(3), aa_close(3), aa_uninitkbd(3), aa_uninitmouse(3), aa_fastrender(3), aa_render(3), aa_puts(3), aa_printf(3), aa_gotoxy(3), aa_hidecursor(3), aa_showcursor(3), aa_getmouse(3), aa_hidemouse(3), aa_showmouse(3), aa_registerfont(3), aa_setsupported(3), aa_setfont(3), aa_getevent(3), aa_getkey(3), aa_resize(3), aa_resizehandler(3), aa_parseoptions(3), aa_edit(3), aa_createedit(3), aa_editkey(3), aa_putpixel(3), aa_recommendhikbd(3), aa_recommendlowkbd(3), aa_recommendhimouse(3), aa_recommendhidisplay(3), aa_recommendlowdisplay(3) aalib-1.4.0/man/aa_registerfont.30000644000766200001440000000313507272031253012267 .\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! .\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! .TH "aa_registerfont" 3 "8 September 1999" "c2man aalib.h" .SH "NAME" aa_registerfont \- add new font specification to aa_fonts array. .SH "SYNOPSIS" .ft B #include .sp int aa_registerfont(const struct aa_font *f); .ft R .SH "PARAMETERS" .TP .B "const struct aa_font *f" Font specification structure. .SH "DESCRIPTION" Add new font specification to aa_fonts array. .SH "RETURNS" 1 when succesfull or 0 on failure. .SH "SEE ALSO" save_d(3), mem_d(3), aa_help(3), aa_formats(3), aa_fonts(3), aa_dithernames(3), aa_drivers(3), aa_kbddrivers(3), aa_mousedrivers(3), aa_kbdrecommended(3), aa_mouserecommended(3), aa_displayrecommended(3), aa_defparams(3), aa_defrenderparams(3), aa_scrwidth(3), aa_scrheight(3), aa_mmwidth(3), aa_mmheight(3), aa_imgwidth(3), aa_imgheight(3), aa_image(3), aa_text(3), aa_attrs(3), aa_currentfont(3), aa_autoinit(3), aa_autoinitkbd(3), aa_autoinitmouse(3), aa_recommendhi(3), aa_recommendlow(3), aa_init(3), aa_initkbd(3), aa_initmouse(3), aa_close(3), aa_uninitkbd(3), aa_uninitmouse(3), aa_fastrender(3), aa_render(3), aa_puts(3), aa_printf(3), aa_gotoxy(3), aa_hidecursor(3), aa_showcursor(3), aa_getmouse(3), aa_hidemouse(3), aa_showmouse(3), aa_setsupported(3), aa_setfont(3), aa_getevent(3), aa_getkey(3), aa_resize(3), aa_resizehandler(3), aa_parseoptions(3), aa_edit(3), aa_createedit(3), aa_editkey(3), aa_putpixel(3), aa_recommendhikbd(3), aa_recommendlowkbd(3), aa_recommendhimouse(3), aa_recommendlowmouse(3), aa_recommendhidisplay(3), aa_recommendlowdisplay(3) aalib-1.4.0/man/aa_render.30000644000766200001440000000452707272031253011041 .\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! .\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! .TH "aa_render" 3 "8 September 1999" "c2man aalib.h" .SH "NAME" aa_render \- convert image buffer to ASCII-art. .SH "SYNOPSIS" .ft B #include .sp void aa_render .br ( .br aa_context *c, .br const aa_renderparams *p, .br int x1, .br int y1, .br int x2, .br int y2 .br ); .ft R .SH "PARAMETERS" .TP .B "aa_context *c" Specifies the AA-lib context to operate on. .TP .B "const aa_renderparams *p" Rendering parametters used to specify brightness, gamma correction and other usefull stuff. Use aa_defrenderparams for default values. .TP .B "int x1" Column of top left coner of rendered area (in characters!). .TP .B "int y1" Row of top left coner of rendered area. .TP .B "int x2" Column of bottom right coner of rendered area. .TP .B "int y2" Row of bottom right coner of rendered area. .SH "DESCRIPTION" This function does the trick of converting the emulated framebuffer into high quality ASCII-art. If you want to be really fast, you might use aa_fastrender. If you want to emulate palette, use aa_renderpalette. Note that to see the effect you need to call aa_flush too. First call to this function may take a while, because the rendering tables are produced. .SH "SEE ALSO" save_d(3), mem_d(3), aa_help(3), aa_formats(3), aa_fonts(3), aa_dithernames(3), aa_drivers(3), aa_kbddrivers(3), aa_mousedrivers(3), aa_kbdrecommended(3), aa_mouserecommended(3), aa_displayrecommended(3), aa_defparams(3), aa_defrenderparams(3), aa_scrwidth(3), aa_scrheight(3), aa_mmwidth(3), aa_mmheight(3), aa_imgwidth(3), aa_imgheight(3), aa_image(3), aa_text(3), aa_attrs(3), aa_currentfont(3), aa_autoinit(3), aa_autoinitkbd(3), aa_autoinitmouse(3), aa_recommendhi(3), aa_recommendlow(3), aa_init(3), aa_initkbd(3), aa_initmouse(3), aa_close(3), aa_uninitkbd(3), aa_uninitmouse(3), aa_fastrender(3), aa_puts(3), aa_printf(3), aa_gotoxy(3), aa_hidecursor(3), aa_showcursor(3), aa_getmouse(3), aa_hidemouse(3), aa_showmouse(3), aa_registerfont(3), aa_setsupported(3), aa_setfont(3), aa_getevent(3), aa_getkey(3), aa_resize(3), aa_resizehandler(3), aa_parseoptions(3), aa_edit(3), aa_createedit(3), aa_editkey(3), aa_putpixel(3), aa_recommendhikbd(3), aa_recommendlowkbd(3), aa_recommendhimouse(3), aa_recommendlowmouse(3), aa_recommendhidisplay(3), aa_recommendlowdisplay(3) aalib-1.4.0/man/aa_resize.30000644000766200001440000000327407272031253011061 .\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! .\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! .TH "aa_resize" 3 "8 September 1999" "c2man aalib.h" .SH "NAME" aa_resize \- resize functions .SH "SYNOPSIS" .ft B #include .sp int aa_resize(aa_context *c); .ft R .SH "PARAMETERS" .TP .B "aa_context *c" Specifies the AA-lib context to operate on. .SH "DESCRIPTION" Do resize action. This function ought to be called when application takes into account the AA_RESIZE event. The context is reinitialized and set to new sizes. .SH "RETURNS" 0 when no resizing is done and 1 when resizing was succesfull. .SH "SEE ALSO" save_d(3), mem_d(3), aa_help(3), aa_formats(3), aa_fonts(3), aa_dithernames(3), aa_drivers(3), aa_kbddrivers(3), aa_mousedrivers(3), aa_kbdrecommended(3), aa_mouserecommended(3), aa_displayrecommended(3), aa_defparams(3), aa_defrenderparams(3), aa_scrwidth(3), aa_scrheight(3), aa_mmwidth(3), aa_mmheight(3), aa_imgwidth(3), aa_imgheight(3), aa_image(3), aa_text(3), aa_attrs(3), aa_currentfont(3), aa_autoinit(3), aa_autoinitkbd(3), aa_autoinitmouse(3), aa_recommendhi(3), aa_recommendlow(3), aa_init(3), aa_initkbd(3), aa_initmouse(3), aa_close(3), aa_uninitkbd(3), aa_uninitmouse(3), aa_fastrender(3), aa_render(3), aa_puts(3), aa_printf(3), aa_gotoxy(3), aa_hidecursor(3), aa_showcursor(3), aa_getmouse(3), aa_hidemouse(3), aa_showmouse(3), aa_registerfont(3), aa_setsupported(3), aa_setfont(3), aa_getevent(3), aa_getkey(3), aa_resizehandler(3), aa_parseoptions(3), aa_edit(3), aa_createedit(3), aa_editkey(3), aa_putpixel(3), aa_recommendhikbd(3), aa_recommendlowkbd(3), aa_recommendhimouse(3), aa_recommendlowmouse(3), aa_recommendhidisplay(3), aa_recommendlowdisplay(3) aalib-1.4.0/man/aa_resizehandler.30000644000766200001440000000326207272031253012414 .\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! .\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! .TH "aa_resizehandler" 3 "8 September 1999" "c2man aalib.h" .SH "NAME" aa_resizehandler \- Set user handler to be called on resize event. .SH "SYNOPSIS" .ft B #include .sp void aa_resizehandler .br ( .br aa_context *c, .br void (*handler)(aa_context *) .br ); .ft R .SH "PARAMETERS" .TP .B "aa_context *c" Specifies the AA-lib context to operate on. .TP .B "void (*handler)(aa_context *)" Function to be called when resize happends. .SH "DESCRIPTION" Set user handler to be called on resize event. .SH "SEE ALSO" save_d(3), mem_d(3), aa_help(3), aa_formats(3), aa_fonts(3), aa_dithernames(3), aa_drivers(3), aa_kbddrivers(3), aa_mousedrivers(3), aa_kbdrecommended(3), aa_mouserecommended(3), aa_displayrecommended(3), aa_defparams(3), aa_defrenderparams(3), aa_scrwidth(3), aa_scrheight(3), aa_mmwidth(3), aa_mmheight(3), aa_imgwidth(3), aa_imgheight(3), aa_image(3), aa_text(3), aa_attrs(3), aa_currentfont(3), aa_autoinit(3), aa_autoinitkbd(3), aa_autoinitmouse(3), aa_recommendhi(3), aa_recommendlow(3), aa_init(3), aa_initkbd(3), aa_initmouse(3), aa_close(3), aa_uninitkbd(3), aa_uninitmouse(3), aa_fastrender(3), aa_render(3), aa_puts(3), aa_printf(3), aa_gotoxy(3), aa_hidecursor(3), aa_showcursor(3), aa_getmouse(3), aa_hidemouse(3), aa_showmouse(3), aa_registerfont(3), aa_setsupported(3), aa_setfont(3), aa_getevent(3), aa_getkey(3), aa_resize(3), aa_parseoptions(3), aa_edit(3), aa_createedit(3), aa_editkey(3), aa_putpixel(3), aa_recommendhikbd(3), aa_recommendlowkbd(3), aa_recommendhimouse(3), aa_recommendlowmouse(3), aa_recommendhidisplay(3), aa_recommendlowdisplay(3) aalib-1.4.0/man/aa_scrheight.30000644000766200001440000000305207272031253011532 .\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! .\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! .TH "aa_scrheight" 3 "8 September 1999" "c2man aalib.h" .SH "NAME" aa_scrheight \- returns height of the output screen in characters. .SH "SYNOPSIS" .ft B #include .sp int aa_scrheight(aa_context *a); .ft R .SH "PARAMETERS" .TP .B "aa_context *a" Specifies the AA-lib context to operate on. .SH "DESCRIPTION" Returns height of the output screen in characters. .SH "SEE ALSO" save_d(3), mem_d(3), aa_help(3), aa_formats(3), aa_fonts(3), aa_dithernames(3), aa_drivers(3), aa_kbddrivers(3), aa_mousedrivers(3), aa_kbdrecommended(3), aa_mouserecommended(3), aa_displayrecommended(3), aa_defparams(3), aa_defrenderparams(3), aa_scrwidth(3), aa_mmwidth(3), aa_mmheight(3), aa_imgwidth(3), aa_imgheight(3), aa_image(3), aa_text(3), aa_attrs(3), aa_currentfont(3), aa_autoinit(3), aa_autoinitkbd(3), aa_autoinitmouse(3), aa_recommendhi(3), aa_recommendlow(3), aa_init(3), aa_initkbd(3), aa_initmouse(3), aa_close(3), aa_uninitkbd(3), aa_uninitmouse(3), aa_fastrender(3), aa_render(3), aa_puts(3), aa_printf(3), aa_gotoxy(3), aa_hidecursor(3), aa_showcursor(3), aa_getmouse(3), aa_hidemouse(3), aa_showmouse(3), aa_registerfont(3), aa_setsupported(3), aa_setfont(3), aa_getevent(3), aa_getkey(3), aa_resize(3), aa_resizehandler(3), aa_parseoptions(3), aa_edit(3), aa_createedit(3), aa_editkey(3), aa_putpixel(3), aa_recommendhikbd(3), aa_recommendlowkbd(3), aa_recommendhimouse(3), aa_recommendlowmouse(3), aa_recommendhidisplay(3), aa_recommendlowdisplay(3) aalib-1.4.0/man/aa_scrwidth.30000644000766200001440000000304607272031253011404 .\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! .\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! .TH "aa_scrwidth" 3 "8 September 1999" "c2man aalib.h" .SH "NAME" aa_scrwidth \- returns width of the output screen in characters. .SH "SYNOPSIS" .ft B #include .sp int aa_scrwidth(aa_context *a); .ft R .SH "PARAMETERS" .TP .B "aa_context *a" Specifies the AA-lib context to operate on. .SH "DESCRIPTION" Returns width of the output screen in characters. .SH "SEE ALSO" save_d(3), mem_d(3), aa_help(3), aa_formats(3), aa_fonts(3), aa_dithernames(3), aa_drivers(3), aa_kbddrivers(3), aa_mousedrivers(3), aa_kbdrecommended(3), aa_mouserecommended(3), aa_displayrecommended(3), aa_defparams(3), aa_defrenderparams(3), aa_scrheight(3), aa_mmwidth(3), aa_mmheight(3), aa_imgwidth(3), aa_imgheight(3), aa_image(3), aa_text(3), aa_attrs(3), aa_currentfont(3), aa_autoinit(3), aa_autoinitkbd(3), aa_autoinitmouse(3), aa_recommendhi(3), aa_recommendlow(3), aa_init(3), aa_initkbd(3), aa_initmouse(3), aa_close(3), aa_uninitkbd(3), aa_uninitmouse(3), aa_fastrender(3), aa_render(3), aa_puts(3), aa_printf(3), aa_gotoxy(3), aa_hidecursor(3), aa_showcursor(3), aa_getmouse(3), aa_hidemouse(3), aa_showmouse(3), aa_registerfont(3), aa_setsupported(3), aa_setfont(3), aa_getevent(3), aa_getkey(3), aa_resize(3), aa_resizehandler(3), aa_parseoptions(3), aa_edit(3), aa_createedit(3), aa_editkey(3), aa_putpixel(3), aa_recommendhikbd(3), aa_recommendlowkbd(3), aa_recommendhimouse(3), aa_recommendlowmouse(3), aa_recommendhidisplay(3), aa_recommendlowdisplay(3) aalib-1.4.0/man/aa_setfont.30000644000766200001440000000325007272031253011234 .\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! .\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! .TH "aa_setfont" 3 "8 September 1999" "c2man aalib.h" .SH "NAME" aa_setfont \- set font specification to be used by rendering functions. .SH "SYNOPSIS" .ft B #include .sp void aa_setfont .br ( .br aa_context *c, .br const struct aa_font *font .br ); .ft R .SH "PARAMETERS" .TP .B "aa_context *c" Specifies the AA-lib context to operate on. .TP .B "const struct aa_font *font" Font specification structure. .SH "DESCRIPTION" Set font specification to be used by rendering functions. .SH "SEE ALSO" save_d(3), mem_d(3), aa_help(3), aa_formats(3), aa_fonts(3), aa_dithernames(3), aa_drivers(3), aa_kbddrivers(3), aa_mousedrivers(3), aa_kbdrecommended(3), aa_mouserecommended(3), aa_displayrecommended(3), aa_defparams(3), aa_defrenderparams(3), aa_scrwidth(3), aa_scrheight(3), aa_mmwidth(3), aa_mmheight(3), aa_imgwidth(3), aa_imgheight(3), aa_image(3), aa_text(3), aa_attrs(3), aa_currentfont(3), aa_autoinit(3), aa_autoinitkbd(3), aa_autoinitmouse(3), aa_recommendhi(3), aa_recommendlow(3), aa_init(3), aa_initkbd(3), aa_initmouse(3), aa_close(3), aa_uninitkbd(3), aa_uninitmouse(3), aa_fastrender(3), aa_render(3), aa_puts(3), aa_printf(3), aa_gotoxy(3), aa_hidecursor(3), aa_showcursor(3), aa_getmouse(3), aa_hidemouse(3), aa_showmouse(3), aa_registerfont(3), aa_setsupported(3), aa_getevent(3), aa_getkey(3), aa_resize(3), aa_resizehandler(3), aa_parseoptions(3), aa_edit(3), aa_createedit(3), aa_editkey(3), aa_putpixel(3), aa_recommendhikbd(3), aa_recommendlowkbd(3), aa_recommendhimouse(3), aa_recommendlowmouse(3), aa_recommendhidisplay(3), aa_recommendlowdisplay(3) aalib-1.4.0/man/aa_setsupported.30000644000766200001440000000352207272031253012315 .\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! .\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! .TH "aa_setsupported" 3 "8 September 1999" "c2man aalib.h" .SH "NAME" aa_setsupported \- alter the "supported" field of hardware_params structure used by AA-lib .SH "SYNOPSIS" .ft B #include .sp void aa_setsupported .br ( .br aa_context *c, .br int supported .br ); .ft R .SH "PARAMETERS" .TP .B "aa_context *c" Specifies the AA-lib context to operate on. .TP .B "int supported" New mask of requested features. Can contain AA_EXTENDED to enable use of all 256 characters and AA_EIGHT to enable use of the character numbered higher than 127. .SH "DESCRIPTION" This function can be used to alter "supported" field of hardware-params structure used by AA-lib. .SH "SEE ALSO" save_d(3), mem_d(3), aa_help(3), aa_formats(3), aa_fonts(3), aa_dithernames(3), aa_drivers(3), aa_kbddrivers(3), aa_mousedrivers(3), aa_kbdrecommended(3), aa_mouserecommended(3), aa_displayrecommended(3), aa_defparams(3), aa_defrenderparams(3), aa_scrwidth(3), aa_scrheight(3), aa_mmwidth(3), aa_mmheight(3), aa_imgwidth(3), aa_imgheight(3), aa_image(3), aa_text(3), aa_attrs(3), aa_currentfont(3), aa_autoinit(3), aa_autoinitkbd(3), aa_autoinitmouse(3), aa_recommendhi(3), aa_recommendlow(3), aa_init(3), aa_initkbd(3), aa_initmouse(3), aa_close(3), aa_uninitkbd(3), aa_uninitmouse(3), aa_fastrender(3), aa_render(3), aa_puts(3), aa_printf(3), aa_gotoxy(3), aa_hidecursor(3), aa_showcursor(3), aa_getmouse(3), aa_hidemouse(3), aa_showmouse(3), aa_registerfont(3), aa_setfont(3), aa_getevent(3), aa_getkey(3), aa_resize(3), aa_resizehandler(3), aa_parseoptions(3), aa_edit(3), aa_createedit(3), aa_editkey(3), aa_putpixel(3), aa_recommendhikbd(3), aa_recommendlowkbd(3), aa_recommendhimouse(3), aa_recommendlowmouse(3), aa_recommendhidisplay(3), aa_recommendlowdisplay(3) aalib-1.4.0/man/aa_showcursor.30000644000766200001440000000305507272031253011773 .\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! .\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! .TH "aa_showcursor" 3 "8 September 1999" "c2man aalib.h" .SH "NAME" aa_showcursor \- show the hardware cursor. .SH "SYNOPSIS" .ft B #include .sp void aa_showcursor(aa_context *c); .ft R .SH "PARAMETERS" .TP .B "aa_context *c" Specifies the AA-lib context to operate on. .SH "DESCRIPTION" Show the hardware cursor. This function may not be ignored by some drivers. .SH "SEE ALSO" save_d(3), mem_d(3), aa_help(3), aa_formats(3), aa_fonts(3), aa_dithernames(3), aa_drivers(3), aa_kbddrivers(3), aa_mousedrivers(3), aa_kbdrecommended(3), aa_mouserecommended(3), aa_displayrecommended(3), aa_defparams(3), aa_defrenderparams(3), aa_scrwidth(3), aa_scrheight(3), aa_mmwidth(3), aa_mmheight(3), aa_imgwidth(3), aa_imgheight(3), aa_image(3), aa_text(3), aa_attrs(3), aa_currentfont(3), aa_autoinit(3), aa_autoinitkbd(3), aa_autoinitmouse(3), aa_recommendhi(3), aa_recommendlow(3), aa_init(3), aa_initkbd(3), aa_initmouse(3), aa_close(3), aa_uninitkbd(3), aa_uninitmouse(3), aa_fastrender(3), aa_render(3), aa_puts(3), aa_printf(3), aa_gotoxy(3), aa_hidecursor(3), aa_getmouse(3), aa_hidemouse(3), aa_showmouse(3), aa_registerfont(3), aa_setsupported(3), aa_setfont(3), aa_getevent(3), aa_getkey(3), aa_resize(3), aa_resizehandler(3), aa_parseoptions(3), aa_edit(3), aa_createedit(3), aa_editkey(3), aa_putpixel(3), aa_recommendhikbd(3), aa_recommendlowkbd(3), aa_recommendhimouse(3), aa_recommendlowmouse(3), aa_recommendhidisplay(3), aa_recommendlowdisplay(3) aalib-1.4.0/man/aa_showmouse.30000644000766200001440000000300507272031253011601 .\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! .\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! .TH "aa_showmouse" 3 "8 September 1999" "c2man aalib.h" .SH "NAME" aa_showmouse \- show the mouse cursor. .SH "SYNOPSIS" .ft B #include .sp void aa_showmouse(aa_context *c); .ft R .SH "PARAMETERS" .TP .B "aa_context *c" Not Documented. .SH "DESCRIPTION" Show the mouse cursor. This function may be ignored by some drivers. .SH "SEE ALSO" save_d(3), mem_d(3), aa_help(3), aa_formats(3), aa_fonts(3), aa_dithernames(3), aa_drivers(3), aa_kbddrivers(3), aa_mousedrivers(3), aa_kbdrecommended(3), aa_mouserecommended(3), aa_displayrecommended(3), aa_defparams(3), aa_defrenderparams(3), aa_scrwidth(3), aa_scrheight(3), aa_mmwidth(3), aa_mmheight(3), aa_imgwidth(3), aa_imgheight(3), aa_image(3), aa_text(3), aa_attrs(3), aa_currentfont(3), aa_autoinit(3), aa_autoinitkbd(3), aa_autoinitmouse(3), aa_recommendhi(3), aa_recommendlow(3), aa_init(3), aa_initkbd(3), aa_initmouse(3), aa_close(3), aa_uninitkbd(3), aa_uninitmouse(3), aa_fastrender(3), aa_render(3), aa_puts(3), aa_printf(3), aa_gotoxy(3), aa_hidecursor(3), aa_showcursor(3), aa_getmouse(3), aa_hidemouse(3), aa_registerfont(3), aa_setsupported(3), aa_setfont(3), aa_getevent(3), aa_getkey(3), aa_resize(3), aa_resizehandler(3), aa_parseoptions(3), aa_edit(3), aa_createedit(3), aa_editkey(3), aa_putpixel(3), aa_recommendhikbd(3), aa_recommendlowkbd(3), aa_recommendhimouse(3), aa_recommendlowmouse(3), aa_recommendhidisplay(3), aa_recommendlowdisplay(3) aalib-1.4.0/man/aa_text.30000644000766200001440000000335207272031253010541 .\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! .\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! .TH "aa_text" 3 "8 September 1999" "c2man aalib.h" .SH "NAME" aa_text \- returns pointer to the text output buffer used by AA-lib. .SH "SYNOPSIS" .ft B #include .sp char *aa_text(aa_context *a); .ft R .SH "PARAMETERS" .TP .B "aa_context *a" Specifies the AA-lib context to operate on. .SH "DESCRIPTION" The text output buffer is simple array of characters specifying the ascii-value of the characters. The array is organizated in the aa_scrheight (a) rows of aa_scrwidth(a) characters. .SH "RETURNS" Pointer the text output buffer used by AA-lib. .SH "SEE ALSO" save_d(3), mem_d(3), aa_help(3), aa_formats(3), aa_fonts(3), aa_dithernames(3), aa_drivers(3), aa_kbddrivers(3), aa_mousedrivers(3), aa_kbdrecommended(3), aa_mouserecommended(3), aa_displayrecommended(3), aa_defparams(3), aa_defrenderparams(3), aa_scrwidth(3), aa_scrheight(3), aa_mmwidth(3), aa_mmheight(3), aa_imgwidth(3), aa_imgheight(3), aa_image(3), aa_attrs(3), aa_currentfont(3), aa_autoinit(3), aa_autoinitkbd(3), aa_autoinitmouse(3), aa_recommendhi(3), aa_recommendlow(3), aa_init(3), aa_initkbd(3), aa_initmouse(3), aa_close(3), aa_uninitkbd(3), aa_uninitmouse(3), aa_fastrender(3), aa_render(3), aa_puts(3), aa_printf(3), aa_gotoxy(3), aa_hidecursor(3), aa_showcursor(3), aa_getmouse(3), aa_hidemouse(3), aa_showmouse(3), aa_registerfont(3), aa_setsupported(3), aa_setfont(3), aa_getevent(3), aa_getkey(3), aa_resize(3), aa_resizehandler(3), aa_parseoptions(3), aa_edit(3), aa_createedit(3), aa_editkey(3), aa_putpixel(3), aa_recommendhikbd(3), aa_recommendlowkbd(3), aa_recommendhimouse(3), aa_recommendlowmouse(3), aa_recommendhidisplay(3), aa_recommendlowdisplay(3) aalib-1.4.0/man/aa_uninitkbd.30000644000766200001440000000314507272031253011544 .\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! .\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! .TH "aa_uninitkbd" 3 "8 September 1999" "c2man aalib.h" .SH "NAME" aa_uninitkbd \- uninitialize the keyboard driver. .SH "SYNOPSIS" .ft B #include .sp void aa_uninitkbd(aa_context *context); .ft R .SH "PARAMETERS" .TP .B "aa_context *context" Specifies the AA-lib context to operate on. .SH "DESCRIPTION" Calls "uninitialize" function of the keyboard driver. It ought to undo all actions done by "initialize" function. .SH "SEE ALSO" save_d(3), mem_d(3), aa_help(3), aa_formats(3), aa_fonts(3), aa_dithernames(3), aa_drivers(3), aa_kbddrivers(3), aa_mousedrivers(3), aa_kbdrecommended(3), aa_mouserecommended(3), aa_displayrecommended(3), aa_defparams(3), aa_defrenderparams(3), aa_scrwidth(3), aa_scrheight(3), aa_mmwidth(3), aa_mmheight(3), aa_imgwidth(3), aa_imgheight(3), aa_image(3), aa_text(3), aa_attrs(3), aa_currentfont(3), aa_autoinit(3), aa_autoinitkbd(3), aa_autoinitmouse(3), aa_recommendhi(3), aa_recommendlow(3), aa_init(3), aa_initkbd(3), aa_initmouse(3), aa_close(3), aa_uninitmouse(3), aa_fastrender(3), aa_render(3), aa_puts(3), aa_printf(3), aa_gotoxy(3), aa_hidecursor(3), aa_showcursor(3), aa_getmouse(3), aa_hidemouse(3), aa_showmouse(3), aa_registerfont(3), aa_setsupported(3), aa_setfont(3), aa_getevent(3), aa_getkey(3), aa_resize(3), aa_resizehandler(3), aa_parseoptions(3), aa_edit(3), aa_createedit(3), aa_editkey(3), aa_putpixel(3), aa_recommendhikbd(3), aa_recommendlowkbd(3), aa_recommendhimouse(3), aa_recommendlowmouse(3), aa_recommendhidisplay(3), aa_recommendlowdisplay(3) aalib-1.4.0/man/aa_uninitmouse.30000644000766200001440000000314307272031253012132 .\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! .\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! .TH "aa_uninitmouse" 3 "8 September 1999" "c2man aalib.h" .SH "NAME" aa_uninitmouse \- uninitialize the mouse driver. .SH "SYNOPSIS" .ft B #include .sp void aa_uninitmouse(aa_context *context); .ft R .SH "PARAMETERS" .TP .B "aa_context *context" Specifies the AA-lib context to operate on. .SH "DESCRIPTION" Calls "uninitialize" function of the mouse driver. It ought to undo all actions done by "initialize" function. .SH "SEE ALSO" save_d(3), mem_d(3), aa_help(3), aa_formats(3), aa_fonts(3), aa_dithernames(3), aa_drivers(3), aa_kbddrivers(3), aa_mousedrivers(3), aa_kbdrecommended(3), aa_mouserecommended(3), aa_displayrecommended(3), aa_defparams(3), aa_defrenderparams(3), aa_scrwidth(3), aa_scrheight(3), aa_mmwidth(3), aa_mmheight(3), aa_imgwidth(3), aa_imgheight(3), aa_image(3), aa_text(3), aa_attrs(3), aa_currentfont(3), aa_autoinit(3), aa_autoinitkbd(3), aa_autoinitmouse(3), aa_recommendhi(3), aa_recommendlow(3), aa_init(3), aa_initkbd(3), aa_initmouse(3), aa_close(3), aa_uninitkbd(3), aa_fastrender(3), aa_render(3), aa_puts(3), aa_printf(3), aa_gotoxy(3), aa_hidecursor(3), aa_showcursor(3), aa_getmouse(3), aa_hidemouse(3), aa_showmouse(3), aa_registerfont(3), aa_setsupported(3), aa_setfont(3), aa_getevent(3), aa_getkey(3), aa_resize(3), aa_resizehandler(3), aa_parseoptions(3), aa_edit(3), aa_createedit(3), aa_editkey(3), aa_putpixel(3), aa_recommendhikbd(3), aa_recommendlowkbd(3), aa_recommendhimouse(3), aa_recommendlowmouse(3), aa_recommendhidisplay(3), aa_recommendlowdisplay(3) aalib-1.4.0/man/mem_d.30000644000766200001440000000311307272031253010170 .\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! .\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! .TH "mem_d" 3 "8 September 1999" "c2man aalib.h" .SH "NAME" mem_d \- AA-lib memory driver. .SH "SYNOPSIS" .ft B #include .sp extern const struct aa_driver mem_d; .ft R .SH "DESCRIPTION" Used to render ascii-art images into memory. You might use this driver to render images into memory and then use your own routines to handle them in case you want to avoid AA-lib's output mechanizms. .SH "SEE ALSO" save_d(3), aa_help(3), aa_formats(3), aa_fonts(3), aa_dithernames(3), aa_drivers(3), aa_kbddrivers(3), aa_mousedrivers(3), aa_kbdrecommended(3), aa_mouserecommended(3), aa_displayrecommended(3), aa_defparams(3), aa_defrenderparams(3), aa_scrwidth(3), aa_scrheight(3), aa_mmwidth(3), aa_mmheight(3), aa_imgwidth(3), aa_imgheight(3), aa_image(3), aa_text(3), aa_attrs(3), aa_currentfont(3), aa_autoinit(3), aa_autoinitkbd(3), aa_autoinitmouse(3), aa_recommendhi(3), aa_recommendlow(3), aa_init(3), aa_initkbd(3), aa_initmouse(3), aa_close(3), aa_uninitkbd(3), aa_uninitmouse(3), aa_fastrender(3), aa_render(3), aa_puts(3), aa_printf(3), aa_gotoxy(3), aa_hidecursor(3), aa_showcursor(3), aa_getmouse(3), aa_hidemouse(3), aa_showmouse(3), aa_registerfont(3), aa_setsupported(3), aa_setfont(3), aa_getevent(3), aa_getkey(3), aa_resize(3), aa_resizehandler(3), aa_parseoptions(3), aa_edit(3), aa_createedit(3), aa_editkey(3), aa_putpixel(3), aa_recommendhikbd(3), aa_recommendlowkbd(3), aa_recommendhimouse(3), aa_recommendlowmouse(3), aa_recommendhidisplay(3), aa_recommendlowdisplay(3) aalib-1.4.0/man/save_d.30000644000766200001440000000316507272031253010357 .\" WARNING! THIS FILE WAS GENERATED AUTOMATICALLY BY c2man! .\" DO NOT EDIT! CHANGES MADE TO THIS FILE WILL BE LOST! .TH "save_d" 3 "8 September 1999" "c2man aalib.h" .SH "NAME" save_d \- AA-lib driver used to save ascii-art image into file in used specified format. .SH "SYNOPSIS" .ft B #include .sp extern const struct aa_driver save_d; .ft R .SH "DESCRIPTION" Initialize this driver using aa_init function and specify the driver dependent parameters in aa_savedata structure to save image into file. See the texinfo documentation for details. .SH "SEE ALSO" mem_d(3), aa_help(3), aa_formats(3), aa_fonts(3), aa_dithernames(3), aa_drivers(3), aa_kbddrivers(3), aa_mousedrivers(3), aa_kbdrecommended(3), aa_mouserecommended(3), aa_displayrecommended(3), aa_defparams(3), aa_defrenderparams(3), aa_scrwidth(3), aa_scrheight(3), aa_mmwidth(3), aa_mmheight(3), aa_imgwidth(3), aa_imgheight(3), aa_image(3), aa_text(3), aa_attrs(3), aa_currentfont(3), aa_autoinit(3), aa_autoinitkbd(3), aa_autoinitmouse(3), aa_recommendhi(3), aa_recommendlow(3), aa_init(3), aa_initkbd(3), aa_initmouse(3), aa_close(3), aa_uninitkbd(3), aa_uninitmouse(3), aa_fastrender(3), aa_render(3), aa_puts(3), aa_printf(3), aa_gotoxy(3), aa_hidecursor(3), aa_showcursor(3), aa_getmouse(3), aa_hidemouse(3), aa_showmouse(3), aa_registerfont(3), aa_setsupported(3), aa_setfont(3), aa_getevent(3), aa_getkey(3), aa_resize(3), aa_resizehandler(3), aa_parseoptions(3), aa_edit(3), aa_createedit(3), aa_editkey(3), aa_putpixel(3), aa_recommendhikbd(3), aa_recommendlowkbd(3), aa_recommendhimouse(3), aa_recommendlowmouse(3), aa_recommendhidisplay(3), aa_recommendlowdisplay(3) aalib-1.4.0/man/aafire.10000644000766200001440000000156407272031253010344 .TH AALIB 1 .SH NAME aafire, aainfo, aasavefont, aatest \- aalib example programs .SH SYNOPSIS .B aafire .I "[options]" .P .B aainfo .I "[options]" .P .B aasavefont .I "[options] file_name variable_name long_name short_name" .P .B aatest .I "[options]" .SH "DESCRIPTION" This manual page documents briefly the .BR aafire , .BR aainfo , .BR aasavefont , and .BR aatest programs. .PP All of these programs exist to demonstrate the capabilities of the aalib library, an ascii art library. .PP .B aafire displays burning ascii art flames. .PP .B aainfo displays information about what drivers aalib will use for the display, keyboard, and mouse, and what parameters, such as screen size those drivers will use. .PP .B aasavefont saves a font to a file. .PP .B aatest tests the capabilities of aalib. .SH AUTHOR This manual page was written by Joey Hess, for the Debian GNU/Linux system. aalib-1.4.0/doc/0000777000766200001440000000000007272037670007114 5aalib-1.4.0/doc/Makefile.in0000644000766200001440000002001207272037670011070 # 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@ AALIB_CFLAGS = @AALIB_CFLAGS@ AALIB_LIBS = @AALIB_LIBS@ AALIB_RLD_FLAGS = @AALIB_RLD_FLAGS@ AS = @AS@ CC = @CC@ DLLTOOL = @DLLTOOL@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ MAKEINFO = @MAKEINFO@ OBJDUMP = @OBJDUMP@ PACKAGE = @PACKAGE@ RANLIB = @RANLIB@ VERSION = @VERSION@ XCURSES = @XCURSES@ machine = @machine@ system = @system@ info_TEXINFOS = aalib.texinfo EXTRA_DIST = reference.texinfo mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = ../src/config.h CONFIG_CLEAN_FILES = TEXI2DVI = texi2dvi INFO_DEPS = aalib.info DVIS = aalib.dvi TEXINFOS = aalib.texinfo DIST_COMMON = Makefile.am Makefile.in texinfo.tex DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) TAR = tar GZIP_ENV = --best all: all-redirect .SUFFIXES: .SUFFIXES: .dvi .info .ps .texi .texinfo .txi $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps doc/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status aalib.info: aalib.texinfo aalib.dvi: aalib.texinfo DVIPS = dvips .texi.info: @cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9] cd $(srcdir) \ && $(MAKEINFO) `echo $< | sed 's,.*/,,'` .texi.dvi: TEXINPUTS=.:$$TEXINPUTS \ MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $< .texi: @cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9] cd $(srcdir) \ && $(MAKEINFO) `echo $< | sed 's,.*/,,'` .texinfo.info: @cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9] cd $(srcdir) \ && $(MAKEINFO) `echo $< | sed 's,.*/,,'` .texinfo: @cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9] cd $(srcdir) \ && $(MAKEINFO) `echo $< | sed 's,.*/,,'` .texinfo.dvi: TEXINPUTS=.:$$TEXINPUTS \ MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $< .txi.info: @cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9] cd $(srcdir) \ && $(MAKEINFO) `echo $< | sed 's,.*/,,'` .txi.dvi: TEXINPUTS=.:$$TEXINPUTS \ MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $< .txi: @cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9] cd $(srcdir) \ && $(MAKEINFO) `echo $< | sed 's,.*/,,'` .dvi.ps: $(DVIPS) $< -o $@ install-info-am: $(INFO_DEPS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(infodir) @list='$(INFO_DEPS)'; \ for file in $$list; do \ d=$(srcdir); \ for ifile in `cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \ if test -f $$d/$$ifile; then \ echo " $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile"; \ $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile; \ else : ; fi; \ done; \ done @$(POST_INSTALL) @if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \ list='$(INFO_DEPS)'; \ for file in $$list; do \ echo " install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file";\ install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file || :;\ done; \ else : ; fi uninstall-info: $(PRE_UNINSTALL) @if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \ ii=yes; \ else ii=; fi; \ list='$(INFO_DEPS)'; \ for file in $$list; do \ test -z "$ii" \ || install-info --info-dir=$(DESTDIR)$(infodir) --remove $$file; \ done @$(NORMAL_UNINSTALL) list='$(INFO_DEPS)'; \ for file in $$list; do \ (cd $(DESTDIR)$(infodir) && rm -f $$file $$file-[0-9] $$file-[0-9][0-9]); \ done dist-info: $(INFO_DEPS) list='$(INFO_DEPS)'; \ for base in $$list; do \ d=$(srcdir); \ for file in `cd $$d && eval echo $$base*`; do \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ || cp -p $$d/$$file $(distdir)/$$file; \ done; \ done mostlyclean-aminfo: -rm -f aalib.aux aalib.cp aalib.cps aalib.dvi aalib.fn aalib.fns \ aalib.ky aalib.kys aalib.ps aalib.log aalib.pg aalib.toc \ aalib.tp aalib.tps aalib.vr aalib.vrs aalib.op aalib.tr \ aalib.cv aalib.cn clean-aminfo: distclean-aminfo: maintainer-clean-aminfo: cd $(srcdir) && for i in $(INFO_DEPS); do \ rm -f $$i; \ if test "`echo $$i-[0-9]*`" != "$$i-[0-9]*"; then \ rm -f $$i-[0-9]*; \ fi; \ done tags: TAGS TAGS: distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) subdir = doc distdir: $(DISTFILES) @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ cp -pr $$d/$$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-info info-am: $(INFO_DEPS) info: info-am dvi-am: $(DVIS) 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-info-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-info uninstall: uninstall-am all-am: Makefile $(INFO_DEPS) all-redirect: all-am install-strip: $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install installdirs: $(mkinstalldirs) $(DESTDIR)$(infodir) mostlyclean-generic: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) -rm -f config.cache config.log stamp-h stamp-h[0-9]* maintainer-clean-generic: mostlyclean-am: mostlyclean-aminfo mostlyclean-generic mostlyclean: mostlyclean-am clean-am: clean-aminfo clean-generic mostlyclean-am clean: clean-am distclean-am: distclean-aminfo distclean-generic clean-am -rm -f libtool distclean: distclean-am maintainer-clean-am: maintainer-clean-aminfo 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-info-am uninstall-info mostlyclean-aminfo \ distclean-aminfo clean-aminfo maintainer-clean-aminfo 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 aalib.texinfo: reference.texinfo # 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: aalib-1.4.0/doc/Makefile.am0000644000766200001440000000013707272031253011054 info_TEXINFOS = aalib.texinfo EXTRA_DIST = reference.texinfo aalib.texinfo: reference.texinfo aalib-1.4.0/doc/texinfo.tex0000644000766200001440000062207707272031253011233 % texinfo.tex -- TeX macros to handle Texinfo files. % % Load plain if necessary, i.e., if running under initex. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % \def\texinfoversion{2000-12-11.07} % % Copyright (C) 1985, 86, 88, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 % Free Software Foundation, Inc. % % This texinfo.tex 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, or (at % your option) any later version. % % This texinfo.tex file 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 texinfo.tex file; see the file COPYING. If not, write % to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, % Boston, MA 02111-1307, USA. % % In other words, you are welcome to use, share and improve this program. % You are forbidden to forbid anyone else to use, share and improve % what you give them. Help stamp out software-hoarding! % % Please try the latest version of texinfo.tex before submitting bug % reports; you can get the latest version from: % ftp://ftp.gnu.org/gnu/texinfo.tex % (and all GNU mirrors, see http://www.gnu.org/order/ftp.html) % ftp://texinfo.org/tex/texinfo.tex % ftp://us.ctan.org/macros/texinfo/texinfo.tex % (and all CTAN mirrors, finger ctan@us.ctan.org for a list). % /home/gd/gnu/doc/texinfo.tex on the GNU machines. % The texinfo.tex in any given Texinfo distribution could well be out % of date, so if that's what you're using, please check. % Texinfo has a small home page at http://texinfo.org/. % % Send bug reports to bug-texinfo@gnu.org. Please include including a % complete document in each bug report with which we can reproduce the % problem. Patches are, of course, greatly appreciated. % % To process a Texinfo manual with TeX, it's most reliable to use the % texi2dvi shell script that comes with the distribution. For a simple % manual foo.texi, however, you can get away with this: % tex foo.texi % texindex foo.?? % tex foo.texi % tex foo.texi % dvips foo.dvi -o # or whatever, to process the dvi file; this makes foo.ps. % The extra runs of TeX get the cross-reference information correct. % Sometimes one run after texindex suffices, and sometimes you need more % than two; texi2dvi does it as many times as necessary. % % It is possible to adapt texinfo.tex for other languages. You can get % the existing language-specific files from ftp://ftp.gnu.org/gnu/texinfo/. \message{Loading texinfo [version \texinfoversion]:} % If in a .fmt file, print the version number % and turn on active characters that we couldn't do earlier because % they might have appeared in the input file name. \everyjob{\message{[Texinfo version \texinfoversion]}% \catcode`+=\active \catcode`\_=\active} % Save some parts of plain tex whose names we will redefine. \let\ptexb=\b \let\ptexbullet=\bullet \let\ptexc=\c \let\ptexcomma=\, \let\ptexdot=\. \let\ptexdots=\dots \let\ptexend=\end \let\ptexequiv=\equiv \let\ptexexclam=\! \let\ptexi=\i \let\ptexlbrace=\{ \let\ptexrbrace=\} \let\ptexstar=\* \let\ptext=\t % We never want plain's outer \+ definition in Texinfo. % For @tex, we can use \tabalign. \let\+ = \relax \message{Basics,} \chardef\other=12 % If this character appears in an error message or help string, it % starts a new line in the output. \newlinechar = `^^J % Set up fixed words for English if not already set. \ifx\putwordAppendix\undefined \gdef\putwordAppendix{Appendix}\fi \ifx\putwordChapter\undefined \gdef\putwordChapter{Chapter}\fi \ifx\putwordfile\undefined \gdef\putwordfile{file}\fi \ifx\putwordin\undefined \gdef\putwordin{in}\fi \ifx\putwordIndexIsEmpty\undefined \gdef\putwordIndexIsEmpty{(Index is empty)}\fi \ifx\putwordIndexNonexistent\undefined \gdef\putwordIndexNonexistent{(Index is nonexistent)}\fi \ifx\putwordInfo\undefined \gdef\putwordInfo{Info}\fi \ifx\putwordInstanceVariableof\undefined \gdef\putwordInstanceVariableof{Instance Variable of}\fi \ifx\putwordMethodon\undefined \gdef\putwordMethodon{Method on}\fi \ifx\putwordNoTitle\undefined \gdef\putwordNoTitle{No Title}\fi \ifx\putwordof\undefined \gdef\putwordof{of}\fi \ifx\putwordon\undefined \gdef\putwordon{on}\fi \ifx\putwordpage\undefined \gdef\putwordpage{page}\fi \ifx\putwordsection\undefined \gdef\putwordsection{section}\fi \ifx\putwordSection\undefined \gdef\putwordSection{Section}\fi \ifx\putwordsee\undefined \gdef\putwordsee{see}\fi \ifx\putwordSee\undefined \gdef\putwordSee{See}\fi \ifx\putwordShortTOC\undefined \gdef\putwordShortTOC{Short Contents}\fi \ifx\putwordTOC\undefined \gdef\putwordTOC{Table of Contents}\fi % \ifx\putwordMJan\undefined \gdef\putwordMJan{January}\fi \ifx\putwordMFeb\undefined \gdef\putwordMFeb{February}\fi \ifx\putwordMMar\undefined \gdef\putwordMMar{March}\fi \ifx\putwordMApr\undefined \gdef\putwordMApr{April}\fi \ifx\putwordMMay\undefined \gdef\putwordMMay{May}\fi \ifx\putwordMJun\undefined \gdef\putwordMJun{June}\fi \ifx\putwordMJul\undefined \gdef\putwordMJul{July}\fi \ifx\putwordMAug\undefined \gdef\putwordMAug{August}\fi \ifx\putwordMSep\undefined \gdef\putwordMSep{September}\fi \ifx\putwordMOct\undefined \gdef\putwordMOct{October}\fi \ifx\putwordMNov\undefined \gdef\putwordMNov{November}\fi \ifx\putwordMDec\undefined \gdef\putwordMDec{December}\fi % \ifx\putwordDefmac\undefined \gdef\putwordDefmac{Macro}\fi \ifx\putwordDefspec\undefined \gdef\putwordDefspec{Special Form}\fi \ifx\putwordDefvar\undefined \gdef\putwordDefvar{Variable}\fi \ifx\putwordDefopt\undefined \gdef\putwordDefopt{User Option}\fi \ifx\putwordDeftypevar\undefined\gdef\putwordDeftypevar{Variable}\fi \ifx\putwordDeffunc\undefined \gdef\putwordDeffunc{Function}\fi \ifx\putwordDeftypefun\undefined\gdef\putwordDeftypefun{Function}\fi % Ignore a token. % \def\gobble#1{} \hyphenation{ap-pen-dix} \hyphenation{mini-buf-fer mini-buf-fers} \hyphenation{eshell} \hyphenation{white-space} % Margin to add to right of even pages, to left of odd pages. \newdimen \bindingoffset \newdimen \normaloffset \newdimen\pagewidth \newdimen\pageheight % Sometimes it is convenient to have everything in the transcript file % and nothing on the terminal. We don't just call \tracingall here, % since that produces some useless output on the terminal. % \def\gloggingall{\begingroup \globaldefs = 1 \loggingall \endgroup}% \ifx\eTeXversion\undefined \def\loggingall{\tracingcommands2 \tracingstats2 \tracingpages1 \tracingoutput1 \tracinglostchars1 \tracingmacros2 \tracingparagraphs1 \tracingrestores1 \showboxbreadth\maxdimen\showboxdepth\maxdimen }% \else \def\loggingall{\tracingcommands3 \tracingstats2 \tracingpages1 \tracingoutput1 \tracinglostchars1 \tracingmacros2 \tracingparagraphs1 \tracingrestores1 \tracingscantokens1 \tracingassigns1 \tracingifs1 \tracinggroups1 \tracingnesting2 \showboxbreadth\maxdimen\showboxdepth\maxdimen }% \fi % For @cropmarks command. % Do @cropmarks to get crop marks. % \newif\ifcropmarks \let\cropmarks = \cropmarkstrue % % Dimensions to add cropmarks at corners. % Added by P. A. MacKay, 12 Nov. 1986 % \newdimen\outerhsize \newdimen\outervsize % set by the paper size routines \newdimen\cornerlong \cornerlong=1pc \newdimen\cornerthick \cornerthick=.3pt \newdimen\topandbottommargin \topandbottommargin=.75in % Main output routine. \chardef\PAGE = 255 \output = {\onepageout{\pagecontents\PAGE}} \newbox\headlinebox \newbox\footlinebox % \onepageout takes a vbox as an argument. Note that \pagecontents % does insertions, but you have to call it yourself. \def\onepageout#1{% \ifcropmarks \hoffset=0pt \else \hoffset=\normaloffset \fi % \ifodd\pageno \advance\hoffset by \bindingoffset \else \advance\hoffset by -\bindingoffset\fi % % Do this outside of the \shipout so @code etc. will be expanded in % the headline as they should be, not taken literally (outputting ''code). \setbox\headlinebox = \vbox{\let\hsize=\pagewidth \makeheadline}% \setbox\footlinebox = \vbox{\let\hsize=\pagewidth \makefootline}% % {% % Have to do this stuff outside the \shipout because we want it to % take effect in \write's, yet the group defined by the \vbox ends % before the \shipout runs. % \escapechar = `\\ % use backslash in output files. \indexdummies % don't expand commands in the output. \normalturnoffactive % \ in index entries must not stay \, e.g., if % the page break happens to be in the middle of an example. \shipout\vbox{% % Do this early so pdf references go to the beginning of the page. \ifpdfmakepagedest \pdfmkdest{\the\pageno} \fi % \ifcropmarks \vbox to \outervsize\bgroup \hsize = \outerhsize \vskip-\topandbottommargin \vtop to0pt{% \line{\ewtop\hfil\ewtop}% \nointerlineskip \line{% \vbox{\moveleft\cornerthick\nstop}% \hfill \vbox{\moveright\cornerthick\nstop}% }% \vss}% \vskip\topandbottommargin \line\bgroup \hfil % center the page within the outer (page) hsize. \ifodd\pageno\hskip\bindingoffset\fi \vbox\bgroup \fi % \unvbox\headlinebox \pagebody{#1}% \ifdim\ht\footlinebox > 0pt % Only leave this space if the footline is nonempty. % (We lessened \vsize for it in \oddfootingxxx.) % The \baselineskip=24pt in plain's \makefootline has no effect. \vskip 2\baselineskip \unvbox\footlinebox \fi % \ifcropmarks \egroup % end of \vbox\bgroup \hfil\egroup % end of (centering) \line\bgroup \vskip\topandbottommargin plus1fill minus1fill \boxmaxdepth = \cornerthick \vbox to0pt{\vss \line{% \vbox{\moveleft\cornerthick\nsbot}% \hfill \vbox{\moveright\cornerthick\nsbot}% }% \nointerlineskip \line{\ewbot\hfil\ewbot}% }% \egroup % \vbox from first cropmarks clause \fi }% end of \shipout\vbox }% end of group with \turnoffactive \advancepageno \ifnum\outputpenalty>-20000 \else\dosupereject\fi } \newinsert\margin \dimen\margin=\maxdimen \def\pagebody#1{\vbox to\pageheight{\boxmaxdepth=\maxdepth #1}} {\catcode`\@ =11 \gdef\pagecontents#1{\ifvoid\topins\else\unvbox\topins\fi % marginal hacks, juha@viisa.uucp (Juha Takala) \ifvoid\margin\else % marginal info is present \rlap{\kern\hsize\vbox to\z@{\kern1pt\box\margin \vss}}\fi \dimen@=\dp#1 \unvbox#1 \ifvoid\footins\else\vskip\skip\footins\footnoterule \unvbox\footins\fi \ifr@ggedbottom \kern-\dimen@ \vfil \fi} } % Here are the rules for the cropmarks. Note that they are % offset so that the space between them is truly \outerhsize or \outervsize % (P. A. MacKay, 12 November, 1986) % \def\ewtop{\vrule height\cornerthick depth0pt width\cornerlong} \def\nstop{\vbox {\hrule height\cornerthick depth\cornerlong width\cornerthick}} \def\ewbot{\vrule height0pt depth\cornerthick width\cornerlong} \def\nsbot{\vbox {\hrule height\cornerlong depth\cornerthick width\cornerthick}} % Parse an argument, then pass it to #1. The argument is the rest of % the input line (except we remove a trailing comment). #1 should be a % macro which expects an ordinary undelimited TeX argument. % \def\parsearg#1{% \let\next = #1% \begingroup \obeylines \futurelet\temp\parseargx } % If the next token is an obeyed space (from an @example environment or % the like), remove it and recurse. Otherwise, we're done. \def\parseargx{% % \obeyedspace is defined far below, after the definition of \sepspaces. \ifx\obeyedspace\temp \expandafter\parseargdiscardspace \else \expandafter\parseargline \fi } % Remove a single space (as the delimiter token to the macro call). {\obeyspaces % \gdef\parseargdiscardspace {\futurelet\temp\parseargx}} {\obeylines % \gdef\parseargline#1^^M{% \endgroup % End of the group started in \parsearg. % % First remove any @c comment, then any @comment. % Result of each macro is put in \toks0. \argremovec #1\c\relax % \expandafter\argremovecomment \the\toks0 \comment\relax % % % Call the caller's macro, saved as \next in \parsearg. \expandafter\next\expandafter{\the\toks0}% }% } % Since all \c{,omment} does is throw away the argument, we can let TeX % do that for us. The \relax here is matched by the \relax in the call % in \parseargline; it could be more or less anything, its purpose is % just to delimit the argument to the \c. \def\argremovec#1\c#2\relax{\toks0 = {#1}} \def\argremovecomment#1\comment#2\relax{\toks0 = {#1}} % \argremovec{,omment} might leave us with trailing spaces, though; e.g., % @end itemize @c foo % will have two active spaces as part of the argument with the % `itemize'. Here we remove all active spaces from #1, and assign the % result to \toks0. % % This loses if there are any *other* active characters besides spaces % in the argument -- _ ^ +, for example -- since they get expanded. % Fortunately, Texinfo does not define any such commands. (If it ever % does, the catcode of the characters in questionwill have to be changed % here.) But this means we cannot call \removeactivespaces as part of % \argremovec{,omment}, since @c uses \parsearg, and thus the argument % that \parsearg gets might well have any character at all in it. % \def\removeactivespaces#1{% \begingroup \ignoreactivespaces \edef\temp{#1}% \global\toks0 = \expandafter{\temp}% \endgroup } % Change the active space to expand to nothing. % \begingroup \obeyspaces \gdef\ignoreactivespaces{\obeyspaces\let =\empty} \endgroup \def\flushcr{\ifx\par\lisppar \def\next##1{}\else \let\next=\relax \fi \next} %% These are used to keep @begin/@end levels from running away %% Call \inENV within environments (after a \begingroup) \newif\ifENV \ENVfalse \def\inENV{\ifENV\relax\else\ENVtrue\fi} \def\ENVcheck{% \ifENV\errmessage{Still within an environment; press RETURN to continue} \endgroup\fi} % This is not perfect, but it should reduce lossage % @begin foo is the same as @foo, for now. \newhelp\EMsimple{Press RETURN to continue.} \outer\def\begin{\parsearg\beginxxx} \def\beginxxx #1{% \expandafter\ifx\csname #1\endcsname\relax {\errhelp=\EMsimple \errmessage{Undefined command @begin #1}}\else \csname #1\endcsname\fi} % @end foo executes the definition of \Efoo. % \def\end{\parsearg\endxxx} \def\endxxx #1{% \removeactivespaces{#1}% \edef\endthing{\the\toks0}% % \expandafter\ifx\csname E\endthing\endcsname\relax \expandafter\ifx\csname \endthing\endcsname\relax % There's no \foo, i.e., no ``environment'' foo. \errhelp = \EMsimple \errmessage{Undefined command `@end \endthing'}% \else \unmatchedenderror\endthing \fi \else % Everything's ok; the right environment has been started. \csname E\endthing\endcsname \fi } % There is an environment #1, but it hasn't been started. Give an error. % \def\unmatchedenderror#1{% \errhelp = \EMsimple \errmessage{This `@end #1' doesn't have a matching `@#1'}% } % Define the control sequence \E#1 to give an unmatched @end error. % \def\defineunmatchedend#1{% \expandafter\def\csname E#1\endcsname{\unmatchedenderror{#1}}% } % Single-spacing is done by various environments (specifically, in % \nonfillstart and \quotations). \newskip\singlespaceskip \singlespaceskip = 12.5pt \def\singlespace{% % Why was this kern here? It messes up equalizing space above and below % environments. --karl, 6may93 %{\advance \baselineskip by -\singlespaceskip %\kern \baselineskip}% \setleading \singlespaceskip } %% Simple single-character @ commands % @@ prints an @ % Kludge this until the fonts are right (grr). \def\@{{\tt\char64}} % This is turned off because it was never documented % and you can use @w{...} around a quote to suppress ligatures. %% Define @` and @' to be the same as ` and ' %% but suppressing ligatures. %\def\`{{`}} %\def\'{{'}} % Used to generate quoted braces. \def\mylbrace {{\tt\char123}} \def\myrbrace {{\tt\char125}} \let\{=\mylbrace \let\}=\myrbrace \begingroup % Definitions to produce actual \{ & \} command in an index. \catcode`\{ = 12 \catcode`\} = 12 \catcode`\[ = 1 \catcode`\] = 2 \catcode`\@ = 0 \catcode`\\ = 12 @gdef@lbracecmd[\{]% @gdef@rbracecmd[\}]% @endgroup % Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent % Others are defined by plain TeX: @` @' @" @^ @~ @= @v @H. \let\, = \c \let\dotaccent = \. \def\ringaccent#1{{\accent23 #1}} \let\tieaccent = \t \let\ubaraccent = \b \let\udotaccent = \d % Other special characters: @questiondown @exclamdown % Plain TeX defines: @AA @AE @O @OE @L (and lowercase versions) @ss. \def\questiondown{?`} \def\exclamdown{!`} % Dotless i and dotless j, used for accents. \def\imacro{i} \def\jmacro{j} \def\dotless#1{% \def\temp{#1}% \ifx\temp\imacro \ptexi \else\ifx\temp\jmacro \j \else \errmessage{@dotless can be used only with i or j}% \fi\fi } % Be sure we're in horizontal mode when doing a tie, since we make space % equivalent to this in @example-like environments. Otherwise, a space % at the beginning of a line will start with \penalty -- and % since \penalty is valid in vertical mode, we'd end up putting the % penalty on the vertical list instead of in the new paragraph. {\catcode`@ = 11 % Avoid using \@M directly, because that causes trouble % if the definition is written into an index file. \global\let\tiepenalty = \@M \gdef\tie{\leavevmode\penalty\tiepenalty\ } } % @: forces normal size whitespace following. \def\:{\spacefactor=1000 } % @* forces a line break. \def\*{\hfil\break\hbox{}\ignorespaces} % @. is an end-of-sentence period. \def\.{.\spacefactor=3000 } % @! is an end-of-sentence bang. \def\!{!\spacefactor=3000 } % @? is an end-of-sentence query. \def\?{?\spacefactor=3000 } % @w prevents a word break. Without the \leavevmode, @w at the % beginning of a paragraph, when TeX is still in vertical mode, would % produce a whole line of output instead of starting the paragraph. \def\w#1{\leavevmode\hbox{#1}} % @group ... @end group forces ... to be all on one page, by enclosing % it in a TeX vbox. We use \vtop instead of \vbox to construct the box % to keep its height that of a normal line. According to the rules for % \topskip (p.114 of the TeXbook), the glue inserted is % max (\topskip - \ht (first item), 0). If that height is large, % therefore, no glue is inserted, and the space between the headline and % the text is small, which looks bad. % \def\group{\begingroup \ifnum\catcode13=\active \else \errhelp = \groupinvalidhelp \errmessage{@group invalid in context where filling is enabled}% \fi % % The \vtop we start below produces a box with normal height and large % depth; thus, TeX puts \baselineskip glue before it, and (when the % next line of text is done) \lineskip glue after it. (See p.82 of % the TeXbook.) Thus, space below is not quite equal to space % above. But it's pretty close. \def\Egroup{% \egroup % End the \vtop. \endgroup % End the \group. }% % \vtop\bgroup % We have to put a strut on the last line in case the @group is in % the midst of an example, rather than completely enclosing it. % Otherwise, the interline space between the last line of the group % and the first line afterwards is too small. But we can't put the % strut in \Egroup, since there it would be on a line by itself. % Hence this just inserts a strut at the beginning of each line. \everypar = {\strut}% % % Since we have a strut on every line, we don't need any of TeX's % normal interline spacing. \offinterlineskip % % OK, but now we have to do something about blank % lines in the input in @example-like environments, which normally % just turn into \lisppar, which will insert no space now that we've % turned off the interline space. Simplest is to make them be an % empty paragraph. \ifx\par\lisppar \edef\par{\leavevmode \par}% % % Reset ^^M's definition to new definition of \par. \obeylines \fi % % Do @comment since we are called inside an environment such as % @example, where each end-of-line in the input causes an % end-of-line in the output. We don't want the end-of-line after % the `@group' to put extra space in the output. Since @group % should appear on a line by itself (according to the Texinfo % manual), we don't worry about eating any user text. \comment } % % TeX puts in an \escapechar (i.e., `@') at the beginning of the help % message, so this ends up printing `@group can only ...'. % \newhelp\groupinvalidhelp{% group can only be used in environments such as @example,^^J% where each line of input produces a line of output.} % @need space-in-mils % forces a page break if there is not space-in-mils remaining. \newdimen\mil \mil=0.001in \def\need{\parsearg\needx} % Old definition--didn't work. %\def\needx #1{\par % %% This method tries to make TeX break the page naturally %% if the depth of the box does not fit. %{\baselineskip=0pt% %\vtop to #1\mil{\vfil}\kern -#1\mil\nobreak %\prevdepth=-1000pt %}} \def\needx#1{% % Ensure vertical mode, so we don't make a big box in the middle of a % paragraph. \par % % If the @need value is less than one line space, it's useless. \dimen0 = #1\mil \dimen2 = \ht\strutbox \advance\dimen2 by \dp\strutbox \ifdim\dimen0 > \dimen2 % % Do a \strut just to make the height of this box be normal, so the % normal leading is inserted relative to the preceding line. % And a page break here is fine. \vtop to #1\mil{\strut\vfil}% % % TeX does not even consider page breaks if a penalty added to the % main vertical list is 10000 or more. But in order to see if the % empty box we just added fits on the page, we must make it consider % page breaks. On the other hand, we don't want to actually break the % page after the empty box. So we use a penalty of 9999. % % There is an extremely small chance that TeX will actually break the % page at this \penalty, if there are no other feasible breakpoints in % sight. (If the user is using lots of big @group commands, which % almost-but-not-quite fill up a page, TeX will have a hard time doing % good page breaking, for example.) However, I could not construct an % example where a page broke at this \penalty; if it happens in a real % document, then we can reconsider our strategy. \penalty9999 % % Back up by the size of the box, whether we did a page break or not. \kern -#1\mil % % Do not allow a page break right after this kern. \nobreak \fi } % @br forces paragraph break \let\br = \par % @dots{} output an ellipsis using the current font. % We do .5em per period so that it has the same spacing in a typewriter % font as three actual period characters. % \def\dots{% \leavevmode \hbox to 1.5em{% \hskip 0pt plus 0.25fil minus 0.25fil .\hss.\hss.% \hskip 0pt plus 0.5fil minus 0.5fil }% } % @enddots{} is an end-of-sentence ellipsis. % \def\enddots{% \leavevmode \hbox to 2em{% \hskip 0pt plus 0.25fil minus 0.25fil .\hss.\hss.\hss.% \hskip 0pt plus 0.5fil minus 0.5fil }% \spacefactor=3000 } % @page forces the start of a new page % \def\page{\par\vfill\supereject} % @exdent text.... % outputs text on separate line in roman font, starting at standard page margin % This records the amount of indent in the innermost environment. % That's how much \exdent should take out. \newskip\exdentamount % This defn is used inside fill environments such as @defun. \def\exdent{\parsearg\exdentyyy} \def\exdentyyy #1{{\hfil\break\hbox{\kern -\exdentamount{\rm#1}}\hfil\break}} % This defn is used inside nofill environments such as @example. \def\nofillexdent{\parsearg\nofillexdentyyy} \def\nofillexdentyyy #1{{\advance \leftskip by -\exdentamount \leftline{\hskip\leftskip{\rm#1}}}} % @inmargin{WHICH}{TEXT} puts TEXT in the WHICH margin next to the current % paragraph. For more general purposes, use the \margin insertion % class. WHICH is `l' or `r'. % \newskip\inmarginspacing \inmarginspacing=1cm \def\strutdepth{\dp\strutbox} % \def\doinmargin#1#2{\strut\vadjust{% \nobreak \kern-\strutdepth \vtop to \strutdepth{% \baselineskip=\strutdepth \vss % if you have multiple lines of stuff to put here, you'll need to % make the vbox yourself of the appropriate size. \ifx#1l% \llap{\ignorespaces #2\hskip\inmarginspacing}% \else \rlap{\hskip\hsize \hskip\inmarginspacing \ignorespaces #2}% \fi \null }% }} \def\inleftmargin{\doinmargin l} \def\inrightmargin{\doinmargin r} % % @inmargin{TEXT [, RIGHT-TEXT]} % (if RIGHT-TEXT is given, use TEXT for left page, RIGHT-TEXT for right; % else use TEXT for both). % \def\inmargin#1{\parseinmargin #1,,\finish} \def\parseinmargin#1,#2,#3\finish{% not perfect, but better than nothing. \setbox0 = \hbox{\ignorespaces #2}% \ifdim\wd0 > 0pt \def\lefttext{#1}% have both texts \def\righttext{#2}% \else \def\lefttext{#1}% have only one text \def\righttext{#1}% \fi % \ifodd\pageno \def\temp{\inleftmargin\lefttext}% \else \def\temp{\inrightmargin\righttext}% \fi \temp } % @include file insert text of that file as input. % Allow normal characters that we make active in the argument (a file name). \def\include{\begingroup \catcode`\\=12 \catcode`~=12 \catcode`^=12 \catcode`_=12 \catcode`|=12 \catcode`<=12 \catcode`>=12 \catcode`+=12 \parsearg\includezzz} % Restore active chars for included file. \def\includezzz#1{\endgroup\begingroup % Read the included file in a group so nested @include's work. \def\thisfile{#1}% \input\thisfile \endgroup} \def\thisfile{} % @center line outputs that line, centered \def\center{\parsearg\centerzzz} \def\centerzzz #1{{\advance\hsize by -\leftskip \advance\hsize by -\rightskip \centerline{#1}}} % @sp n outputs n lines of vertical space \def\sp{\parsearg\spxxx} \def\spxxx #1{\vskip #1\baselineskip} % @comment ...line which is ignored... % @c is the same as @comment % @ignore ... @end ignore is another way to write a comment \def\comment{\begingroup \catcode`\^^M=\other% \catcode`\@=\other \catcode`\{=\other \catcode`\}=\other% \commentxxx} {\catcode`\^^M=\other \gdef\commentxxx#1^^M{\endgroup}} \let\c=\comment % @paragraphindent NCHARS % We'll use ems for NCHARS, close enough. % We cannot implement @paragraphindent asis, though. % \def\asisword{asis} % no translation, these are keywords \def\noneword{none} % \def\paragraphindent{\parsearg\doparagraphindent} \def\doparagraphindent#1{% \def\temp{#1}% \ifx\temp\asisword \else \ifx\temp\noneword \defaultparindent = 0pt \else \defaultparindent = #1em \fi \fi \parindent = \defaultparindent } % @exampleindent NCHARS % We'll use ems for NCHARS like @paragraphindent. % It seems @exampleindent asis isn't necessary, but % I preserve it to make it similar to @paragraphindent. \def\exampleindent{\parsearg\doexampleindent} \def\doexampleindent#1{% \def\temp{#1}% \ifx\temp\asisword \else \ifx\temp\noneword \lispnarrowing = 0pt \else \lispnarrowing = #1em \fi \fi } % @asis just yields its argument. Used with @table, for example. % \def\asis#1{#1} % @math means output in math mode. % We don't use $'s directly in the definition of \math because control % sequences like \math are expanded when the toc file is written. Then, % we read the toc file back, the $'s will be normal characters (as they % should be, according to the definition of Texinfo). So we must use a % control sequence to switch into and out of math mode. % % This isn't quite enough for @math to work properly in indices, but it % seems unlikely it will ever be needed there. % \let\implicitmath = $ \def\math#1{\implicitmath #1\implicitmath} % @bullet and @minus need the same treatment as @math, just above. \def\bullet{\implicitmath\ptexbullet\implicitmath} \def\minus{\implicitmath-\implicitmath} % @refill is a no-op. \let\refill=\relax % If working on a large document in chapters, it is convenient to % be able to disable indexing, cross-referencing, and contents, for test runs. % This is done with @novalidate (before @setfilename). % \newif\iflinks \linkstrue % by default we want the aux files. \let\novalidate = \linksfalse % @setfilename is done at the beginning of every texinfo file. % So open here the files we need to have open while reading the input. % This makes it possible to make a .fmt file for texinfo. \def\setfilename{% \iflinks \readauxfile \fi % \openindices needs to do some work in any case. \openindices \fixbackslash % Turn off hack to swallow `\input texinfo'. \global\let\setfilename=\comment % Ignore extra @setfilename cmds. % % If texinfo.cnf is present on the system, read it. % Useful for site-wide @afourpaper, etc. % Just to be on the safe side, close the input stream before the \input. \openin 1 texinfo.cnf \ifeof1 \let\temp=\relax \else \def\temp{\input texinfo.cnf }\fi \closein1 \temp % \comment % Ignore the actual filename. } % Called from \setfilename. % \def\openindices{% \newindex{cp}% \newcodeindex{fn}% \newcodeindex{vr}% \newcodeindex{tp}% \newcodeindex{ky}% \newcodeindex{pg}% } % @bye. \outer\def\bye{\pagealignmacro\tracingstats=1\ptexend} \message{pdf,} % adobe `portable' document format \newcount\tempnum \newcount\lnkcount \newtoks\filename \newcount\filenamelength \newcount\pgn \newtoks\toksA \newtoks\toksB \newtoks\toksC \newtoks\toksD \newbox\boxA \newcount\countA \newif\ifpdf \newif\ifpdfmakepagedest \ifx\pdfoutput\undefined \pdffalse \let\pdfmkdest = \gobble \let\pdfurl = \gobble \let\endlink = \relax \let\linkcolor = \relax \let\pdfmakeoutlines = \relax \else \pdftrue \pdfoutput = 1 \input pdfcolor \def\dopdfimage#1#2#3{% \def\imagewidth{#2}% \def\imageheight{#3}% \ifnum\pdftexversion < 14 \pdfimage \else \pdfximage \fi \ifx\empty\imagewidth\else width \imagewidth \fi \ifx\empty\imageheight\else height \imageheight \fi {#1.pdf}% \ifnum\pdftexversion < 14 \else \pdfrefximage \pdflastximage \fi} \def\pdfmkdest#1{\pdfdest name{#1@} xyz} \def\pdfmkpgn#1{#1@} \let\linkcolor = \Blue % was Cyan, but that seems light? \def\endlink{\Black\pdfendlink} % Adding outlines to PDF; macros for calculating structure of outlines % come from Petr Olsak \def\expnumber#1{\expandafter\ifx\csname#1\endcsname\relax 0% \else \csname#1\endcsname \fi} \def\advancenumber#1{\tempnum=\expnumber{#1}\relax \advance\tempnum by1 \expandafter\xdef\csname#1\endcsname{\the\tempnum}} \def\pdfmakeoutlines{{% \openin 1 \jobname.toc \ifeof 1\else\bgroup \closein 1 \indexnofonts \def\tt{} \let\_ = \normalunderscore % Thanh's hack / proper braces in bookmarks \edef\mylbrace{\iftrue \string{\else}\fi}\let\{=\mylbrace \edef\myrbrace{\iffalse{\else\string}\fi}\let\}=\myrbrace % \def\chapentry ##1##2##3{} \def\unnumbchapentry ##1##2{} \def\secentry ##1##2##3##4{\advancenumber{chap##2}} \def\unnumbsecentry ##1##2{} \def\subsecentry ##1##2##3##4##5{\advancenumber{sec##2.##3}} \def\unnumbsubsecentry ##1##2{} \def\subsubsecentry ##1##2##3##4##5##6{\advancenumber{subsec##2.##3.##4}} \def\unnumbsubsubsecentry ##1##2{} \input \jobname.toc \def\chapentry ##1##2##3{% \pdfoutline goto name{\pdfmkpgn{##3}}count-\expnumber{chap##2}{##1}} \def\unnumbchapentry ##1##2{% \pdfoutline goto name{\pdfmkpgn{##2}}{##1}} \def\secentry ##1##2##3##4{% \pdfoutline goto name{\pdfmkpgn{##4}}count-\expnumber{sec##2.##3}{##1}} \def\unnumbsecentry ##1##2{% \pdfoutline goto name{\pdfmkpgn{##2}}{##1}} \def\subsecentry ##1##2##3##4##5{% \pdfoutline goto name{\pdfmkpgn{##5}}count-\expnumber{subsec##2.##3.##4}{##1}} \def\unnumbsubsecentry ##1##2{% \pdfoutline goto name{\pdfmkpgn{##2}}{##1}} \def\subsubsecentry ##1##2##3##4##5##6{% \pdfoutline goto name{\pdfmkpgn{##6}}{##1}} \def\unnumbsubsubsecentry ##1##2{% \pdfoutline goto name{\pdfmkpgn{##2}}{##1}} \input \jobname.toc \egroup\fi }} \def\makelinks #1,{% \def\params{#1}\def\E{END}% \ifx\params\E \let\nextmakelinks=\relax \else \let\nextmakelinks=\makelinks \ifnum\lnkcount>0,\fi \picknum{#1}% \startlink attr{/Border [0 0 0]} goto name{\pdfmkpgn{\the\pgn}}% \linkcolor #1% \advance\lnkcount by 1% \endlink \fi \nextmakelinks } \def\picknum#1{\expandafter\pn#1} \def\pn#1{% \def\p{#1}% \ifx\p\lbrace \let\nextpn=\ppn \else \let\nextpn=\ppnn \def\first{#1} \fi \nextpn } \def\ppn#1{\pgn=#1\gobble} \def\ppnn{\pgn=\first} \def\pdfmklnk#1{\lnkcount=0\makelinks #1,END,} \def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks} \def\skipspaces#1{\def\PP{#1}\def\D{|}% \ifx\PP\D\let\nextsp\relax \else\let\nextsp\skipspaces \ifx\p\space\else\addtokens{\filename}{\PP}% \advance\filenamelength by 1 \fi \fi \nextsp} \def\getfilename#1{\filenamelength=0\expandafter\skipspaces#1|\relax} \ifnum\pdftexversion < 14 \let \startlink \pdfannotlink \else \let \startlink \pdfstartlink \fi \def\pdfurl#1{% \begingroup \normalturnoffactive\def\@{@}% \leavevmode\Red \startlink attr{/Border [0 0 0]}% user{/Subtype /Link /A << /S /URI /URI (#1) >>}% % #1 \endgroup} \def\pdfgettoks#1.{\setbox\boxA=\hbox{\toksA={#1.}\toksB={}\maketoks}} \def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks} \def\adn#1{\addtokens{\toksC}{#1}\global\countA=1\let\next=\maketoks} \def\poptoks#1#2|ENDTOKS|{\let\first=#1\toksD={#1}\toksA={#2}} \def\maketoks{% \expandafter\poptoks\the\toksA|ENDTOKS| \ifx\first0\adn0 \else\ifx\first1\adn1 \else\ifx\first2\adn2 \else\ifx\first3\adn3 \else\ifx\first4\adn4 \else\ifx\first5\adn5 \else\ifx\first6\adn6 \else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9 \else \ifnum0=\countA\else\makelink\fi \ifx\first.\let\next=\done\else \let\next=\maketoks \addtokens{\toksB}{\the\toksD} \ifx\first,\addtokens{\toksB}{\space}\fi \fi \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi \next} \def\makelink{\addtokens{\toksB}% {\noexpand\pdflink{\the\toksC}}\toksC={}\global\countA=0} \def\pdflink#1{% \startlink attr{/Border [0 0 0]} goto name{\mkpgn{#1}} \linkcolor #1\endlink} \def\mkpgn#1{#1@} \def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st} \fi % \ifx\pdfoutput \message{fonts,} % Font-change commands. % Texinfo sort of supports the sans serif font style, which plain TeX does not. % So we set up a \sf analogous to plain's \rm, etc. \newfam\sffam \def\sf{\fam=\sffam \tensf} \let\li = \sf % Sometimes we call it \li, not \sf. % We don't need math for this one. \def\ttsl{\tenttsl} % Use Computer Modern fonts at \magstephalf (11pt). \newcount\mainmagstep \mainmagstep=\magstephalf % Set the font macro #1 to the font named #2, adding on the % specified font prefix (normally `cm'). % #3 is the font's design size, #4 is a scale factor \def\setfont#1#2#3#4{\font#1=\fontprefix#2#3 scaled #4} % Use cm as the default font prefix. % To specify the font prefix, you must define \fontprefix % before you read in texinfo.tex. \ifx\fontprefix\undefined \def\fontprefix{cm} \fi % Support font families that don't use the same naming scheme as CM. \def\rmshape{r} \def\rmbshape{bx} %where the normal face is bold \def\bfshape{b} \def\bxshape{bx} \def\ttshape{tt} \def\ttbshape{tt} \def\ttslshape{sltt} \def\itshape{ti} \def\itbshape{bxti} \def\slshape{sl} \def\slbshape{bxsl} \def\sfshape{ss} \def\sfbshape{ss} \def\scshape{csc} \def\scbshape{csc} \ifx\bigger\relax \let\mainmagstep=\magstep1 \setfont\textrm\rmshape{12}{1000} \setfont\texttt\ttshape{12}{1000} \else \setfont\textrm\rmshape{10}{\mainmagstep} \setfont\texttt\ttshape{10}{\mainmagstep} \fi % Instead of cmb10, you many want to use cmbx10. % cmbx10 is a prettier font on its own, but cmb10 % looks better when embedded in a line with cmr10. \setfont\textbf\bfshape{10}{\mainmagstep} \setfont\textit\itshape{10}{\mainmagstep} \setfont\textsl\slshape{10}{\mainmagstep} \setfont\textsf\sfshape{10}{\mainmagstep} \setfont\textsc\scshape{10}{\mainmagstep} \setfont\textttsl\ttslshape{10}{\mainmagstep} \font\texti=cmmi10 scaled \mainmagstep \font\textsy=cmsy10 scaled \mainmagstep % A few fonts for @defun, etc. \setfont\defbf\bxshape{10}{\magstep1} %was 1314 \setfont\deftt\ttshape{10}{\magstep1} \def\df{\let\tentt=\deftt \let\tenbf = \defbf \bf} % Fonts for indices, footnotes, small examples (9pt). \setfont\smallrm\rmshape{9}{1000} \setfont\smalltt\ttshape{9}{1000} \setfont\smallbf\bfshape{10}{900} \setfont\smallit\itshape{9}{1000} \setfont\smallsl\slshape{9}{1000} \setfont\smallsf\sfshape{9}{1000} \setfont\smallsc\scshape{10}{900} \setfont\smallttsl\ttslshape{10}{900} \font\smalli=cmmi9 \font\smallsy=cmsy9 % Fonts for title page: \setfont\titlerm\rmbshape{12}{\magstep3} \setfont\titleit\itbshape{10}{\magstep4} \setfont\titlesl\slbshape{10}{\magstep4} \setfont\titlett\ttbshape{12}{\magstep3} \setfont\titlettsl\ttslshape{10}{\magstep4} \setfont\titlesf\sfbshape{17}{\magstep1} \let\titlebf=\titlerm \setfont\titlesc\scbshape{10}{\magstep4} \font\titlei=cmmi12 scaled \magstep3 \font\titlesy=cmsy10 scaled \magstep4 \def\authorrm{\secrm} % Chapter (and unnumbered) fonts (17.28pt). \setfont\chaprm\rmbshape{12}{\magstep2} \setfont\chapit\itbshape{10}{\magstep3} \setfont\chapsl\slbshape{10}{\magstep3} \setfont\chaptt\ttbshape{12}{\magstep2} \setfont\chapttsl\ttslshape{10}{\magstep3} \setfont\chapsf\sfbshape{17}{1000} \let\chapbf=\chaprm \setfont\chapsc\scbshape{10}{\magstep3} \font\chapi=cmmi12 scaled \magstep2 \font\chapsy=cmsy10 scaled \magstep3 % Section fonts (14.4pt). \setfont\secrm\rmbshape{12}{\magstep1} \setfont\secit\itbshape{10}{\magstep2} \setfont\secsl\slbshape{10}{\magstep2} \setfont\sectt\ttbshape{12}{\magstep1} \setfont\secttsl\ttslshape{10}{\magstep2} \setfont\secsf\sfbshape{12}{\magstep1} \let\secbf\secrm \setfont\secsc\scbshape{10}{\magstep2} \font\seci=cmmi12 scaled \magstep1 \font\secsy=cmsy10 scaled \magstep2 % \setfont\ssecrm\bxshape{10}{\magstep1} % This size an font looked bad. % \setfont\ssecit\itshape{10}{\magstep1} % The letters were too crowded. % \setfont\ssecsl\slshape{10}{\magstep1} % \setfont\ssectt\ttshape{10}{\magstep1} % \setfont\ssecsf\sfshape{10}{\magstep1} %\setfont\ssecrm\bfshape{10}{1315} % Note the use of cmb rather than cmbx. %\setfont\ssecit\itshape{10}{1315} % Also, the size is a little larger than %\setfont\ssecsl\slshape{10}{1315} % being scaled magstep1. %\setfont\ssectt\ttshape{10}{1315} %\setfont\ssecsf\sfshape{10}{1315} %\let\ssecbf=\ssecrm % Subsection fonts (13.15pt). \setfont\ssecrm\rmbshape{12}{\magstephalf} \setfont\ssecit\itbshape{10}{1315} \setfont\ssecsl\slbshape{10}{1315} \setfont\ssectt\ttbshape{12}{\magstephalf} \setfont\ssecttsl\ttslshape{10}{1315} \setfont\ssecsf\sfbshape{12}{\magstephalf} \let\ssecbf\ssecrm \setfont\ssecsc\scbshape{10}{\magstep1} \font\sseci=cmmi12 scaled \magstephalf \font\ssecsy=cmsy10 scaled 1315 % The smallcaps and symbol fonts should actually be scaled \magstep1.5, % but that is not a standard magnification. % In order for the font changes to affect most math symbols and letters, % we have to define the \textfont of the standard families. Since % texinfo doesn't allow for producing subscripts and superscripts, we % don't bother to reset \scriptfont and \scriptscriptfont (which would % also require loading a lot more fonts). % \def\resetmathfonts{% \textfont0 = \tenrm \textfont1 = \teni \textfont2 = \tensy \textfont\itfam = \tenit \textfont\slfam = \tensl \textfont\bffam = \tenbf \textfont\ttfam = \tentt \textfont\sffam = \tensf } % The font-changing commands redefine the meanings of \tenSTYLE, instead % of just \STYLE. We do this so that font changes will continue to work % in math mode, where it is the current \fam that is relevant in most % cases, not the current font. Plain TeX does \def\bf{\fam=\bffam % \tenbf}, for example. By redefining \tenbf, we obviate the need to % redefine \bf itself. \def\textfonts{% \let\tenrm=\textrm \let\tenit=\textit \let\tensl=\textsl \let\tenbf=\textbf \let\tentt=\texttt \let\smallcaps=\textsc \let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy \let\tenttsl=\textttsl \resetmathfonts} \def\titlefonts{% \let\tenrm=\titlerm \let\tenit=\titleit \let\tensl=\titlesl \let\tenbf=\titlebf \let\tentt=\titlett \let\smallcaps=\titlesc \let\tensf=\titlesf \let\teni=\titlei \let\tensy=\titlesy \let\tenttsl=\titlettsl \resetmathfonts \setleading{25pt}} \def\titlefont#1{{\titlefonts\rm #1}} \def\chapfonts{% \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl \let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc \let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy \let\tenttsl=\chapttsl \resetmathfonts \setleading{19pt}} \def\secfonts{% \let\tenrm=\secrm \let\tenit=\secit \let\tensl=\secsl \let\tenbf=\secbf \let\tentt=\sectt \let\smallcaps=\secsc \let\tensf=\secsf \let\teni=\seci \let\tensy=\secsy \let\tenttsl=\secttsl \resetmathfonts \setleading{16pt}} \def\subsecfonts{% \let\tenrm=\ssecrm \let\tenit=\ssecit \let\tensl=\ssecsl \let\tenbf=\ssecbf \let\tentt=\ssectt \let\smallcaps=\ssecsc \let\tensf=\ssecsf \let\teni=\sseci \let\tensy=\ssecsy \let\tenttsl=\ssecttsl \resetmathfonts \setleading{15pt}} \let\subsubsecfonts = \subsecfonts % Maybe make sssec fonts scaled magstephalf? \def\smallfonts{% \let\tenrm=\smallrm \let\tenit=\smallit \let\tensl=\smallsl \let\tenbf=\smallbf \let\tentt=\smalltt \let\smallcaps=\smallsc \let\tensf=\smallsf \let\teni=\smalli \let\tensy=\smallsy \let\tenttsl=\smallttsl \resetmathfonts \setleading{11pt}} % Set up the default fonts, so we can use them for creating boxes. % \textfonts % Define these so they can be easily changed for other fonts. \def\angleleft{$\langle$} \def\angleright{$\rangle$} % Count depth in font-changes, for error checks \newcount\fontdepth \fontdepth=0 % Fonts for short table of contents. \setfont\shortcontrm\rmshape{12}{1000} \setfont\shortcontbf\bxshape{12}{1000} \setfont\shortcontsl\slshape{12}{1000} %% Add scribe-like font environments, plus @l for inline lisp (usually sans %% serif) and @ii for TeX italic % \smartitalic{ARG} outputs arg in italics, followed by an italic correction % unless the following character is such as not to need one. \def\smartitalicx{\ifx\next,\else\ifx\next-\else\ifx\next.\else\/\fi\fi\fi} \def\smartslanted#1{{\sl #1}\futurelet\next\smartitalicx} \def\smartitalic#1{{\it #1}\futurelet\next\smartitalicx} \let\i=\smartitalic \let\var=\smartslanted \let\dfn=\smartslanted \let\emph=\smartitalic \let\cite=\smartslanted \def\b#1{{\bf #1}} \let\strong=\b % We can't just use \exhyphenpenalty, because that only has effect at % the end of a paragraph. Restore normal hyphenation at the end of the % group within which \nohyphenation is presumably called. % \def\nohyphenation{\hyphenchar\font = -1 \aftergroup\restorehyphenation} \def\restorehyphenation{\hyphenchar\font = `- } \def\t#1{% {\tt \rawbackslash \frenchspacing #1}% \null } \let\ttfont=\t \def\samp#1{`\tclose{#1}'\null} \setfont\keyrm\rmshape{8}{1000} \font\keysy=cmsy9 \def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{% \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{% \vbox{\hrule\kern-0.4pt \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}% \kern-0.4pt\hrule}% \kern-.06em\raise0.4pt\hbox{\angleright}}}} % The old definition, with no lozenge: %\def\key #1{{\ttsl \nohyphenation \uppercase{#1}}\null} \def\ctrl #1{{\tt \rawbackslash \hat}#1} % @file, @option are the same as @samp. \let\file=\samp \let\option=\samp % @code is a modification of @t, % which makes spaces the same size as normal in the surrounding text. \def\tclose#1{% {% % Change normal interword space to be same as for the current font. \spaceskip = \fontdimen2\font % % Switch to typewriter. \tt % % But `\ ' produces the large typewriter interword space. \def\ {{\spaceskip = 0pt{} }}% % % Turn off hyphenation. \nohyphenation % \rawbackslash \frenchspacing #1% }% \null } % We *must* turn on hyphenation at `-' and `_' in \code. % Otherwise, it is too hard to avoid overfull hboxes % in the Emacs manual, the Library manual, etc. % Unfortunately, TeX uses one parameter (\hyphenchar) to control % both hyphenation at - and hyphenation within words. % We must therefore turn them both off (\tclose does that) % and arrange explicitly to hyphenate at a dash. % -- rms. { \catcode`\-=\active \catcode`\_=\active % \global\def\code{\begingroup \catcode`\-=\active \let-\codedash \catcode`\_=\active \let_\codeunder \codex } % % If we end up with any active - characters when handling the index, % just treat them as a normal -. \global\def\indexbreaks{\catcode`\-=\active \let-\realdash} } \def\realdash{-} \def\codedash{-\discretionary{}{}{}} \def\codeunder{\ifusingtt{\normalunderscore\discretionary{}{}{}}{\_}} \def\codex #1{\tclose{#1}\endgroup} %\let\exp=\tclose %Was temporary % @kbd is like @code, except that if the argument is just one @key command, % then @kbd has no effect. % @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always), % `example' (@kbd uses ttsl only inside of @example and friends), % or `code' (@kbd uses normal tty font always). \def\kbdinputstyle{\parsearg\kbdinputstylexxx} \def\kbdinputstylexxx#1{% \def\arg{#1}% \ifx\arg\worddistinct \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}% \else\ifx\arg\wordexample \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}% \else\ifx\arg\wordcode \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}% \fi\fi\fi } \def\worddistinct{distinct} \def\wordexample{example} \def\wordcode{code} % Default is kbdinputdistinct. (Too much of a hassle to call the macro, % the catcodes are wrong for parsearg to work.) \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl} \def\xkey{\key} \def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}% \ifx\one\xkey\ifx\threex\three \key{#2}% \else{\tclose{\kbdfont\look}}\fi \else{\tclose{\kbdfont\look}}\fi} % For @url, @env, @command quotes seem unnecessary, so use \code. \let\url=\code \let\env=\code \let\command=\code % @uref (abbreviation for `urlref') takes an optional (comma-separated) % second argument specifying the text to display and an optional third % arg as text to display instead of (rather than in addition to) the url % itself. First (mandatory) arg is the url. Perhaps eventually put in % a hypertex \special here. % \def\uref#1{\douref #1,,,\finish} \def\douref#1,#2,#3,#4\finish{\begingroup \unsepspaces \pdfurl{#1}% \setbox0 = \hbox{\ignorespaces #3}% \ifdim\wd0 > 0pt \unhbox0 % third arg given, show only that \else \setbox0 = \hbox{\ignorespaces #2}% \ifdim\wd0 > 0pt \ifpdf \unhbox0 % PDF: 2nd arg given, show only it \else \unhbox0\ (\code{#1})% DVI: 2nd arg given, show both it and url \fi \else \code{#1}% only url given, so show it \fi \fi \endlink \endgroup} % rms does not like angle brackets --karl, 17may97. % So now @email is just like @uref, unless we are pdf. % %\def\email#1{\angleleft{\tt #1}\angleright} \ifpdf \def\email#1{\doemail#1,,\finish} \def\doemail#1,#2,#3\finish{\begingroup \unsepspaces \pdfurl{mailto:#1}% \setbox0 = \hbox{\ignorespaces #2}% \ifdim\wd0>0pt\unhbox0\else\code{#1}\fi \endlink \endgroup} \else \let\email=\uref \fi % Check if we are currently using a typewriter font. Since all the % Computer Modern typewriter fonts have zero interword stretch (and % shrink), and it is reasonable to expect all typewriter fonts to have % this property, we can check that font parameter. % \def\ifmonospace{\ifdim\fontdimen3\font=0pt } % Typeset a dimension, e.g., `in' or `pt'. The only reason for the % argument is to make the input look right: @dmn{pt} instead of @dmn{}pt. % \def\dmn#1{\thinspace #1} \def\kbd#1{\def\look{#1}\expandafter\kbdfoo\look??\par} % @l was never documented to mean ``switch to the Lisp font'', % and it is not used as such in any manual I can find. We need it for % Polish suppressed-l. --karl, 22sep96. %\def\l#1{{\li #1}\null} % Explicit font changes: @r, @sc, undocumented @ii. \def\r#1{{\rm #1}} % roman font \def\sc#1{{\smallcaps#1}} % smallcaps font \def\ii#1{{\it #1}} % italic font % @acronym downcases the argument and prints in smallcaps. \def\acronym#1{{\smallcaps \lowercase{#1}}} % @pounds{} is a sterling sign. \def\pounds{{\it\$}} \message{page headings,} \newskip\titlepagetopglue \titlepagetopglue = 1.5in \newskip\titlepagebottomglue \titlepagebottomglue = 2pc % First the title page. Must do @settitle before @titlepage. \newif\ifseenauthor \newif\iffinishedtitlepage % Do an implicit @contents or @shortcontents after @end titlepage if the % user says @setcontentsaftertitlepage or @setshortcontentsaftertitlepage. % \newif\ifsetcontentsaftertitlepage \let\setcontentsaftertitlepage = \setcontentsaftertitlepagetrue \newif\ifsetshortcontentsaftertitlepage \let\setshortcontentsaftertitlepage = \setshortcontentsaftertitlepagetrue \def\shorttitlepage{\parsearg\shorttitlepagezzz} \def\shorttitlepagezzz #1{\begingroup\hbox{}\vskip 1.5in \chaprm \centerline{#1}% \endgroup\page\hbox{}\page} \def\titlepage{\begingroup \parindent=0pt \textfonts \let\subtitlerm=\tenrm \def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines}% % \def\authorfont{\authorrm \normalbaselineskip = 16pt \normalbaselines}% % % Leave some space at the very top of the page. \vglue\titlepagetopglue % % Now you can print the title using @title. \def\title{\parsearg\titlezzz}% \def\titlezzz##1{\leftline{\titlefonts\rm ##1} % print a rule at the page bottom also. \finishedtitlepagefalse \vskip4pt \hrule height 4pt width \hsize \vskip4pt}% % No rule at page bottom unless we print one at the top with @title. \finishedtitlepagetrue % % Now you can put text using @subtitle. \def\subtitle{\parsearg\subtitlezzz}% \def\subtitlezzz##1{{\subtitlefont \rightline{##1}}}% % % @author should come last, but may come many times. \def\author{\parsearg\authorzzz}% \def\authorzzz##1{\ifseenauthor\else\vskip 0pt plus 1filll\seenauthortrue\fi {\authorfont \leftline{##1}}}% % % Most title ``pages'' are actually two pages long, with space % at the top of the second. We don't want the ragged left on the second. \let\oldpage = \page \def\page{% \iffinishedtitlepage\else \finishtitlepage \fi \oldpage \let\page = \oldpage \hbox{}}% % \def\page{\oldpage \hbox{}} } \def\Etitlepage{% \iffinishedtitlepage\else \finishtitlepage \fi % It is important to do the page break before ending the group, % because the headline and footline are only empty inside the group. % If we use the new definition of \page, we always get a blank page % after the title page, which we certainly don't want. \oldpage \endgroup % % If they want short, they certainly want long too. \ifsetshortcontentsaftertitlepage \shortcontents \contents \global\let\shortcontents = \relax \global\let\contents = \relax \fi % \ifsetcontentsaftertitlepage \contents \global\let\contents = \relax \global\let\shortcontents = \relax \fi % \ifpdf \pdfmakepagedesttrue \fi % \HEADINGSon } \def\finishtitlepage{% \vskip4pt \hrule height 2pt width \hsize \vskip\titlepagebottomglue \finishedtitlepagetrue } %%% Set up page headings and footings. \let\thispage=\folio \newtoks\evenheadline % headline on even pages \newtoks\oddheadline % headline on odd pages \newtoks\evenfootline % footline on even pages \newtoks\oddfootline % footline on odd pages % Now make Tex use those variables \headline={{\textfonts\rm \ifodd\pageno \the\oddheadline \else \the\evenheadline \fi}} \footline={{\textfonts\rm \ifodd\pageno \the\oddfootline \else \the\evenfootline \fi}\HEADINGShook} \let\HEADINGShook=\relax % Commands to set those variables. % For example, this is what @headings on does % @evenheading @thistitle|@thispage|@thischapter % @oddheading @thischapter|@thispage|@thistitle % @evenfooting @thisfile|| % @oddfooting ||@thisfile \def\evenheading{\parsearg\evenheadingxxx} \def\oddheading{\parsearg\oddheadingxxx} \def\everyheading{\parsearg\everyheadingxxx} \def\evenfooting{\parsearg\evenfootingxxx} \def\oddfooting{\parsearg\oddfootingxxx} \def\everyfooting{\parsearg\everyfootingxxx} {\catcode`\@=0 % \gdef\evenheadingxxx #1{\evenheadingyyy #1@|@|@|@|\finish} \gdef\evenheadingyyy #1@|#2@|#3@|#4\finish{% \global\evenheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} \gdef\oddheadingxxx #1{\oddheadingyyy #1@|@|@|@|\finish} \gdef\oddheadingyyy #1@|#2@|#3@|#4\finish{% \global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} \gdef\everyheadingxxx#1{\oddheadingxxx{#1}\evenheadingxxx{#1}}% \gdef\evenfootingxxx #1{\evenfootingyyy #1@|@|@|@|\finish} \gdef\evenfootingyyy #1@|#2@|#3@|#4\finish{% \global\evenfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} \gdef\oddfootingxxx #1{\oddfootingyyy #1@|@|@|@|\finish} \gdef\oddfootingyyy #1@|#2@|#3@|#4\finish{% \global\oddfootline = {\rlap{\centerline{#2}}\line{#1\hfil#3}}% % % Leave some space for the footline. Hopefully ok to assume % @evenfooting will not be used by itself. \global\advance\pageheight by -\baselineskip \global\advance\vsize by -\baselineskip } \gdef\everyfootingxxx#1{\oddfootingxxx{#1}\evenfootingxxx{#1}} % }% unbind the catcode of @. % @headings double turns headings on for double-sided printing. % @headings single turns headings on for single-sided printing. % @headings off turns them off. % @headings on same as @headings double, retained for compatibility. % @headings after turns on double-sided headings after this page. % @headings doubleafter turns on double-sided headings after this page. % @headings singleafter turns on single-sided headings after this page. % By default, they are off at the start of a document, % and turned `on' after @end titlepage. \def\headings #1 {\csname HEADINGS#1\endcsname} \def\HEADINGSoff{ \global\evenheadline={\hfil} \global\evenfootline={\hfil} \global\oddheadline={\hfil} \global\oddfootline={\hfil}} \HEADINGSoff % When we turn headings on, set the page number to 1. % For double-sided printing, put current file name in lower left corner, % chapter name on inside top of right hand pages, document % title on inside top of left hand pages, and page numbers on outside top % edge of all pages. \def\HEADINGSdouble{ \global\pageno=1 \global\evenfootline={\hfil} \global\oddfootline={\hfil} \global\evenheadline={\line{\folio\hfil\thistitle}} \global\oddheadline={\line{\thischapter\hfil\folio}} \global\let\contentsalignmacro = \chapoddpage } \let\contentsalignmacro = \chappager % For single-sided printing, chapter title goes across top left of page, % page number on top right. \def\HEADINGSsingle{ \global\pageno=1 \global\evenfootline={\hfil} \global\oddfootline={\hfil} \global\evenheadline={\line{\thischapter\hfil\folio}} \global\oddheadline={\line{\thischapter\hfil\folio}} \global\let\contentsalignmacro = \chappager } \def\HEADINGSon{\HEADINGSdouble} \def\HEADINGSafter{\let\HEADINGShook=\HEADINGSdoublex} \let\HEADINGSdoubleafter=\HEADINGSafter \def\HEADINGSdoublex{% \global\evenfootline={\hfil} \global\oddfootline={\hfil} \global\evenheadline={\line{\folio\hfil\thistitle}} \global\oddheadline={\line{\thischapter\hfil\folio}} \global\let\contentsalignmacro = \chapoddpage } \def\HEADINGSsingleafter{\let\HEADINGShook=\HEADINGSsinglex} \def\HEADINGSsinglex{% \global\evenfootline={\hfil} \global\oddfootline={\hfil} \global\evenheadline={\line{\thischapter\hfil\folio}} \global\oddheadline={\line{\thischapter\hfil\folio}} \global\let\contentsalignmacro = \chappager } % Subroutines used in generating headings % This produces Day Month Year style of output. % Only define if not already defined, in case a txi-??.tex file has set % up a different format (e.g., txi-cs.tex does this). \ifx\today\undefined \def\today{% \number\day\space \ifcase\month \or\putwordMJan\or\putwordMFeb\or\putwordMMar\or\putwordMApr \or\putwordMMay\or\putwordMJun\or\putwordMJul\or\putwordMAug \or\putwordMSep\or\putwordMOct\or\putwordMNov\or\putwordMDec \fi \space\number\year} \fi % @settitle line... specifies the title of the document, for headings. % It generates no output of its own. \def\thistitle{\putwordNoTitle} \def\settitle{\parsearg\settitlezzz} \def\settitlezzz #1{\gdef\thistitle{#1}} \message{tables,} % Tables -- @table, @ftable, @vtable, @item(x), @kitem(x), @xitem(x). % default indentation of table text \newdimen\tableindent \tableindent=.8in % default indentation of @itemize and @enumerate text \newdimen\itemindent \itemindent=.3in % margin between end of table item and start of table text. \newdimen\itemmargin \itemmargin=.1in % used internally for \itemindent minus \itemmargin \newdimen\itemmax % Note @table, @vtable, and @vtable define @item, @itemx, etc., with % these defs. % They also define \itemindex % to index the item name in whatever manner is desired (perhaps none). \newif\ifitemxneedsnegativevskip \def\itemxpar{\par\ifitemxneedsnegativevskip\nobreak\vskip-\parskip\nobreak\fi} \def\internalBitem{\smallbreak \parsearg\itemzzz} \def\internalBitemx{\itemxpar \parsearg\itemzzz} \def\internalBxitem "#1"{\def\xitemsubtopix{#1} \smallbreak \parsearg\xitemzzz} \def\internalBxitemx "#1"{\def\xitemsubtopix{#1} \itemxpar \parsearg\xitemzzz} \def\internalBkitem{\smallbreak \parsearg\kitemzzz} \def\internalBkitemx{\itemxpar \parsearg\kitemzzz} \def\kitemzzz #1{\dosubind {kw}{\code{#1}}{for {\bf \lastfunction}}% \itemzzz {#1}} \def\xitemzzz #1{\dosubind {kw}{\code{#1}}{for {\bf \xitemsubtopic}}% \itemzzz {#1}} \def\itemzzz #1{\begingroup % \advance\hsize by -\rightskip \advance\hsize by -\tableindent \setbox0=\hbox{\itemfont{#1}}% \itemindex{#1}% \nobreak % This prevents a break before @itemx. % % If the item text does not fit in the space we have, put it on a line % by itself, and do not allow a page break either before or after that % line. We do not start a paragraph here because then if the next % command is, e.g., @kindex, the whatsit would get put into the % horizontal list on a line by itself, resulting in extra blank space. \ifdim \wd0>\itemmax % % Make this a paragraph so we get the \parskip glue and wrapping, % but leave it ragged-right. \begingroup \advance\leftskip by-\tableindent \advance\hsize by\tableindent \advance\rightskip by0pt plus1fil \leavevmode\unhbox0\par \endgroup % % We're going to be starting a paragraph, but we don't want the % \parskip glue -- logically it's part of the @item we just started. \nobreak \vskip-\parskip % % Stop a page break at the \parskip glue coming up. Unfortunately % we can't prevent a possible page break at the following % \baselineskip glue. \nobreak \endgroup \itemxneedsnegativevskipfalse \else % The item text fits into the space. Start a paragraph, so that the % following text (if any) will end up on the same line. \noindent % Do this with kerns and \unhbox so that if there is a footnote in % the item text, it can migrate to the main vertical list and % eventually be printed. \nobreak\kern-\tableindent \dimen0 = \itemmax \advance\dimen0 by \itemmargin \advance\dimen0 by -\wd0 \unhbox0 \nobreak\kern\dimen0 \endgroup \itemxneedsnegativevskiptrue \fi } \def\item{\errmessage{@item while not in a table}} \def\itemx{\errmessage{@itemx while not in a table}} \def\kitem{\errmessage{@kitem while not in a table}} \def\kitemx{\errmessage{@kitemx while not in a table}} \def\xitem{\errmessage{@xitem while not in a table}} \def\xitemx{\errmessage{@xitemx while not in a table}} % Contains a kludge to get @end[description] to work. \def\description{\tablez{\dontindex}{1}{}{}{}{}} % @table, @ftable, @vtable. \def\table{\begingroup\inENV\obeylines\obeyspaces\tablex} {\obeylines\obeyspaces% \gdef\tablex #1^^M{% \tabley\dontindex#1 \endtabley}} \def\ftable{\begingroup\inENV\obeylines\obeyspaces\ftablex} {\obeylines\obeyspaces% \gdef\ftablex #1^^M{% \tabley\fnitemindex#1 \endtabley \def\Eftable{\endgraf\afterenvbreak\endgroup}% \let\Etable=\relax}} \def\vtable{\begingroup\inENV\obeylines\obeyspaces\vtablex} {\obeylines\obeyspaces% \gdef\vtablex #1^^M{% \tabley\vritemindex#1 \endtabley \def\Evtable{\endgraf\afterenvbreak\endgroup}% \let\Etable=\relax}} \def\dontindex #1{} \def\fnitemindex #1{\doind {fn}{\code{#1}}}% \def\vritemindex #1{\doind {vr}{\code{#1}}}% {\obeyspaces % \gdef\tabley#1#2 #3 #4 #5 #6 #7\endtabley{\endgroup% \tablez{#1}{#2}{#3}{#4}{#5}{#6}}} \def\tablez #1#2#3#4#5#6{% \aboveenvbreak % \begingroup % \def\Edescription{\Etable}% Necessary kludge. \let\itemindex=#1% \ifnum 0#3>0 \advance \leftskip by #3\mil \fi % \ifnum 0#4>0 \tableindent=#4\mil \fi % \ifnum 0#5>0 \advance \rightskip by #5\mil \fi % \def\itemfont{#2}% \itemmax=\tableindent % \advance \itemmax by -\itemmargin % \advance \leftskip by \tableindent % \exdentamount=\tableindent \parindent = 0pt \parskip = \smallskipamount \ifdim \parskip=0pt \parskip=2pt \fi% \def\Etable{\endgraf\afterenvbreak\endgroup}% \let\item = \internalBitem % \let\itemx = \internalBitemx % \let\kitem = \internalBkitem % \let\kitemx = \internalBkitemx % \let\xitem = \internalBxitem % \let\xitemx = \internalBxitemx % } % This is the counter used by @enumerate, which is really @itemize \newcount \itemno \def\itemize{\parsearg\itemizezzz} \def\itemizezzz #1{% \begingroup % ended by the @end itemize \itemizey {#1}{\Eitemize} } \def\itemizey #1#2{% \aboveenvbreak % \itemmax=\itemindent % \advance \itemmax by -\itemmargin % \advance \leftskip by \itemindent % \exdentamount=\itemindent \parindent = 0pt % \parskip = \smallskipamount % \ifdim \parskip=0pt \parskip=2pt \fi% \def#2{\endgraf\afterenvbreak\endgroup}% \def\itemcontents{#1}% \let\item=\itemizeitem} % Set sfcode to normal for the chars that usually have another value. % These are `.?!:;,' \def\frenchspacing{\sfcode46=1000 \sfcode63=1000 \sfcode33=1000 \sfcode58=1000 \sfcode59=1000 \sfcode44=1000 } % \splitoff TOKENS\endmark defines \first to be the first token in % TOKENS, and \rest to be the remainder. % \def\splitoff#1#2\endmark{\def\first{#1}\def\rest{#2}}% % Allow an optional argument of an uppercase letter, lowercase letter, % or number, to specify the first label in the enumerated list. No % argument is the same as `1'. % \def\enumerate{\parsearg\enumeratezzz} \def\enumeratezzz #1{\enumeratey #1 \endenumeratey} \def\enumeratey #1 #2\endenumeratey{% \begingroup % ended by the @end enumerate % % If we were given no argument, pretend we were given `1'. \def\thearg{#1}% \ifx\thearg\empty \def\thearg{1}\fi % % Detect if the argument is a single token. If so, it might be a % letter. Otherwise, the only valid thing it can be is a number. % (We will always have one token, because of the test we just made. % This is a good thing, since \splitoff doesn't work given nothing at % all -- the first parameter is undelimited.) \expandafter\splitoff\thearg\endmark \ifx\rest\empty % Only one token in the argument. It could still be anything. % A ``lowercase letter'' is one whose \lccode is nonzero. % An ``uppercase letter'' is one whose \lccode is both nonzero, and % not equal to itself. % Otherwise, we assume it's a number. % % We need the \relax at the end of the \ifnum lines to stop TeX from % continuing to look for a . % \ifnum\lccode\expandafter`\thearg=0\relax \numericenumerate % a number (we hope) \else % It's a letter. \ifnum\lccode\expandafter`\thearg=\expandafter`\thearg\relax \lowercaseenumerate % lowercase letter \else \uppercaseenumerate % uppercase letter \fi \fi \else % Multiple tokens in the argument. We hope it's a number. \numericenumerate \fi } % An @enumerate whose labels are integers. The starting integer is % given in \thearg. % \def\numericenumerate{% \itemno = \thearg \startenumeration{\the\itemno}% } % The starting (lowercase) letter is in \thearg. \def\lowercaseenumerate{% \itemno = \expandafter`\thearg \startenumeration{% % Be sure we're not beyond the end of the alphabet. \ifnum\itemno=0 \errmessage{No more lowercase letters in @enumerate; get a bigger alphabet}% \fi \char\lccode\itemno }% } % The starting (uppercase) letter is in \thearg. \def\uppercaseenumerate{% \itemno = \expandafter`\thearg \startenumeration{% % Be sure we're not beyond the end of the alphabet. \ifnum\itemno=0 \errmessage{No more uppercase letters in @enumerate; get a bigger alphabet} \fi \char\uccode\itemno }% } % Call itemizey, adding a period to the first argument and supplying the % common last two arguments. Also subtract one from the initial value in % \itemno, since @item increments \itemno. % \def\startenumeration#1{% \advance\itemno by -1 \itemizey{#1.}\Eenumerate\flushcr } % @alphaenumerate and @capsenumerate are abbreviations for giving an arg % to @enumerate. % \def\alphaenumerate{\enumerate{a}} \def\capsenumerate{\enumerate{A}} \def\Ealphaenumerate{\Eenumerate} \def\Ecapsenumerate{\Eenumerate} % Definition of @item while inside @itemize. \def\itemizeitem{% \advance\itemno by 1 {\let\par=\endgraf \smallbreak}% \ifhmode \errmessage{In hmode at itemizeitem}\fi {\parskip=0in \hskip 0pt \hbox to 0pt{\hss \itemcontents\hskip \itemmargin}% \vadjust{\penalty 1200}}% \flushcr} % @multitable macros % Amy Hendrickson, 8/18/94, 3/6/96 % % @multitable ... @end multitable will make as many columns as desired. % Contents of each column will wrap at width given in preamble. Width % can be specified either with sample text given in a template line, % or in percent of \hsize, the current width of text on page. % Table can continue over pages but will only break between lines. % To make preamble: % % Either define widths of columns in terms of percent of \hsize: % @multitable @columnfractions .25 .3 .45 % @item ... % % Numbers following @columnfractions are the percent of the total % current hsize to be used for each column. You may use as many % columns as desired. % Or use a template: % @multitable {Column 1 template} {Column 2 template} {Column 3 template} % @item ... % using the widest term desired in each column. % % For those who want to use more than one line's worth of words in % the preamble, break the line within one argument and it % will parse correctly, i.e., % % @multitable {Column 1 template} {Column 2 template} {Column 3 % template} % Not: % @multitable {Column 1 template} {Column 2 template} % {Column 3 template} % Each new table line starts with @item, each subsequent new column % starts with @tab. Empty columns may be produced by supplying @tab's % with nothing between them for as many times as empty columns are needed, % ie, @tab@tab@tab will produce two empty columns. % @item, @tab, @multitable or @end multitable do not need to be on their % own lines, but it will not hurt if they are. % Sample multitable: % @multitable {Column 1 template} {Column 2 template} {Column 3 template} % @item first col stuff @tab second col stuff @tab third col % @item % first col stuff % @tab % second col stuff % @tab % third col % @item first col stuff @tab second col stuff % @tab Many paragraphs of text may be used in any column. % % They will wrap at the width determined by the template. % @item@tab@tab This will be in third column. % @end multitable % Default dimensions may be reset by user. % @multitableparskip is vertical space between paragraphs in table. % @multitableparindent is paragraph indent in table. % @multitablecolmargin is horizontal space to be left between columns. % @multitablelinespace is space to leave between table items, baseline % to baseline. % 0pt means it depends on current normal line spacing. % \newskip\multitableparskip \newskip\multitableparindent \newdimen\multitablecolspace \newskip\multitablelinespace \multitableparskip=0pt \multitableparindent=6pt \multitablecolspace=12pt \multitablelinespace=0pt % Macros used to set up halign preamble: % \let\endsetuptable\relax \def\xendsetuptable{\endsetuptable} \let\columnfractions\relax \def\xcolumnfractions{\columnfractions} \newif\ifsetpercent % #1 is the part of the @columnfraction before the decimal point, which % is presumably either 0 or the empty string (but we don't check, we % just throw it away). #2 is the decimal part, which we use as the % percent of \hsize for this column. \def\pickupwholefraction#1.#2 {% \global\advance\colcount by 1 \expandafter\xdef\csname col\the\colcount\endcsname{.#2\hsize}% \setuptable } \newcount\colcount \def\setuptable#1{% \def\firstarg{#1}% \ifx\firstarg\xendsetuptable \let\go = \relax \else \ifx\firstarg\xcolumnfractions \global\setpercenttrue \else \ifsetpercent \let\go\pickupwholefraction \else \global\advance\colcount by 1 \setbox0=\hbox{#1\unskip }% Add a normal word space as a separator; % typically that is always in the input, anyway. \expandafter\xdef\csname col\the\colcount\endcsname{\the\wd0}% \fi \fi \ifx\go\pickupwholefraction % Put the argument back for the \pickupwholefraction call, so % we'll always have a period there to be parsed. \def\go{\pickupwholefraction#1}% \else \let\go = \setuptable \fi% \fi \go } % This used to have \hskip1sp. But then the space in a template line is % not enough. That is bad. So let's go back to just & until we % encounter the problem it was intended to solve again. % --karl, nathan@acm.org, 20apr99. \def\tab{&} % @multitable ... @end multitable definitions: % \def\multitable{\parsearg\dotable} \def\dotable#1{\bgroup \vskip\parskip \let\item\crcr \tolerance=9500 \hbadness=9500 \setmultitablespacing \parskip=\multitableparskip \parindent=\multitableparindent \overfullrule=0pt \global\colcount=0 \def\Emultitable{\global\setpercentfalse\cr\egroup\egroup}% % % To parse everything between @multitable and @item: \setuptable#1 \endsetuptable % % \everycr will reset column counter, \colcount, at the end of % each line. Every column entry will cause \colcount to advance by one. % The table preamble % looks at the current \colcount to find the correct column width. \everycr{\noalign{% % % \filbreak%% keeps underfull box messages off when table breaks over pages. % Maybe so, but it also creates really weird page breaks when the table % breaks over pages. Wouldn't \vfil be better? Wait until the problem % manifests itself, so it can be fixed for real --karl. \global\colcount=0\relax}}% % % This preamble sets up a generic column definition, which will % be used as many times as user calls for columns. % \vtop will set a single line and will also let text wrap and % continue for many paragraphs if desired. \halign\bgroup&\global\advance\colcount by 1\relax \multistrut\vtop{\hsize=\expandafter\csname col\the\colcount\endcsname % % In order to keep entries from bumping into each other % we will add a \leftskip of \multitablecolspace to all columns after % the first one. % % If a template has been used, we will add \multitablecolspace % to the width of each template entry. % % If the user has set preamble in terms of percent of \hsize we will % use that dimension as the width of the column, and the \leftskip % will keep entries from bumping into each other. Table will start at % left margin and final column will justify at right margin. % % Make sure we don't inherit \rightskip from the outer environment. \rightskip=0pt \ifnum\colcount=1 % The first column will be indented with the surrounding text. \advance\hsize by\leftskip \else \ifsetpercent \else % If user has not set preamble in terms of percent of \hsize % we will advance \hsize by \multitablecolspace. \advance\hsize by \multitablecolspace \fi % In either case we will make \leftskip=\multitablecolspace: \leftskip=\multitablecolspace \fi % Ignoring space at the beginning and end avoids an occasional spurious % blank line, when TeX decides to break the line at the space before the % box from the multistrut, so the strut ends up on a line by itself. % For example: % @multitable @columnfractions .11 .89 % @item @code{#} % @tab Legal holiday which is valid in major parts of the whole country. % Is automatically provided with highlighting sequences respectively marking % characters. \noindent\ignorespaces##\unskip\multistrut}\cr } \def\setmultitablespacing{% test to see if user has set \multitablelinespace. % If so, do nothing. If not, give it an appropriate dimension based on % current baselineskip. \ifdim\multitablelinespace=0pt \setbox0=\vbox{X}\global\multitablelinespace=\the\baselineskip \global\advance\multitablelinespace by-\ht0 %% strut to put in table in case some entry doesn't have descenders, %% to keep lines equally spaced \let\multistrut = \strut \else %% FIXME: what is \box0 supposed to be? \gdef\multistrut{\vrule height\multitablelinespace depth\dp0 width0pt\relax} \fi %% Test to see if parskip is larger than space between lines of %% table. If not, do nothing. %% If so, set to same dimension as multitablelinespace. \ifdim\multitableparskip>\multitablelinespace \global\multitableparskip=\multitablelinespace \global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller %% than skip between lines in the table. \fi% \ifdim\multitableparskip=0pt \global\multitableparskip=\multitablelinespace \global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller %% than skip between lines in the table. \fi} \message{conditionals,} % Prevent errors for section commands. % Used in @ignore and in failing conditionals. \def\ignoresections{% \let\chapter=\relax \let\unnumbered=\relax \let\top=\relax \let\unnumberedsec=\relax \let\unnumberedsection=\relax \let\unnumberedsubsec=\relax \let\unnumberedsubsection=\relax \let\unnumberedsubsubsec=\relax \let\unnumberedsubsubsection=\relax \let\section=\relax \let\subsec=\relax \let\subsubsec=\relax \let\subsection=\relax \let\subsubsection=\relax \let\appendix=\relax \let\appendixsec=\relax \let\appendixsection=\relax \let\appendixsubsec=\relax \let\appendixsubsection=\relax \let\appendixsubsubsec=\relax \let\appendixsubsubsection=\relax \let\contents=\relax \let\smallbook=\relax \let\titlepage=\relax } % Used in nested conditionals, where we have to parse the Texinfo source % and so want to turn off most commands, in case they are used % incorrectly. % \def\ignoremorecommands{% \let\defcodeindex = \relax \let\defcv = \relax \let\deffn = \relax \let\deffnx = \relax \let\defindex = \relax \let\defivar = \relax \let\defmac = \relax \let\defmethod = \relax \let\defop = \relax \let\defopt = \relax \let\defspec = \relax \let\deftp = \relax \let\deftypefn = \relax \let\deftypefun = \relax \let\deftypeivar = \relax \let\deftypeop = \relax \let\deftypevar = \relax \let\deftypevr = \relax \let\defun = \relax \let\defvar = \relax \let\defvr = \relax \let\ref = \relax \let\xref = \relax \let\printindex = \relax \let\pxref = \relax \let\settitle = \relax \let\setchapternewpage = \relax \let\setchapterstyle = \relax \let\everyheading = \relax \let\evenheading = \relax \let\oddheading = \relax \let\everyfooting = \relax \let\evenfooting = \relax \let\oddfooting = \relax \let\headings = \relax \let\include = \relax \let\lowersections = \relax \let\down = \relax \let\raisesections = \relax \let\up = \relax \let\set = \relax \let\clear = \relax \let\item = \relax } % Ignore @ignore ... @end ignore. % \def\ignore{\doignore{ignore}} % Ignore @ifinfo, @ifhtml, @ifnottex, @html, @menu, and @direntry text. % \def\ifinfo{\doignore{ifinfo}} \def\ifhtml{\doignore{ifhtml}} \def\ifnottex{\doignore{ifnottex}} \def\html{\doignore{html}} \def\menu{\doignore{menu}} \def\direntry{\doignore{direntry}} % @dircategory CATEGORY -- specify a category of the dir file % which this file should belong to. Ignore this in TeX. \let\dircategory = \comment % Ignore text until a line `@end #1'. % \def\doignore#1{\begingroup % Don't complain about control sequences we have declared \outer. \ignoresections % % Define a command to swallow text until we reach `@end #1'. % This @ is a catcode 12 token (that is the normal catcode of @ in % this texinfo.tex file). We change the catcode of @ below to match. \long\def\doignoretext##1@end #1{\enddoignore}% % % Make sure that spaces turn into tokens that match what \doignoretext wants. \catcode32 = 10 % % Ignore braces, too, so mismatched braces don't cause trouble. \catcode`\{ = 9 \catcode`\} = 9 % % We must not have @c interpreted as a control sequence. \catcode`\@ = 12 % % Make the letter c a comment character so that the rest of the line % will be ignored. This way, the document can have (for example) % @c @end ifinfo % and the @end ifinfo will be properly ignored. % (We've just changed @ to catcode 12.) \catcode`\c = 14 % % And now expand that command. \doignoretext } % What we do to finish off ignored text. % \def\enddoignore{\endgroup\ignorespaces}% \newif\ifwarnedobs\warnedobsfalse \def\obstexwarn{% \ifwarnedobs\relax\else % We need to warn folks that they may have trouble with TeX 3.0. % This uses \immediate\write16 rather than \message to get newlines. \immediate\write16{} \immediate\write16{WARNING: for users of Unix TeX 3.0!} \immediate\write16{This manual trips a bug in TeX version 3.0 (tex hangs).} \immediate\write16{If you are running another version of TeX, relax.} \immediate\write16{If you are running Unix TeX 3.0, kill this TeX process.} \immediate\write16{ Then upgrade your TeX installation if you can.} \immediate\write16{ (See ftp://ftp.gnu.org/pub/gnu/TeX.README.)} \immediate\write16{If you are stuck with version 3.0, run the} \immediate\write16{ script ``tex3patch'' from the Texinfo distribution} \immediate\write16{ to use a workaround.} \immediate\write16{} \global\warnedobstrue \fi } % **In TeX 3.0, setting text in \nullfont hangs tex. For a % workaround (which requires the file ``dummy.tfm'' to be installed), % uncomment the following line: %%%%%\font\nullfont=dummy\let\obstexwarn=\relax % Ignore text, except that we keep track of conditional commands for % purposes of nesting, up to an `@end #1' command. % \def\nestedignore#1{% \obstexwarn % We must actually expand the ignored text to look for the @end % command, so that nested ignore constructs work. Thus, we put the % text into a \vbox and then do nothing with the result. To minimize % the change of memory overflow, we follow the approach outlined on % page 401 of the TeXbook: make the current font be a dummy font. % \setbox0 = \vbox\bgroup % Don't complain about control sequences we have declared \outer. \ignoresections % % Define `@end #1' to end the box, which will in turn undefine the % @end command again. \expandafter\def\csname E#1\endcsname{\egroup\ignorespaces}% % % We are going to be parsing Texinfo commands. Most cause no % trouble when they are used incorrectly, but some commands do % complicated argument parsing or otherwise get confused, so we % undefine them. % % We can't do anything about stray @-signs, unfortunately; % they'll produce `undefined control sequence' errors. \ignoremorecommands % % Set the current font to be \nullfont, a TeX primitive, and define % all the font commands to also use \nullfont. We don't use % dummy.tfm, as suggested in the TeXbook, because not all sites % might have that installed. Therefore, math mode will still % produce output, but that should be an extremely small amount of % stuff compared to the main input. % \nullfont \let\tenrm=\nullfont \let\tenit=\nullfont \let\tensl=\nullfont \let\tenbf=\nullfont \let\tentt=\nullfont \let\smallcaps=\nullfont \let\tensf=\nullfont % Similarly for index fonts (mostly for their use in smallexample). \let\smallrm=\nullfont \let\smallit=\nullfont \let\smallsl=\nullfont \let\smallbf=\nullfont \let\smalltt=\nullfont \let\smallsc=\nullfont \let\smallsf=\nullfont % % Don't complain when characters are missing from the fonts. \tracinglostchars = 0 % % Don't bother to do space factor calculations. \frenchspacing % % Don't report underfull hboxes. \hbadness = 10000 % % Do minimal line-breaking. \pretolerance = 10000 % % Do not execute instructions in @tex \def\tex{\doignore{tex}}% % Do not execute macro definitions. % `c' is a comment character, so the word `macro' will get cut off. \def\macro{\doignore{ma}}% } % @set VAR sets the variable VAR to an empty value. % @set VAR REST-OF-LINE sets VAR to the value REST-OF-LINE. % % Since we want to separate VAR from REST-OF-LINE (which might be % empty), we can't just use \parsearg; we have to insert a space of our % own to delimit the rest of the line, and then take it out again if we % didn't need it. Make sure the catcode of space is correct to avoid % losing inside @example, for instance. % \def\set{\begingroup\catcode` =10 \catcode`\-=12 \catcode`\_=12 % Allow - and _ in VAR. \parsearg\setxxx} \def\setxxx#1{\setyyy#1 \endsetyyy} \def\setyyy#1 #2\endsetyyy{% \def\temp{#2}% \ifx\temp\empty \global\expandafter\let\csname SET#1\endcsname = \empty \else \setzzz{#1}#2\endsetzzz % Remove the trailing space \setxxx inserted. \fi \endgroup } % Can't use \xdef to pre-expand #2 and save some time, since \temp or % \next or other control sequences that we've defined might get us into % an infinite loop. Consider `@set foo @cite{bar}'. \def\setzzz#1#2 \endsetzzz{\expandafter\gdef\csname SET#1\endcsname{#2}} % @clear VAR clears (i.e., unsets) the variable VAR. % \def\clear{\parsearg\clearxxx} \def\clearxxx#1{\global\expandafter\let\csname SET#1\endcsname=\relax} % @value{foo} gets the text saved in variable foo. { \catcode`\_ = \active % % We might end up with active _ or - characters in the argument if % we're called from @code, as @code{@value{foo-bar_}}. So \let any % such active characters to their normal equivalents. \gdef\value{\begingroup \catcode`\-=12 \catcode`\_=12 \indexbreaks \let_\normalunderscore \valuexxx} } \def\valuexxx#1{\expandablevalue{#1}\endgroup} % We have this subroutine so that we can handle at least some @value's % properly in indexes (we \let\value to this in \indexdummies). Ones % whose names contain - or _ still won't work, but we can't do anything % about that. The command has to be fully expandable, since the result % winds up in the index file. This means that if the variable's value % contains other Texinfo commands, it's almost certain it will fail % (although perhaps we could fix that with sufficient work to do a % one-level expansion on the result, instead of complete). % \def\expandablevalue#1{% \expandafter\ifx\csname SET#1\endcsname\relax {[No value for ``#1'']}% \else \csname SET#1\endcsname \fi } % @ifset VAR ... @end ifset reads the `...' iff VAR has been defined % with @set. % \def\ifset{\parsearg\ifsetxxx} \def\ifsetxxx #1{% \expandafter\ifx\csname SET#1\endcsname\relax \expandafter\ifsetfail \else \expandafter\ifsetsucceed \fi } \def\ifsetsucceed{\conditionalsucceed{ifset}} \def\ifsetfail{\nestedignore{ifset}} \defineunmatchedend{ifset} % @ifclear VAR ... @end ifclear reads the `...' iff VAR has never been % defined with @set, or has been undefined with @clear. % \def\ifclear{\parsearg\ifclearxxx} \def\ifclearxxx #1{% \expandafter\ifx\csname SET#1\endcsname\relax \expandafter\ifclearsucceed \else \expandafter\ifclearfail \fi } \def\ifclearsucceed{\conditionalsucceed{ifclear}} \def\ifclearfail{\nestedignore{ifclear}} \defineunmatchedend{ifclear} % @iftex, @ifnothtml, @ifnotinfo always succeed; we read the text % following, through the first @end iftex (etc.). Make `@end iftex' % (etc.) valid only after an @iftex. % \def\iftex{\conditionalsucceed{iftex}} \def\ifnothtml{\conditionalsucceed{ifnothtml}} \def\ifnotinfo{\conditionalsucceed{ifnotinfo}} \defineunmatchedend{iftex} \defineunmatchedend{ifnothtml} \defineunmatchedend{ifnotinfo} % We can't just want to start a group at @iftex (for example) and end it % at @end iftex, since then @set commands inside the conditional have no % effect (they'd get reverted at the end of the group). So we must % define \Eiftex to redefine itself to be its previous value. (We can't % just define it to fail again with an ``unmatched end'' error, since % the @ifset might be nested.) % \def\conditionalsucceed#1{% \edef\temp{% % Remember the current value of \E#1. \let\nece{prevE#1} = \nece{E#1}% % % At the `@end #1', redefine \E#1 to be its previous value. \def\nece{E#1}{\let\nece{E#1} = \nece{prevE#1}}% }% \temp } % We need to expand lots of \csname's, but we don't want to expand the % control sequences after we've constructed them. % \def\nece#1{\expandafter\noexpand\csname#1\endcsname} % @defininfoenclose. \let\definfoenclose=\comment \message{indexing,} % Index generation facilities % Define \newwrite to be identical to plain tex's \newwrite % except not \outer, so it can be used within \newindex. {\catcode`\@=11 \gdef\newwrite{\alloc@7\write\chardef\sixt@@n}} % \newindex {foo} defines an index named foo. % It automatically defines \fooindex such that % \fooindex ...rest of line... puts an entry in the index foo. % It also defines \fooindfile to be the number of the output channel for % the file that accumulates this index. The file's extension is foo. % The name of an index should be no more than 2 characters long % for the sake of vms. % \def\newindex#1{% \iflinks \expandafter\newwrite \csname#1indfile\endcsname \openout \csname#1indfile\endcsname \jobname.#1 % Open the file \fi \expandafter\xdef\csname#1index\endcsname{% % Define @#1index \noexpand\doindex{#1}} } % @defindex foo == \newindex{foo} % \def\defindex{\parsearg\newindex} % Define @defcodeindex, like @defindex except put all entries in @code. % \def\defcodeindex{\parsearg\newcodeindex} % \def\newcodeindex#1{% \iflinks \expandafter\newwrite \csname#1indfile\endcsname \openout \csname#1indfile\endcsname \jobname.#1 \fi \expandafter\xdef\csname#1index\endcsname{% \noexpand\docodeindex{#1}}% } % @synindex foo bar makes index foo feed into index bar. % Do this instead of @defindex foo if you don't want it as a separate index. % % @syncodeindex foo bar similar, but put all entries made for index foo % inside @code. % \def\synindex#1 #2 {\dosynindex\doindex{#1}{#2}} \def\syncodeindex#1 #2 {\dosynindex\docodeindex{#1}{#2}} % #1 is \doindex or \docodeindex, #2 the index getting redefined (foo), % #3 the target index (bar). \def\dosynindex#1#2#3{% % Only do \closeout if we haven't already done it, else we'll end up % closing the target index. \expandafter \ifx\csname donesynindex#2\endcsname \undefined % The \closeout helps reduce unnecessary open files; the limit on the % Acorn RISC OS is a mere 16 files. \expandafter\closeout\csname#2indfile\endcsname \expandafter\let\csname\donesynindex#2\endcsname = 1 \fi % redefine \fooindfile: \expandafter\let\expandafter\temp\expandafter=\csname#3indfile\endcsname \expandafter\let\csname#2indfile\endcsname=\temp % redefine \fooindex: \expandafter\xdef\csname#2index\endcsname{\noexpand#1{#3}}% } % Define \doindex, the driver for all \fooindex macros. % Argument #1 is generated by the calling \fooindex macro, % and it is "foo", the name of the index. % \doindex just uses \parsearg; it calls \doind for the actual work. % This is because \doind is more useful to call from other macros. % There is also \dosubind {index}{topic}{subtopic} % which makes an entry in a two-level index such as the operation index. \def\doindex#1{\edef\indexname{#1}\parsearg\singleindexer} \def\singleindexer #1{\doind{\indexname}{#1}} % like the previous two, but they put @code around the argument. \def\docodeindex#1{\edef\indexname{#1}\parsearg\singlecodeindexer} \def\singlecodeindexer #1{\doind{\indexname}{\code{#1}}} \def\indexdummies{% \def\ { }% % Take care of the plain tex accent commands. \def\"{\realbackslash "}% \def\`{\realbackslash `}% \def\'{\realbackslash '}% \def\^{\realbackslash ^}% \def\~{\realbackslash ~}% \def\={\realbackslash =}% \def\b{\realbackslash b}% \def\c{\realbackslash c}% \def\d{\realbackslash d}% \def\u{\realbackslash u}% \def\v{\realbackslash v}% \def\H{\realbackslash H}% % Take care of the plain tex special European modified letters. \def\oe{\realbackslash oe}% \def\ae{\realbackslash ae}% \def\aa{\realbackslash aa}% \def\OE{\realbackslash OE}% \def\AE{\realbackslash AE}% \def\AA{\realbackslash AA}% \def\o{\realbackslash o}% \def\O{\realbackslash O}% \def\l{\realbackslash l}% \def\L{\realbackslash L}% \def\ss{\realbackslash ss}% % Take care of texinfo commands likely to appear in an index entry. % (Must be a way to avoid doing expansion at all, and thus not have to % laboriously list every single command here.) \def\@{@}% will be @@ when we switch to @ as escape char. % Need these in case \tex is in effect and \{ is a \delimiter again. % But can't use \lbracecmd and \rbracecmd because texindex assumes % braces and backslashes are used only as delimiters. \let\{ = \mylbrace \let\} = \myrbrace \def\_{{\realbackslash _}}% \def\w{\realbackslash w }% \def\bf{\realbackslash bf }% %\def\rm{\realbackslash rm }% \def\sl{\realbackslash sl }% \def\sf{\realbackslash sf}% \def\tt{\realbackslash tt}% \def\gtr{\realbackslash gtr}% \def\less{\realbackslash less}% \def\hat{\realbackslash hat}% \def\TeX{\realbackslash TeX}% \def\dots{\realbackslash dots }% \def\result{\realbackslash result}% \def\equiv{\realbackslash equiv}% \def\expansion{\realbackslash expansion}% \def\print{\realbackslash print}% \def\error{\realbackslash error}% \def\point{\realbackslash point}% \def\copyright{\realbackslash copyright}% \def\tclose##1{\realbackslash tclose {##1}}% \def\code##1{\realbackslash code {##1}}% \def\uref##1{\realbackslash uref {##1}}% \def\url##1{\realbackslash url {##1}}% \def\env##1{\realbackslash env {##1}}% \def\command##1{\realbackslash command {##1}}% \def\option##1{\realbackslash option {##1}}% \def\dotless##1{\realbackslash dotless {##1}}% \def\samp##1{\realbackslash samp {##1}}% \def\,##1{\realbackslash ,{##1}}% \def\t##1{\realbackslash t {##1}}% \def\r##1{\realbackslash r {##1}}% \def\i##1{\realbackslash i {##1}}% \def\b##1{\realbackslash b {##1}}% \def\sc##1{\realbackslash sc {##1}}% \def\cite##1{\realbackslash cite {##1}}% \def\key##1{\realbackslash key {##1}}% \def\file##1{\realbackslash file {##1}}% \def\var##1{\realbackslash var {##1}}% \def\kbd##1{\realbackslash kbd {##1}}% \def\dfn##1{\realbackslash dfn {##1}}% \def\emph##1{\realbackslash emph {##1}}% \def\acronym##1{\realbackslash acronym {##1}}% % % Handle some cases of @value -- where the variable name does not % contain - or _, and the value does not contain any % (non-fully-expandable) commands. \let\value = \expandablevalue % \unsepspaces % Turn off macro expansion \turnoffmacros } % If an index command is used in an @example environment, any spaces % therein should become regular spaces in the raw index file, not the % expansion of \tie (\\leavevmode \penalty \@M \ ). {\obeyspaces \gdef\unsepspaces{\obeyspaces\let =\space}} % \indexnofonts no-ops all font-change commands. % This is used when outputting the strings to sort the index by. \def\indexdummyfont#1{#1} \def\indexdummytex{TeX} \def\indexdummydots{...} \def\indexnofonts{% % Just ignore accents. \let\,=\indexdummyfont \let\"=\indexdummyfont \let\`=\indexdummyfont \let\'=\indexdummyfont \let\^=\indexdummyfont \let\~=\indexdummyfont \let\==\indexdummyfont \let\b=\indexdummyfont \let\c=\indexdummyfont \let\d=\indexdummyfont \let\u=\indexdummyfont \let\v=\indexdummyfont \let\H=\indexdummyfont \let\dotless=\indexdummyfont % Take care of the plain tex special European modified letters. \def\oe{oe}% \def\ae{ae}% \def\aa{aa}% \def\OE{OE}% \def\AE{AE}% \def\AA{AA}% \def\o{o}% \def\O{O}% \def\l{l}% \def\L{L}% \def\ss{ss}% \let\w=\indexdummyfont \let\t=\indexdummyfont \let\r=\indexdummyfont \let\i=\indexdummyfont \let\b=\indexdummyfont \let\emph=\indexdummyfont \let\strong=\indexdummyfont \let\cite=\indexdummyfont \let\sc=\indexdummyfont %Don't no-op \tt, since it isn't a user-level command % and is used in the definitions of the active chars like <, >, |... %\let\tt=\indexdummyfont \let\tclose=\indexdummyfont \let\code=\indexdummyfont \let\url=\indexdummyfont \let\uref=\indexdummyfont \let\env=\indexdummyfont \let\acronym=\indexdummyfont \let\command=\indexdummyfont \let\option=\indexdummyfont \let\file=\indexdummyfont \let\samp=\indexdummyfont \let\kbd=\indexdummyfont \let\key=\indexdummyfont \let\var=\indexdummyfont \let\TeX=\indexdummytex \let\dots=\indexdummydots \def\@{@}% } % To define \realbackslash, we must make \ not be an escape. % We must first make another character (@) an escape % so we do not become unable to do a definition. {\catcode`\@=0 \catcode`\\=\other @gdef@realbackslash{\}} \let\indexbackslash=0 %overridden during \printindex. \let\SETmarginindex=\relax % put index entries in margin (undocumented)? % For \ifx comparisons. \def\emptymacro{\empty} % Most index entries go through here, but \dosubind is the general case. % \def\doind#1#2{\dosubind{#1}{#2}\empty} % Workhorse for all \fooindexes. % #1 is name of index, #2 is stuff to put there, #3 is subentry -- % \empty if called from \doind, as we usually are. The main exception % is with defuns, which call us directly. % \def\dosubind#1#2#3{% % Put the index entry in the margin if desired. \ifx\SETmarginindex\relax\else \insert\margin{\hbox{\vrule height8pt depth3pt width0pt #2}}% \fi {% \count255=\lastpenalty {% \indexdummies % Must do this here, since \bf, etc expand at this stage \escapechar=`\\ {% \let\folio = 0% We will expand all macros now EXCEPT \folio. \def\rawbackslashxx{\indexbackslash}% \indexbackslash isn't defined now % so it will be output as is; and it will print as backslash. % \def\thirdarg{#3}% % % If third arg is present, precede it with space in sort key. \ifx\thirdarg\emptymacro \let\subentry = \empty \else \def\subentry{ #3}% \fi % % First process the index entry with all font commands turned % off to get the string to sort by. {\indexnofonts \xdef\indexsorttmp{#2\subentry}}% % % Now the real index entry with the fonts. \toks0 = {#2}% % % If third (subentry) arg is present, add it to the index % string. And include a space. \ifx\thirdarg\emptymacro \else \toks0 = \expandafter{\the\toks0 \space #3}% \fi % % Set up the complete index entry, with both the sort key % and the original text, including any font commands. We write % three arguments to \entry to the .?? file, texindex reduces to % two when writing the .??s sorted result. \edef\temp{% \write\csname#1indfile\endcsname{% \realbackslash entry{\indexsorttmp}{\folio}{\the\toks0}}% }% % % If a skip is the last thing on the list now, preserve it % by backing up by \lastskip, doing the \write, then inserting % the skip again. Otherwise, the whatsit generated by the % \write will make \lastskip zero. The result is that sequences % like this: % @end defun % @tindex whatever % @defun ... % will have extra space inserted, because the \medbreak in the % start of the @defun won't see the skip inserted by the @end of % the previous defun. % % But don't do any of this if we're not in vertical mode. We % don't want to do a \vskip and prematurely end a paragraph. % % Avoid page breaks due to these extra skips, too. % \iflinks \ifvmode \skip0 = \lastskip \ifdim\lastskip = 0pt \else \nobreak\vskip-\lastskip \fi \fi % \temp % do the write % % \ifvmode \ifdim\skip0 = 0pt \else \nobreak\vskip\skip0 \fi \fi \fi }% }% \penalty\count255 }% } % The index entry written in the file actually looks like % \entry {sortstring}{page}{topic} % or % \entry {sortstring}{page}{topic}{subtopic} % The texindex program reads in these files and writes files % containing these kinds of lines: % \initial {c} % before the first topic whose initial is c % \entry {topic}{pagelist} % for a topic that is used without subtopics % \primary {topic} % for the beginning of a topic that is used with subtopics % \secondary {subtopic}{pagelist} % for each subtopic. % Define the user-accessible indexing commands % @findex, @vindex, @kindex, @cindex. \def\findex {\fnindex} \def\kindex {\kyindex} \def\cindex {\cpindex} \def\vindex {\vrindex} \def\tindex {\tpindex} \def\pindex {\pgindex} \def\cindexsub {\begingroup\obeylines\cindexsub} {\obeylines % \gdef\cindexsub "#1" #2^^M{\endgroup % \dosubind{cp}{#2}{#1}}} % Define the macros used in formatting output of the sorted index material. % @printindex causes a particular index (the ??s file) to get printed. % It does not print any chapter heading (usually an @unnumbered). % \def\printindex{\parsearg\doprintindex} \def\doprintindex#1{\begingroup \dobreak \chapheadingskip{10000}% % \smallfonts \rm \tolerance = 9500 \indexbreaks % % See if the index file exists and is nonempty. % Change catcode of @ here so that if the index file contains % \initial {@} % as its first line, TeX doesn't complain about mismatched braces % (because it thinks @} is a control sequence). \catcode`\@ = 11 \openin 1 \jobname.#1s \ifeof 1 % \enddoublecolumns gets confused if there is no text in the index, % and it loses the chapter title and the aux file entries for the % index. The easiest way to prevent this problem is to make sure % there is some text. \putwordIndexNonexistent \else % % If the index file exists but is empty, then \openin leaves \ifeof % false. We have to make TeX try to read something from the file, so % it can discover if there is anything in it. \read 1 to \temp \ifeof 1 \putwordIndexIsEmpty \else % Index files are almost Texinfo source, but we use \ as the escape % character. It would be better to use @, but that's too big a change % to make right now. \def\indexbackslash{\rawbackslashxx}% \catcode`\\ = 0 \escapechar = `\\ \begindoublecolumns \input \jobname.#1s \enddoublecolumns \fi \fi \closein 1 \endgroup} % These macros are used by the sorted index file itself. % Change them to control the appearance of the index. \def\initial#1{{% % Some minor font changes for the special characters. \let\tentt=\sectt \let\tt=\sectt \let\sf=\sectt % % Remove any glue we may have, we'll be inserting our own. \removelastskip % % We like breaks before the index initials, so insert a bonus. \penalty -300 % % Typeset the initial. Making this add up to a whole number of % baselineskips increases the chance of the dots lining up from column % to column. It still won't often be perfect, because of the stretch % we need before each entry, but it's better. % % No shrink because it confuses \balancecolumns. \vskip 1.67\baselineskip plus .5\baselineskip \leftline{\secbf #1}% \vskip .33\baselineskip plus .1\baselineskip % % Do our best not to break after the initial. \nobreak }} % This typesets a paragraph consisting of #1, dot leaders, and then #2 % flush to the right margin. It is used for index and table of contents % entries. The paragraph is indented by \leftskip. % \def\entry#1#2{\begingroup % % Start a new paragraph if necessary, so our assignments below can't % affect previous text. \par % % Do not fill out the last line with white space. \parfillskip = 0in % % No extra space above this paragraph. \parskip = 0in % % Do not prefer a separate line ending with a hyphen to fewer lines. \finalhyphendemerits = 0 % % \hangindent is only relevant when the entry text and page number % don't both fit on one line. In that case, bob suggests starting the % dots pretty far over on the line. Unfortunately, a large % indentation looks wrong when the entry text itself is broken across % lines. So we use a small indentation and put up with long leaders. % % \hangafter is reset to 1 (which is the value we want) at the start % of each paragraph, so we need not do anything with that. \hangindent = 2em % % When the entry text needs to be broken, just fill out the first line % with blank space. \rightskip = 0pt plus1fil % % A bit of stretch before each entry for the benefit of balancing columns. \vskip 0pt plus1pt % % Start a ``paragraph'' for the index entry so the line breaking % parameters we've set above will have an effect. \noindent % % Insert the text of the index entry. TeX will do line-breaking on it. #1% % The following is kludged to not output a line of dots in the index if % there are no page numbers. The next person who breaks this will be % cursed by a Unix daemon. \def\tempa{{\rm }}% \def\tempb{#2}% \edef\tempc{\tempa}% \edef\tempd{\tempb}% \ifx\tempc\tempd\ \else% % % If we must, put the page number on a line of its own, and fill out % this line with blank space. (The \hfil is overwhelmed with the % fill leaders glue in \indexdotfill if the page number does fit.) \hfil\penalty50 \null\nobreak\indexdotfill % Have leaders before the page number. % % The `\ ' here is removed by the implicit \unskip that TeX does as % part of (the primitive) \par. Without it, a spurious underfull % \hbox ensues. \ifpdf \pdfgettoks#2.\ \the\toksA % The page number ends the paragraph. \else \ #2% The page number ends the paragraph. \fi \fi% \par \endgroup} % Like \dotfill except takes at least 1 em. \def\indexdotfill{\cleaders \hbox{$\mathsurround=0pt \mkern1.5mu ${\it .}$ \mkern1.5mu$}\hskip 1em plus 1fill} \def\primary #1{\line{#1\hfil}} \newskip\secondaryindent \secondaryindent=0.5cm \def\secondary #1#2{ {\parfillskip=0in \parskip=0in \hangindent =1in \hangafter=1 \noindent\hskip\secondaryindent\hbox{#1}\indexdotfill #2\par }} % Define two-column mode, which we use to typeset indexes. % Adapted from the TeXbook, page 416, which is to say, % the manmac.tex format used to print the TeXbook itself. \catcode`\@=11 \newbox\partialpage \newdimen\doublecolumnhsize \def\begindoublecolumns{\begingroup % ended by \enddoublecolumns % Grab any single-column material above us. \output = {% % % Here is a possibility not foreseen in manmac: if we accumulate a % whole lot of material, we might end up calling this \output % routine twice in a row (see the doublecol-lose test, which is % essentially a couple of indexes with @setchapternewpage off). In % that case we just ship out what is in \partialpage with the normal % output routine. Generally, \partialpage will be empty when this % runs and this will be a no-op. See the indexspread.tex test case. \ifvoid\partialpage \else \onepageout{\pagecontents\partialpage}% \fi % \global\setbox\partialpage = \vbox{% % Unvbox the main output page. \unvbox\PAGE \kern-\topskip \kern\baselineskip }% }% \eject % run that output routine to set \partialpage % % Use the double-column output routine for subsequent pages. \output = {\doublecolumnout}% % % Change the page size parameters. We could do this once outside this % routine, in each of @smallbook, @afourpaper, and the default 8.5x11 % format, but then we repeat the same computation. Repeating a couple % of assignments once per index is clearly meaningless for the % execution time, so we may as well do it in one place. % % First we halve the line length, less a little for the gutter between % the columns. We compute the gutter based on the line length, so it % changes automatically with the paper format. The magic constant % below is chosen so that the gutter has the same value (well, +-<1pt) % as it did when we hard-coded it. % % We put the result in a separate register, \doublecolumhsize, so we % can restore it in \pagesofar, after \hsize itself has (potentially) % been clobbered. % \doublecolumnhsize = \hsize \advance\doublecolumnhsize by -.04154\hsize \divide\doublecolumnhsize by 2 \hsize = \doublecolumnhsize % % Double the \vsize as well. (We don't need a separate register here, % since nobody clobbers \vsize.) \vsize = 2\vsize } % The double-column output routine for all double-column pages except % the last. % \def\doublecolumnout{% \splittopskip=\topskip \splitmaxdepth=\maxdepth % Get the available space for the double columns -- the normal % (undoubled) page height minus any material left over from the % previous page. \dimen@ = \vsize \divide\dimen@ by 2 \advance\dimen@ by -\ht\partialpage % % box0 will be the left-hand column, box2 the right. \setbox0=\vsplit255 to\dimen@ \setbox2=\vsplit255 to\dimen@ \onepageout\pagesofar \unvbox255 \penalty\outputpenalty } % % Re-output the contents of the output page -- any previous material, % followed by the two boxes we just split, in box0 and box2. \def\pagesofar{% \unvbox\partialpage % \hsize = \doublecolumnhsize \wd0=\hsize \wd2=\hsize \hbox to\pagewidth{\box0\hfil\box2}% } % % All done with double columns. \def\enddoublecolumns{% \output = {% % Split the last of the double-column material. Leave it on the % current page, no automatic page break. \balancecolumns % % If we end up splitting too much material for the current page, % though, there will be another page break right after this \output % invocation ends. Having called \balancecolumns once, we do not % want to call it again. Therefore, reset \output to its normal % definition right away. (We hope \balancecolumns will never be % called on to balance too much material, but if it is, this makes % the output somewhat more palatable.) \global\output = {\onepageout{\pagecontents\PAGE}}% }% \eject \endgroup % started in \begindoublecolumns % % \pagegoal was set to the doubled \vsize above, since we restarted % the current page. We're now back to normal single-column % typesetting, so reset \pagegoal to the normal \vsize (after the % \endgroup where \vsize got restored). \pagegoal = \vsize } % % Called at the end of the double column material. \def\balancecolumns{% \setbox0 = \vbox{\unvbox255}% like \box255 but more efficient, see p.120. \dimen@ = \ht0 \advance\dimen@ by \topskip \advance\dimen@ by-\baselineskip \divide\dimen@ by 2 % target to split to %debug\message{final 2-column material height=\the\ht0, target=\the\dimen@.}% \splittopskip = \topskip % Loop until we get a decent breakpoint. {% \vbadness = 10000 \loop \global\setbox3 = \copy0 \global\setbox1 = \vsplit3 to \dimen@ \ifdim\ht3>\dimen@ \global\advance\dimen@ by 1pt \repeat }% %debug\message{split to \the\dimen@, column heights: \the\ht1, \the\ht3.}% \setbox0=\vbox to\dimen@{\unvbox1}% \setbox2=\vbox to\dimen@{\unvbox3}% % \pagesofar } \catcode`\@ = \other \message{sectioning,} % Chapters, sections, etc. \newcount\chapno \newcount\secno \secno=0 \newcount\subsecno \subsecno=0 \newcount\subsubsecno \subsubsecno=0 % This counter is funny since it counts through charcodes of letters A, B, ... \newcount\appendixno \appendixno = `\@ % \def\appendixletter{\char\the\appendixno} % We do the following for the sake of pdftex, which needs the actual % letter in the expansion, not just typeset. \def\appendixletter{% \ifnum\appendixno=`A A% \else\ifnum\appendixno=`B B% \else\ifnum\appendixno=`C C% \else\ifnum\appendixno=`D D% \else\ifnum\appendixno=`E E% \else\ifnum\appendixno=`F F% \else\ifnum\appendixno=`G G% \else\ifnum\appendixno=`H H% \else\ifnum\appendixno=`I I% \else\ifnum\appendixno=`J J% \else\ifnum\appendixno=`K K% \else\ifnum\appendixno=`L L% \else\ifnum\appendixno=`M M% \else\ifnum\appendixno=`N N% \else\ifnum\appendixno=`O O% \else\ifnum\appendixno=`P P% \else\ifnum\appendixno=`Q Q% \else\ifnum\appendixno=`R R% \else\ifnum\appendixno=`S S% \else\ifnum\appendixno=`T T% \else\ifnum\appendixno=`U U% \else\ifnum\appendixno=`V V% \else\ifnum\appendixno=`W W% \else\ifnum\appendixno=`X X% \else\ifnum\appendixno=`Y Y% \else\ifnum\appendixno=`Z Z% % The \the is necessary, despite appearances, because \appendixletter is % expanded while writing the .toc file. \char\appendixno is not % expandable, thus it is written literally, thus all appendixes come out % with the same letter (or @) in the toc without it. \else\char\the\appendixno \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi} % Each @chapter defines this as the name of the chapter. % page headings and footings can use it. @section does likewise. \def\thischapter{} \def\thissection{} \newcount\absseclevel % used to calculate proper heading level \newcount\secbase\secbase=0 % @raise/lowersections modify this count % @raisesections: treat @section as chapter, @subsection as section, etc. \def\raisesections{\global\advance\secbase by -1} \let\up=\raisesections % original BFox name % @lowersections: treat @chapter as section, @section as subsection, etc. \def\lowersections{\global\advance\secbase by 1} \let\down=\lowersections % original BFox name % Choose a numbered-heading macro % #1 is heading level if unmodified by @raisesections or @lowersections % #2 is text for heading \def\numhead#1#2{\absseclevel=\secbase\advance\absseclevel by #1 \ifcase\absseclevel \chapterzzz{#2} \or \seczzz{#2} \or \numberedsubseczzz{#2} \or \numberedsubsubseczzz{#2} \else \ifnum \absseclevel<0 \chapterzzz{#2} \else \numberedsubsubseczzz{#2} \fi \fi } % like \numhead, but chooses appendix heading levels \def\apphead#1#2{\absseclevel=\secbase\advance\absseclevel by #1 \ifcase\absseclevel \appendixzzz{#2} \or \appendixsectionzzz{#2} \or \appendixsubseczzz{#2} \or \appendixsubsubseczzz{#2} \else \ifnum \absseclevel<0 \appendixzzz{#2} \else \appendixsubsubseczzz{#2} \fi \fi } % like \numhead, but chooses numberless heading levels \def\unnmhead#1#2{\absseclevel=\secbase\advance\absseclevel by #1 \ifcase\absseclevel \unnumberedzzz{#2} \or \unnumberedseczzz{#2} \or \unnumberedsubseczzz{#2} \or \unnumberedsubsubseczzz{#2} \else \ifnum \absseclevel<0 \unnumberedzzz{#2} \else \unnumberedsubsubseczzz{#2} \fi \fi } % @chapter, @appendix, @unnumbered. \def\thischaptername{No Chapter Title} \outer\def\chapter{\parsearg\chapteryyy} \def\chapteryyy #1{\numhead0{#1}} % normally numhead0 calls chapterzzz \def\chapterzzz #1{% \secno=0 \subsecno=0 \subsubsecno=0 \global\advance \chapno by 1 \message{\putwordChapter\space \the\chapno}% \chapmacro {#1}{\the\chapno}% \gdef\thissection{#1}% \gdef\thischaptername{#1}% % We don't substitute the actual chapter name into \thischapter % because we don't want its macros evaluated now. \xdef\thischapter{\putwordChapter{} \the\chapno: \noexpand\thischaptername}% \toks0 = {#1}% \edef\temp{\noexpand\writetocentry{\realbackslash chapentry{\the\toks0}% {\the\chapno}}}% \temp \donoderef \global\let\section = \numberedsec \global\let\subsection = \numberedsubsec \global\let\subsubsection = \numberedsubsubsec } \outer\def\appendix{\parsearg\appendixyyy} \def\appendixyyy #1{\apphead0{#1}} % normally apphead0 calls appendixzzz \def\appendixzzz #1{% \secno=0 \subsecno=0 \subsubsecno=0 \global\advance \appendixno by 1 \message{\putwordAppendix\space \appendixletter}% \chapmacro {#1}{\putwordAppendix{} \appendixletter}% \gdef\thissection{#1}% \gdef\thischaptername{#1}% \xdef\thischapter{\putwordAppendix{} \appendixletter: \noexpand\thischaptername}% \toks0 = {#1}% \edef\temp{\noexpand\writetocentry{\realbackslash chapentry{\the\toks0}% {\putwordAppendix{} \appendixletter}}}% \temp \appendixnoderef \global\let\section = \appendixsec \global\let\subsection = \appendixsubsec \global\let\subsubsection = \appendixsubsubsec } % @centerchap is like @unnumbered, but the heading is centered. \outer\def\centerchap{\parsearg\centerchapyyy} \def\centerchapyyy #1{{\let\unnumbchapmacro=\centerchapmacro \unnumberedyyy{#1}}} % @top is like @unnumbered. \outer\def\top{\parsearg\unnumberedyyy} \outer\def\unnumbered{\parsearg\unnumberedyyy} \def\unnumberedyyy #1{\unnmhead0{#1}} % normally unnmhead0 calls unnumberedzzz \def\unnumberedzzz #1{% \secno=0 \subsecno=0 \subsubsecno=0 % % This used to be simply \message{#1}, but TeX fully expands the % argument to \message. Therefore, if #1 contained @-commands, TeX % expanded them. For example, in `@unnumbered The @cite{Book}', TeX % expanded @cite (which turns out to cause errors because \cite is meant % to be executed, not expanded). % % Anyway, we don't want the fully-expanded definition of @cite to appear % as a result of the \message, we just want `@cite' itself. We use % \the to achieve this: TeX expands \the only once, % simply yielding the contents of . (We also do this for % the toc entries.) \toks0 = {#1}\message{(\the\toks0)}% % \unnumbchapmacro {#1}% \gdef\thischapter{#1}\gdef\thissection{#1}% \toks0 = {#1}% \edef\temp{\noexpand\writetocentry{\realbackslash unnumbchapentry{\the\toks0}}}% \temp \unnumbnoderef \global\let\section = \unnumberedsec \global\let\subsection = \unnumberedsubsec \global\let\subsubsection = \unnumberedsubsubsec } % Sections. \outer\def\numberedsec{\parsearg\secyyy} \def\secyyy #1{\numhead1{#1}} % normally calls seczzz \def\seczzz #1{% \subsecno=0 \subsubsecno=0 \global\advance \secno by 1 % \gdef\thissection{#1}\secheading {#1}{\the\chapno}{\the\secno}% \toks0 = {#1}% \edef\temp{\noexpand\writetocentry{\realbackslash secentry{\the\toks0}% {\the\chapno}{\the\secno}}}% \temp \donoderef \nobreak } \outer\def\appendixsection{\parsearg\appendixsecyyy} \outer\def\appendixsec{\parsearg\appendixsecyyy} \def\appendixsecyyy #1{\apphead1{#1}} % normally calls appendixsectionzzz \def\appendixsectionzzz #1{% \subsecno=0 \subsubsecno=0 \global\advance \secno by 1 % \gdef\thissection{#1}\secheading {#1}{\appendixletter}{\the\secno}% \toks0 = {#1}% \edef\temp{\noexpand\writetocentry{\realbackslash secentry{\the\toks0}% {\appendixletter}{\the\secno}}}% \temp \appendixnoderef \nobreak } \outer\def\unnumberedsec{\parsearg\unnumberedsecyyy} \def\unnumberedsecyyy #1{\unnmhead1{#1}} % normally calls unnumberedseczzz \def\unnumberedseczzz #1{% \plainsecheading {#1}\gdef\thissection{#1}% \toks0 = {#1}% \edef\temp{\noexpand\writetocentry{\realbackslash unnumbsecentry{\the\toks0}}}% \temp \unnumbnoderef \nobreak } % Subsections. \outer\def\numberedsubsec{\parsearg\numberedsubsecyyy} \def\numberedsubsecyyy #1{\numhead2{#1}} % normally calls numberedsubseczzz \def\numberedsubseczzz #1{% \gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 % \subsecheading {#1}{\the\chapno}{\the\secno}{\the\subsecno}% \toks0 = {#1}% \edef\temp{\noexpand\writetocentry{\realbackslash subsecentry{\the\toks0}% {\the\chapno}{\the\secno}{\the\subsecno}}}% \temp \donoderef \nobreak } \outer\def\appendixsubsec{\parsearg\appendixsubsecyyy} \def\appendixsubsecyyy #1{\apphead2{#1}} % normally calls appendixsubseczzz \def\appendixsubseczzz #1{% \gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 % \subsecheading {#1}{\appendixletter}{\the\secno}{\the\subsecno}% \toks0 = {#1}% \edef\temp{\noexpand\writetocentry{\realbackslash subsecentry{\the\toks0}% {\appendixletter}{\the\secno}{\the\subsecno}}}% \temp \appendixnoderef \nobreak } \outer\def\unnumberedsubsec{\parsearg\unnumberedsubsecyyy} \def\unnumberedsubsecyyy #1{\unnmhead2{#1}} %normally calls unnumberedsubseczzz \def\unnumberedsubseczzz #1{% \plainsubsecheading {#1}\gdef\thissection{#1}% \toks0 = {#1}% \edef\temp{\noexpand\writetocentry{\realbackslash unnumbsubsecentry% {\the\toks0}}}% \temp \unnumbnoderef \nobreak } % Subsubsections. \outer\def\numberedsubsubsec{\parsearg\numberedsubsubsecyyy} \def\numberedsubsubsecyyy #1{\numhead3{#1}} % normally numberedsubsubseczzz \def\numberedsubsubseczzz #1{% \gdef\thissection{#1}\global\advance \subsubsecno by 1 % \subsubsecheading {#1} {\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}% \toks0 = {#1}% \edef\temp{\noexpand\writetocentry{\realbackslash subsubsecentry{\the\toks0}% {\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}}}% \temp \donoderef \nobreak } \outer\def\appendixsubsubsec{\parsearg\appendixsubsubsecyyy} \def\appendixsubsubsecyyy #1{\apphead3{#1}} % normally appendixsubsubseczzz \def\appendixsubsubseczzz #1{% \gdef\thissection{#1}\global\advance \subsubsecno by 1 % \subsubsecheading {#1} {\appendixletter}{\the\secno}{\the\subsecno}{\the\subsubsecno}% \toks0 = {#1}% \edef\temp{\noexpand\writetocentry{\realbackslash subsubsecentry{\the\toks0}% {\appendixletter}{\the\secno}{\the\subsecno}{\the\subsubsecno}}}% \temp \appendixnoderef \nobreak } \outer\def\unnumberedsubsubsec{\parsearg\unnumberedsubsubsecyyy} \def\unnumberedsubsubsecyyy #1{\unnmhead3{#1}} %normally unnumberedsubsubseczzz \def\unnumberedsubsubseczzz #1{% \plainsubsubsecheading {#1}\gdef\thissection{#1}% \toks0 = {#1}% \edef\temp{\noexpand\writetocentry{\realbackslash unnumbsubsubsecentry% {\the\toks0}}}% \temp \unnumbnoderef \nobreak } % These are variants which are not "outer", so they can appear in @ifinfo. % Actually, they should now be obsolete; ordinary section commands should work. \def\infotop{\parsearg\unnumberedzzz} \def\infounnumbered{\parsearg\unnumberedzzz} \def\infounnumberedsec{\parsearg\unnumberedseczzz} \def\infounnumberedsubsec{\parsearg\unnumberedsubseczzz} \def\infounnumberedsubsubsec{\parsearg\unnumberedsubsubseczzz} \def\infoappendix{\parsearg\appendixzzz} \def\infoappendixsec{\parsearg\appendixseczzz} \def\infoappendixsubsec{\parsearg\appendixsubseczzz} \def\infoappendixsubsubsec{\parsearg\appendixsubsubseczzz} \def\infochapter{\parsearg\chapterzzz} \def\infosection{\parsearg\sectionzzz} \def\infosubsection{\parsearg\subsectionzzz} \def\infosubsubsection{\parsearg\subsubsectionzzz} % These macros control what the section commands do, according % to what kind of chapter we are in (ordinary, appendix, or unnumbered). % Define them by default for a numbered chapter. \global\let\section = \numberedsec \global\let\subsection = \numberedsubsec \global\let\subsubsection = \numberedsubsubsec % Define @majorheading, @heading and @subheading % NOTE on use of \vbox for chapter headings, section headings, and such: % 1) We use \vbox rather than the earlier \line to permit % overlong headings to fold. % 2) \hyphenpenalty is set to 10000 because hyphenation in a % heading is obnoxious; this forbids it. % 3) Likewise, headings look best if no \parindent is used, and % if justification is not attempted. Hence \raggedright. \def\majorheading{\parsearg\majorheadingzzz} \def\majorheadingzzz #1{% {\advance\chapheadingskip by 10pt \chapbreak }% {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 \parindent=0pt\raggedright \rm #1\hfill}}\bigskip \par\penalty 200} \def\chapheading{\parsearg\chapheadingzzz} \def\chapheadingzzz #1{\chapbreak % {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 \parindent=0pt\raggedright \rm #1\hfill}}\bigskip \par\penalty 200} % @heading, @subheading, @subsubheading. \def\heading{\parsearg\plainsecheading} \def\subheading{\parsearg\plainsubsecheading} \def\subsubheading{\parsearg\plainsubsubsecheading} % These macros generate a chapter, section, etc. heading only % (including whitespace, linebreaking, etc. around it), % given all the information in convenient, parsed form. %%% Args are the skip and penalty (usually negative) \def\dobreak#1#2{\par\ifdim\lastskip<#1\removelastskip\penalty#2\vskip#1\fi} \def\setchapterstyle #1 {\csname CHAPF#1\endcsname} %%% Define plain chapter starts, and page on/off switching for it % Parameter controlling skip before chapter headings (if needed) \newskip\chapheadingskip \def\chapbreak{\dobreak \chapheadingskip {-4000}} \def\chappager{\par\vfill\supereject} \def\chapoddpage{\chappager \ifodd\pageno \else \hbox to 0pt{} \chappager\fi} \def\setchapternewpage #1 {\csname CHAPPAG#1\endcsname} \def\CHAPPAGoff{% \global\let\contentsalignmacro = \chappager \global\let\pchapsepmacro=\chapbreak \global\let\pagealignmacro=\chappager} \def\CHAPPAGon{% \global\let\contentsalignmacro = \chappager \global\let\pchapsepmacro=\chappager \global\let\pagealignmacro=\chappager \global\def\HEADINGSon{\HEADINGSsingle}} \def\CHAPPAGodd{ \global\let\contentsalignmacro = \chapoddpage \global\let\pchapsepmacro=\chapoddpage \global\let\pagealignmacro=\chapoddpage \global\def\HEADINGSon{\HEADINGSdouble}} \CHAPPAGon \def\CHAPFplain{ \global\let\chapmacro=\chfplain \global\let\unnumbchapmacro=\unnchfplain \global\let\centerchapmacro=\centerchfplain} % Plain chapter opening. % #1 is the text, #2 the chapter number or empty if unnumbered. \def\chfplain#1#2{% \pchapsepmacro {% \chapfonts \rm \def\chapnum{#2}% \setbox0 = \hbox{#2\ifx\chapnum\empty\else\enspace\fi}% \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright \hangindent = \wd0 \centerparametersmaybe \unhbox0 #1\par}% }% \nobreak\bigskip % no page break after a chapter title \nobreak } % Plain opening for unnumbered. \def\unnchfplain#1{\chfplain{#1}{}} % @centerchap -- centered and unnumbered. \let\centerparametersmaybe = \relax \def\centerchfplain#1{{% \def\centerparametersmaybe{% \advance\rightskip by 3\rightskip \leftskip = \rightskip \parfillskip = 0pt }% \chfplain{#1}{}% }} \CHAPFplain % The default \def\unnchfopen #1{% \chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 \parindent=0pt\raggedright \rm #1\hfill}}\bigskip \par\nobreak } \def\chfopen #1#2{\chapoddpage {\chapfonts \vbox to 3in{\vfil \hbox to\hsize{\hfil #2} \hbox to\hsize{\hfil #1} \vfil}}% \par\penalty 5000 % } \def\centerchfopen #1{% \chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 \parindent=0pt \hfill {\rm #1}\hfill}}\bigskip \par\nobreak } \def\CHAPFopen{ \global\let\chapmacro=\chfopen \global\let\unnumbchapmacro=\unnchfopen \global\let\centerchapmacro=\centerchfopen} % Section titles. \newskip\secheadingskip \def\secheadingbreak{\dobreak \secheadingskip {-1000}} \def\secheading#1#2#3{\sectionheading{sec}{#2.#3}{#1}} \def\plainsecheading#1{\sectionheading{sec}{}{#1}} % Subsection titles. \newskip \subsecheadingskip \def\subsecheadingbreak{\dobreak \subsecheadingskip {-500}} \def\subsecheading#1#2#3#4{\sectionheading{subsec}{#2.#3.#4}{#1}} \def\plainsubsecheading#1{\sectionheading{subsec}{}{#1}} % Subsubsection titles. \let\subsubsecheadingskip = \subsecheadingskip \let\subsubsecheadingbreak = \subsecheadingbreak \def\subsubsecheading#1#2#3#4#5{\sectionheading{subsubsec}{#2.#3.#4.#5}{#1}} \def\plainsubsubsecheading#1{\sectionheading{subsubsec}{}{#1}} % Print any size section title. % % #1 is the section type (sec/subsec/subsubsec), #2 is the section % number (maybe empty), #3 the text. \def\sectionheading#1#2#3{% {% \expandafter\advance\csname #1headingskip\endcsname by \parskip \csname #1headingbreak\endcsname }% {% % Switch to the right set of fonts. \csname #1fonts\endcsname \rm % % Only insert the separating space if we have a section number. \def\secnum{#2}% \setbox0 = \hbox{#2\ifx\secnum\empty\else\enspace\fi}% % \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright \hangindent = \wd0 % zero if no section number \unhbox0 #3}% }% \ifdim\parskip<10pt \nobreak\kern10pt\nobreak\kern-\parskip\fi \nobreak } \message{toc,} % Table of contents. \newwrite\tocfile % Write an entry to the toc file, opening it if necessary. % Called from @chapter, etc. We supply {\folio} at the end of the % argument, which will end up as the last argument to the \...entry macro. % % We open the .toc file here instead of at @setfilename or any other % given time so that @contents can be put in the document anywhere. % \newif\iftocfileopened \def\writetocentry#1{% \iftocfileopened\else \immediate\openout\tocfile = \jobname.toc \global\tocfileopenedtrue \fi \iflinks \write\tocfile{#1{\folio}}\fi } \newskip\contentsrightmargin \contentsrightmargin=1in \newcount\savepageno \newcount\lastnegativepageno \lastnegativepageno = -1 % Finish up the main text and prepare to read what we've written % to \tocfile. % \def\startcontents#1{% % If @setchapternewpage on, and @headings double, the contents should % start on an odd page, unlike chapters. Thus, we maintain % \contentsalignmacro in parallel with \pagealignmacro. % From: Torbjorn Granlund \contentsalignmacro \immediate\closeout\tocfile % % Don't need to put `Contents' or `Short Contents' in the headline. % It is abundantly clear what they are. \unnumbchapmacro{#1}\def\thischapter{}% \savepageno = \pageno \begingroup % Set up to handle contents files properly. \catcode`\\=0 \catcode`\{=1 \catcode`\}=2 \catcode`\@=11 % We can't do this, because then an actual ^ in a section % title fails, e.g., @chapter ^ -- exponentiation. --karl, 9jul97. %\catcode`\^=7 % to see ^^e4 as \"a etc. juha@piuha.ydi.vtt.fi \raggedbottom % Worry more about breakpoints than the bottom. \advance\hsize by -\contentsrightmargin % Don't use the full line length. % % Roman numerals for page numbers. \ifnum \pageno>0 \pageno = \lastnegativepageno \fi } % Normal (long) toc. \def\contents{% \startcontents{\putwordTOC}% \openin 1 \jobname.toc \ifeof 1 \else \closein 1 \input \jobname.toc \fi \vfill \eject \contentsalignmacro % in case @setchapternewpage odd is in effect \pdfmakeoutlines \endgroup \lastnegativepageno = \pageno \pageno = \savepageno } % And just the chapters. \def\summarycontents{% \startcontents{\putwordShortTOC}% % \let\chapentry = \shortchapentry \let\unnumbchapentry = \shortunnumberedentry % We want a true roman here for the page numbers. \secfonts \let\rm=\shortcontrm \let\bf=\shortcontbf \let\sl=\shortcontsl \rm \hyphenpenalty = 10000 \advance\baselineskip by 1pt % Open it up a little. \def\secentry ##1##2##3##4{} \def\unnumbsecentry ##1##2{} \def\subsecentry ##1##2##3##4##5{} \def\unnumbsubsecentry ##1##2{} \def\subsubsecentry ##1##2##3##4##5##6{} \def\unnumbsubsubsecentry ##1##2{} \openin 1 \jobname.toc \ifeof 1 \else \closein 1 \input \jobname.toc \fi \vfill \eject \contentsalignmacro % in case @setchapternewpage odd is in effect \endgroup \lastnegativepageno = \pageno \pageno = \savepageno } \let\shortcontents = \summarycontents \ifpdf \pdfcatalog{/PageMode /UseOutlines}% \fi % These macros generate individual entries in the table of contents. % The first argument is the chapter or section name. % The last argument is the page number. % The arguments in between are the chapter number, section number, ... % Chapter-level things, for both the long and short contents. \def\chapentry#1#2#3{\dochapentry{#2\labelspace#1}{#3}} % See comments in \dochapentry re vbox and related settings \def\shortchapentry#1#2#3{% \tocentry{\shortchaplabel{#2}\labelspace #1}{\doshortpageno\bgroup#3\egroup}% } % Typeset the label for a chapter or appendix for the short contents. % The arg is, e.g. `Appendix A' for an appendix, or `3' for a chapter. % We could simplify the code here by writing out an \appendixentry % command in the toc file for appendices, instead of using \chapentry % for both, but it doesn't seem worth it. % \newdimen\shortappendixwidth % \def\shortchaplabel#1{% % Compute width of word "Appendix", may change with language. \setbox0 = \hbox{\shortcontrm \putwordAppendix}% \shortappendixwidth = \wd0 % % We typeset #1 in a box of constant width, regardless of the text of % #1, so the chapter titles will come out aligned. \setbox0 = \hbox{#1}% \dimen0 = \ifdim\wd0 > \shortappendixwidth \shortappendixwidth \else 0pt \fi % % This space should be plenty, since a single number is .5em, and the % widest letter (M) is 1em, at least in the Computer Modern fonts. % (This space doesn't include the extra space that gets added after % the label; that gets put in by \shortchapentry above.) \advance\dimen0 by 1.1em \hbox to \dimen0{#1\hfil}% } \def\unnumbchapentry#1#2{\dochapentry{#1}{#2}} \def\shortunnumberedentry#1#2{\tocentry{#1}{\doshortpageno\bgroup#2\egroup}} % Sections. \def\secentry#1#2#3#4{\dosecentry{#2.#3\labelspace#1}{#4}} \def\unnumbsecentry#1#2{\dosecentry{#1}{#2}} % Subsections. \def\subsecentry#1#2#3#4#5{\dosubsecentry{#2.#3.#4\labelspace#1}{#5}} \def\unnumbsubsecentry#1#2{\dosubsecentry{#1}{#2}} % And subsubsections. \def\subsubsecentry#1#2#3#4#5#6{% \dosubsubsecentry{#2.#3.#4.#5\labelspace#1}{#6}} \def\unnumbsubsubsecentry#1#2{\dosubsubsecentry{#1}{#2}} % This parameter controls the indentation of the various levels. \newdimen\tocindent \tocindent = 3pc % Now for the actual typesetting. In all these, #1 is the text and #2 is the % page number. % % If the toc has to be broken over pages, we want it to be at chapters % if at all possible; hence the \penalty. \def\dochapentry#1#2{% \penalty-300 \vskip1\baselineskip plus.33\baselineskip minus.25\baselineskip \begingroup \chapentryfonts \tocentry{#1}{\dopageno\bgroup#2\egroup}% \endgroup \nobreak\vskip .25\baselineskip plus.1\baselineskip } \def\dosecentry#1#2{\begingroup \secentryfonts \leftskip=\tocindent \tocentry{#1}{\dopageno\bgroup#2\egroup}% \endgroup} \def\dosubsecentry#1#2{\begingroup \subsecentryfonts \leftskip=2\tocindent \tocentry{#1}{\dopageno\bgroup#2\egroup}% \endgroup} \def\dosubsubsecentry#1#2{\begingroup \subsubsecentryfonts \leftskip=3\tocindent \tocentry{#1}{\dopageno\bgroup#2\egroup}% \endgroup} % Final typesetting of a toc entry; we use the same \entry macro as for % the index entries, but we want to suppress hyphenation here. (We % can't do that in the \entry macro, since index entries might consist % of hyphenated-identifiers-that-do-not-fit-on-a-line-and-nothing-else.) \def\tocentry#1#2{\begingroup \vskip 0pt plus1pt % allow a little stretch for the sake of nice page breaks % Do not use \turnoffactive in these arguments. Since the toc is % typeset in cmr, so characters such as _ would come out wrong; we % have to do the usual translation tricks. \entry{#1}{#2}% \endgroup} % Space between chapter (or whatever) number and the title. \def\labelspace{\hskip1em \relax} \def\dopageno#1{{\rm #1}} \def\doshortpageno#1{{\rm #1}} \def\chapentryfonts{\secfonts \rm} \def\secentryfonts{\textfonts} \let\subsecentryfonts = \textfonts \let\subsubsecentryfonts = \textfonts \message{environments,} % @foo ... @end foo. % Since these characters are used in examples, it should be an even number of % \tt widths. Each \tt character is 1en, so two makes it 1em. % Furthermore, these definitions must come after we define our fonts. \newbox\dblarrowbox \newbox\longdblarrowbox \newbox\pushcharbox \newbox\bullbox \newbox\equivbox \newbox\errorbox %{\tentt %\global\setbox\dblarrowbox = \hbox to 1em{\hfil$\Rightarrow$\hfil} %\global\setbox\longdblarrowbox = \hbox to 1em{\hfil$\mapsto$\hfil} %\global\setbox\pushcharbox = \hbox to 1em{\hfil$\dashv$\hfil} %\global\setbox\equivbox = \hbox to 1em{\hfil$\ptexequiv$\hfil} % Adapted from the manmac format (p.420 of TeXbook) %\global\setbox\bullbox = \hbox to 1em{\kern.15em\vrule height .75ex width .85ex % depth .1ex\hfil} %} % @point{}, @result{}, @expansion{}, @print{}, @equiv{}. \def\point{$\star$} \def\result{\leavevmode\raise.15ex\hbox to 1em{\hfil$\Rightarrow$\hfil}} \def\expansion{\leavevmode\raise.1ex\hbox to 1em{\hfil$\mapsto$\hfil}} \def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}} \def\equiv{\leavevmode\lower.1ex\hbox to 1em{\hfil$\ptexequiv$\hfil}} % Adapted from the TeXbook's \boxit. {\tentt \global\dimen0 = 3em}% Width of the box. \dimen2 = .55pt % Thickness of rules % The text. (`r' is open on the right, `e' somewhat less so on the left.) \setbox0 = \hbox{\kern-.75pt \tensf error\kern-1.5pt} \global\setbox\errorbox=\hbox to \dimen0{\hfil \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right. \advance\hsize by -2\dimen2 % Rules. \vbox{ \hrule height\dimen2 \hbox{\vrule width\dimen2 \kern3pt % Space to left of text. \vtop{\kern2.4pt \box0 \kern2.4pt}% Space above/below. \kern3pt\vrule width\dimen2}% Space to right. \hrule height\dimen2} \hfil} % The @error{} command. \def\error{\leavevmode\lower.7ex\copy\errorbox} % @tex ... @end tex escapes into raw Tex temporarily. % One exception: @ is still an escape character, so that @end tex works. % But \@ or @@ will get a plain tex @ character. \def\tex{\begingroup \catcode `\\=0 \catcode `\{=1 \catcode `\}=2 \catcode `\$=3 \catcode `\&=4 \catcode `\#=6 \catcode `\^=7 \catcode `\_=8 \catcode `\~=13 \let~=\tie \catcode `\%=14 \catcode 43=12 % plus \catcode`\"=12 \catcode`\==12 \catcode`\|=12 \catcode`\<=12 \catcode`\>=12 \escapechar=`\\ % \let\b=\ptexb \let\bullet=\ptexbullet \let\c=\ptexc \let\,=\ptexcomma \let\.=\ptexdot \let\dots=\ptexdots \let\equiv=\ptexequiv \let\!=\ptexexclam \let\i=\ptexi \let\{=\ptexlbrace \let\+=\tabalign \let\}=\ptexrbrace \let\*=\ptexstar \let\t=\ptext % \def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}% \def\enddots{\relax\ifmmode\endldots\else$\mathsurround=0pt \endldots\,$\fi}% \def\@{@}% \let\Etex=\endgroup} % Define @lisp ... @endlisp. % @lisp does a \begingroup so it can rebind things, % including the definition of @endlisp (which normally is erroneous). % Amount to narrow the margins by for @lisp. \newskip\lispnarrowing \lispnarrowing=0.4in % This is the definition that ^^M gets inside @lisp, @example, and other % such environments. \null is better than a space, since it doesn't % have any width. \def\lisppar{\null\endgraf} % Make each space character in the input produce a normal interword % space in the output. Don't allow a line break at this space, as this % is used only in environments like @example, where each line of input % should produce a line of output anyway. % {\obeyspaces % \gdef\sepspaces{\obeyspaces\let =\tie}} % Define \obeyedspace to be our active space, whatever it is. This is % for use in \parsearg. {\sepspaces% \global\let\obeyedspace= } % This space is always present above and below environments. \newskip\envskipamount \envskipamount = 0pt % Make spacing and below environment symmetrical. We use \parskip here % to help in doing that, since in @example-like environments \parskip % is reset to zero; thus the \afterenvbreak inserts no space -- but the % start of the next paragraph will insert \parskip % \def\aboveenvbreak{{\advance\envskipamount by \parskip \endgraf \ifdim\lastskip<\envskipamount \removelastskip \penalty-50 \vskip\envskipamount \fi}} \let\afterenvbreak = \aboveenvbreak % \nonarrowing is a flag. If "set", @lisp etc don't narrow margins. \let\nonarrowing=\relax % @cartouche ... @end cartouche: draw rectangle w/rounded corners around % environment contents. \font\circle=lcircle10 \newdimen\circthick \newdimen\cartouter\newdimen\cartinner \newskip\normbskip\newskip\normpskip\newskip\normlskip \circthick=\fontdimen8\circle % \def\ctl{{\circle\char'013\hskip -6pt}}% 6pt from pl file: 1/2charwidth \def\ctr{{\hskip 6pt\circle\char'010}} \def\cbl{{\circle\char'012\hskip -6pt}} \def\cbr{{\hskip 6pt\circle\char'011}} \def\carttop{\hbox to \cartouter{\hskip\lskip \ctl\leaders\hrule height\circthick\hfil\ctr \hskip\rskip}} \def\cartbot{\hbox to \cartouter{\hskip\lskip \cbl\leaders\hrule height\circthick\hfil\cbr \hskip\rskip}} % \newskip\lskip\newskip\rskip \long\def\cartouche{% \begingroup \lskip=\leftskip \rskip=\rightskip \leftskip=0pt\rightskip=0pt %we want these *outside*. \cartinner=\hsize \advance\cartinner by-\lskip \advance\cartinner by-\rskip \cartouter=\hsize \advance\cartouter by 18.4pt % allow for 3pt kerns on either % side, and for 6pt waste from % each corner char, and rule thickness \normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip % Flag to tell @lisp, etc., not to narrow margin. \let\nonarrowing=\comment \vbox\bgroup \baselineskip=0pt\parskip=0pt\lineskip=0pt \carttop \hbox\bgroup \hskip\lskip \vrule\kern3pt \vbox\bgroup \hsize=\cartinner \kern3pt \begingroup \baselineskip=\normbskip \lineskip=\normlskip \parskip=\normpskip \vskip -\parskip \def\Ecartouche{% \endgroup \kern3pt \egroup \kern3pt\vrule \hskip\rskip \egroup \cartbot \egroup \endgroup }} % This macro is called at the beginning of all the @example variants, % inside a group. \def\nonfillstart{% \aboveenvbreak \inENV % This group ends at the end of the body \hfuzz = 12pt % Don't be fussy \sepspaces % Make spaces be word-separators rather than space tokens. \singlespace \let\par = \lisppar % don't ignore blank lines \obeylines % each line of input is a line of output \parskip = 0pt \parindent = 0pt \emergencystretch = 0pt % don't try to avoid overfull boxes % @cartouche defines \nonarrowing to inhibit narrowing % at next level down. \ifx\nonarrowing\relax \advance \leftskip by \lispnarrowing \exdentamount=\lispnarrowing \let\exdent=\nofillexdent \let\nonarrowing=\relax \fi } % Define the \E... control sequence only if we are inside the particular % environment, so the error checking in \end will work. % % To end an @example-like environment, we first end the paragraph (via % \afterenvbreak's vertical glue), and then the group. That way we keep % the zero \parskip that the environments set -- \parskip glue will be % inserted at the beginning of the next paragraph in the document, after % the environment. % \def\nonfillfinish{\afterenvbreak\endgroup} % @lisp: indented, narrowed, typewriter font. \def\lisp{\begingroup \nonfillstart \let\Elisp = \nonfillfinish \tt \let\kbdfont = \kbdexamplefont % Allow @kbd to do something special. \gobble % eat return } % @example: Same as @lisp. \def\example{\begingroup \def\Eexample{\nonfillfinish\endgroup}\lisp} % @small... is usually equivalent to the non-small (@smallbook % redefines). We must call \example (or whatever) last in the % definition, since it reads the return following the @example (or % whatever) command. % % This actually allows (for example) @end display inside an % @smalldisplay. Too bad, but makeinfo will catch the error anyway. % \def\smalldisplay{\begingroup\def\Esmalldisplay{\nonfillfinish\endgroup}\display} \def\smallexample{\begingroup\def\Esmallexample{\nonfillfinish\endgroup}\lisp} \def\smallformat{\begingroup\def\Esmallformat{\nonfillfinish\endgroup}\format} \def\smalllisp{\begingroup\def\Esmalllisp{\nonfillfinish\endgroup}\lisp} % Real @smallexample and @smalllisp (when @smallbook): use smaller fonts. % Originally contributed by Pavel@xerox. \def\smalllispx{\begingroup \def\Esmalllisp{\nonfillfinish\endgroup}% \def\Esmallexample{\nonfillfinish\endgroup}% \smallfonts \lisp } % @display: same as @lisp except keep current font. % \def\display{\begingroup \nonfillstart \let\Edisplay = \nonfillfinish \gobble } % @smalldisplay (when @smallbook): @display plus smaller fonts. % \def\smalldisplayx{\begingroup \def\Esmalldisplay{\nonfillfinish\endgroup}% \smallfonts \rm \display } % @format: same as @display except don't narrow margins. % \def\format{\begingroup \let\nonarrowing = t \nonfillstart \let\Eformat = \nonfillfinish \gobble } % @smallformat (when @smallbook): @format plus smaller fonts. % \def\smallformatx{\begingroup \def\Esmallformat{\nonfillfinish\endgroup}% \smallfonts \rm \format } % @flushleft (same as @format). % \def\flushleft{\begingroup \def\Eflushleft{\nonfillfinish\endgroup}\format} % @flushright. % \def\flushright{\begingroup \let\nonarrowing = t \nonfillstart \let\Eflushright = \nonfillfinish \advance\leftskip by 0pt plus 1fill \gobble } % @quotation does normal linebreaking (hence we can't use \nonfillstart) % and narrows the margins. % \def\quotation{% \begingroup\inENV %This group ends at the end of the @quotation body {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip \singlespace \parindent=0pt % We have retained a nonzero parskip for the environment, since we're % doing normal filling. So to avoid extra space below the environment... \def\Equotation{\parskip = 0pt \nonfillfinish}% % % @cartouche defines \nonarrowing to inhibit narrowing at next level down. \ifx\nonarrowing\relax \advance\leftskip by \lispnarrowing \advance\rightskip by \lispnarrowing \exdentamount = \lispnarrowing \let\nonarrowing = \relax \fi } % LaTeX-like @verbatim...@end verbatim and @verb{...} % If we want to allow any as delimiter, % we need the curly braces so that makeinfo sees the @verb command, eg: % `@verbx...x' would look like the '@verbx' command. --janneke@gnu.org % % [Knuth]: Donald Ervin Knuth, 1996. The TeXbook. % % [Knuth] p. 344; only we need to do '@' too \def\dospecials{% \do\ \do\\\do\@\do\{\do\}\do\$\do\&% \do\#\do\^\do\^^K\do\_\do\^^A\do\%\do\~} % % [Knuth] p. 380 \def\uncatcodespecials{% \def\do##1{\catcode`##1=12}\dospecials} % % [Knuth] pp. 380,381,391 % Disable Spanish ligatures ?` and !` of \tt font \begingroup \catcode`\`=\active\gdef`{\relax\lq} \endgroup % % Setup for the @verb command. % % Eight spaces for a tab \begingroup \catcode`\^^I=\active \gdef\tabeightspaces{\catcode`\^^I=\active\def^^I{\ \ \ \ \ \ \ \ }} \endgroup % \def\setupverb{% \tt % easiest (and conventionally used) font for verbatim \def\par{\leavevmode\endgraf}% \catcode`\`=\active \tabeightspaces % Respect line breaks, % print special symbols as themselves, and % make each space count % must do in this order: \obeylines \uncatcodespecials \sepspaces } % Setup for the @verbatim environment % % Real tab expansion \newdimen\tabw \setbox0=\hbox{\tt\space} \tabw=8\wd0 % tab amount % \def\starttabbox{\setbox0=\hbox\bgroup} \begingroup \catcode`\^^I=\active \gdef\tabexpand{% \catcode`\^^I=\active \def^^I{\leavevmode\egroup \dimen0=\wd0 % the width so far, or since the previous tab \divide\dimen0 by\tabw \multiply\dimen0 by\tabw % compute previous multiple of \tabw \advance\dimen0 by\tabw % advance to next multiple of \tabw \wd0=\dimen0 \box0 \starttabbox }% } \endgroup \def\setupverbatim{% % Easiest (and conventionally used) font for verbatim \tt \def\par{\leavevmode\egroup\box0\endgraf}% \catcode`\`=\active \tabexpand % Respect line breaks, % print special symbols as themselves, and % make each space count % must do in this order: \obeylines \uncatcodespecials \sepspaces \everypar{\starttabbox}% } % Do the @verb magic: verbatim text is quoted by unique % delimiter characters. Before first delimiter expect a % right brace, after last delimiter expect closing brace: % % \def\doverb'{'#1'}'{#1} % % [Knuth] p. 382; only eat outer {} \begingroup \catcode`[=1\catcode`]=2\catcode`\{=12\catcode`\}=12 \gdef\doverb{#1[\def\next##1#1}[##1\endgroup]\next] \endgroup % \def\verb{\begingroup\setupverb\doverb} % % % Do the @verbatim magic: define the macro \doverbatim so that % the (first) argument ends when '@end verbatim' is reached, ie: % % \def\doverbatim#1@end verbatim{#1} % % For Texinfo it's a lot easier than for LaTeX, % because texinfo's \verbatim doesn't stop at '\end{verbatim}': % we need not redefine '\', '{' and '}' % % Inspired by LaTeX's verbatim command set [latex.ltx] %% Include LaTeX hack for completeness -- never know %% \begingroup %% \catcode`|=0 \catcode`[=1 %% \catcode`]=2\catcode`\{=12\catcode`\}=12\catcode`\ =\active %% \catcode`\\=12|gdef|doverbatim#1@end verbatim[ %% #1|endgroup|def|Everbatim[]|end[verbatim]] %% |endgroup \begingroup \catcode`\ =\active \gdef\doverbatim#1@end verbatim{#1\end{verbatim}} \endgroup % \def\verbatim{% \def\Everbatim{\nonfillfinish\endgroup}% \begingroup \nonfillstart \advance\leftskip by -\defbodyindent \begingroup\setupverbatim\doverbatim } % @verbatiminclude FILE - insert text of file in verbatim environment. % % Allow normal characters that we make active in the argument (a file name). \def\verbatiminclude{% \begingroup \catcode`\\=12 \catcode`~=12 \catcode`^=12 \catcode`_=12 \catcode`|=12 \catcode`<=12 \catcode`>=12 \catcode`+=12 \parsearg\doverbatiminclude } \def\setupverbatiminclude{% \begingroup \nonfillstart \advance\leftskip by -\defbodyindent \begingroup\setupverbatim } % \def\doverbatiminclude#1{% % Restore active chars for included file. \endgroup \begingroup \def\thisfile{#1}% \expandafter\expandafter\setupverbatiminclude\input\thisfile \endgroup\nonfillfinish\endgroup } \message{defuns,} % @defun etc. % Allow user to change definition object font (\df) internally \def\setdeffont #1 {\csname DEF#1\endcsname} \newskip\defbodyindent \defbodyindent=.4in \newskip\defargsindent \defargsindent=50pt \newskip\deftypemargin \deftypemargin=12pt \newskip\deflastargmargin \deflastargmargin=18pt \newcount\parencount % define \functionparens, which makes ( and ) and & do special things. % \functionparens affects the group it is contained in. \def\activeparens{% \catcode`\(=\active \catcode`\)=\active \catcode`\&=\active \catcode`\[=\active \catcode`\]=\active} % Make control sequences which act like normal parenthesis chars. \let\lparen = ( \let\rparen = ) {\activeparens % Now, smart parens don't turn on until &foo (see \amprm) % Be sure that we always have a definition for `(', etc. For example, % if the fn name has parens in it, \boldbrax will not be in effect yet, % so TeX would otherwise complain about undefined control sequence. \global\let(=\lparen \global\let)=\rparen \global\let[=\lbrack \global\let]=\rbrack \gdef\functionparens{\boldbrax\let&=\amprm\parencount=0 } \gdef\boldbrax{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb} % This is used to turn on special parens % but make & act ordinary (given that it's active). \gdef\boldbraxnoamp{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb\let&=\ampnr} % Definitions of (, ) and & used in args for functions. % This is the definition of ( outside of all parentheses. \gdef\oprm#1 {{\rm\char`\(}#1 \bf \let(=\opnested \global\advance\parencount by 1 } % % This is the definition of ( when already inside a level of parens. \gdef\opnested{\char`\(\global\advance\parencount by 1 } % \gdef\clrm{% Print a paren in roman if it is taking us back to depth of 0. % also in that case restore the outer-level definition of (. \ifnum \parencount=1 {\rm \char `\)}\sl \let(=\oprm \else \char `\) \fi \global\advance \parencount by -1 } % If we encounter &foo, then turn on ()-hacking afterwards \gdef\amprm#1 {{\rm\}\let(=\oprm \let)=\clrm\ } % \gdef\normalparens{\boldbrax\let&=\ampnr} } % End of definition inside \activeparens %% These parens (in \boldbrax) actually are a little bolder than the %% contained text. This is especially needed for [ and ] \def\opnr{{\sf\char`\(}\global\advance\parencount by 1 } \def\clnr{{\sf\char`\)}\global\advance\parencount by -1 } \let\ampnr = \& \def\lbrb{{\bf\char`\[}} \def\rbrb{{\bf\char`\]}} % Active &'s sneak into the index arguments, so make sure it's defined. { \catcode`& = 13 \global\let& = \ampnr } % First, defname, which formats the header line itself. % #1 should be the function name. % #2 should be the type of definition, such as "Function". \def\defname #1#2{% % Get the values of \leftskip and \rightskip as they were % outside the @def... \dimen2=\leftskip \advance\dimen2 by -\defbodyindent \noindent \setbox0=\hbox{\hskip \deflastargmargin{\rm #2}\hskip \deftypemargin}% \dimen0=\hsize \advance \dimen0 by -\wd0 % compute size for first line \dimen1=\hsize \advance \dimen1 by -\defargsindent %size for continuations \parshape 2 0in \dimen0 \defargsindent \dimen1 % Now output arg 2 ("Function" or some such) % ending at \deftypemargin from the right margin, % but stuck inside a box of width 0 so it does not interfere with linebreaking {% Adjust \hsize to exclude the ambient margins, % so that \rightline will obey them. \advance \hsize by -\dimen2 \rlap{\rightline{{\rm #2}\hskip -1.25pc }}}% % Make all lines underfull and no complaints: \tolerance=10000 \hbadness=10000 \advance\leftskip by -\defbodyindent \exdentamount=\defbodyindent {\df #1}\enskip % Generate function name } % Actually process the body of a definition % #1 should be the terminating control sequence, such as \Edefun. % #2 should be the "another name" control sequence, such as \defunx. % #3 should be the control sequence that actually processes the header, % such as \defunheader. \def\defparsebody #1#2#3{\begingroup\inENV% Environment for definitionbody \medbreak % % Define the end token that this defining construct specifies % so that it will exit this group. \def#1{\endgraf\endgroup\medbreak}% \def#2{\begingroup\obeylines\activeparens\spacesplit#3}% \parindent=0in \advance\leftskip by \defbodyindent \exdentamount=\defbodyindent \begingroup % \catcode 61=\active % 61 is `=' \obeylines\activeparens\spacesplit#3} % #1 is the \E... control sequence to end the definition (which we define). % #2 is the \...x control sequence for consecutive fns (which we define). % #3 is the control sequence to call to resume processing. % #4, delimited by the space, is the class name. % \def\defmethparsebody#1#2#3#4 {\begingroup\inENV % \medbreak % % Define the end token that this defining construct specifies % so that it will exit this group. \def#1{\endgraf\endgroup\medbreak}% \def#2##1 {\begingroup\obeylines\activeparens\spacesplit{#3{##1}}}% \parindent=0in \advance\leftskip by \defbodyindent \exdentamount=\defbodyindent \begingroup\obeylines\activeparens\spacesplit{#3{#4}}} % Used for @deftypemethod and @deftypeivar. % #1 is the \E... control sequence to end the definition (which we define). % #2 is the \...x control sequence for consecutive fns (which we define). % #3 is the control sequence to call to resume processing. % #4, delimited by a space, is the class name. % #5 is the method's return type. % \def\deftypemethparsebody#1#2#3#4 #5 {\begingroup\inENV \medbreak \def#1{\endgraf\endgroup\medbreak}% \def#2##1 ##2 {\begingroup\obeylines\activeparens\spacesplit{#3{##1}{##2}}}% \parindent=0in \advance\leftskip by \defbodyindent \exdentamount=\defbodyindent \begingroup\obeylines\activeparens\spacesplit{#3{#4}{#5}}} % Used for @deftypeop. The change from \deftypemethparsebody is an % extra argument at the beginning which is the `category', instead of it % being the hardwired string `Method' or `Instance Variable'. We have % to account for this both in the \...x definition and in parsing the % input at hand. Thus also need a control sequence (passed as #5) for % the \E... definition to assign the category name to. % \def\deftypeopparsebody#1#2#3#4#5 #6 {\begingroup\inENV \medbreak \def#1{\endgraf\endgroup\medbreak}% \def#2##1 ##2 ##3 {% \def#4{##1}% \begingroup\obeylines\activeparens\spacesplit{#3{##2}{##3}}}% \parindent=0in \advance\leftskip by \defbodyindent \exdentamount=\defbodyindent \begingroup\obeylines\activeparens\spacesplit{#3{#5}{#6}}} \def\defopparsebody #1#2#3#4#5 {\begingroup\inENV % \medbreak % % Define the end token that this defining construct specifies % so that it will exit this group. \def#1{\endgraf\endgroup\medbreak}% \def#2##1 ##2 {\def#4{##1}% \begingroup\obeylines\activeparens\spacesplit{#3{##2}}}% \parindent=0in \advance\leftskip by \defbodyindent \exdentamount=\defbodyindent \begingroup\obeylines\activeparens\spacesplit{#3{#5}}} % These parsing functions are similar to the preceding ones % except that they do not make parens into active characters. % These are used for "variables" since they have no arguments. \def\defvarparsebody #1#2#3{\begingroup\inENV% Environment for definitionbody \medbreak % % Define the end token that this defining construct specifies % so that it will exit this group. \def#1{\endgraf\endgroup\medbreak}% \def#2{\begingroup\obeylines\spacesplit#3}% \parindent=0in \advance\leftskip by \defbodyindent \exdentamount=\defbodyindent \begingroup % \catcode 61=\active % \obeylines\spacesplit#3} % This is used for \def{tp,vr}parsebody. It could probably be used for % some of the others, too, with some judicious conditionals. % \def\parsebodycommon#1#2#3{% \begingroup\inENV % \medbreak % % Define the end token that this defining construct specifies % so that it will exit this group. \def#1{\endgraf\endgroup\medbreak}% \def#2##1 {\begingroup\obeylines\spacesplit{#3{##1}}}% \parindent=0in \advance\leftskip by \defbodyindent \exdentamount=\defbodyindent \begingroup\obeylines } \def\defvrparsebody#1#2#3#4 {% \parsebodycommon{#1}{#2}{#3}% \spacesplit{#3{#4}}% } % This loses on `@deftp {Data Type} {struct termios}' -- it thinks the % type is just `struct', because we lose the braces in `{struct % termios}' when \spacesplit reads its undelimited argument. Sigh. % \let\deftpparsebody=\defvrparsebody % % So, to get around this, we put \empty in with the type name. That % way, TeX won't find exactly `{...}' as an undelimited argument, and % won't strip off the braces. % \def\deftpparsebody #1#2#3#4 {% \parsebodycommon{#1}{#2}{#3}% \spacesplit{\parsetpheaderline{#3{#4}}}\empty } % Fine, but then we have to eventually remove the \empty *and* the % braces (if any). That's what this does. % \def\removeemptybraces\empty#1\relax{#1} % After \spacesplit has done its work, this is called -- #1 is the final % thing to call, #2 the type name (which starts with \empty), and #3 % (which might be empty) the arguments. % \def\parsetpheaderline#1#2#3{% #1{\removeemptybraces#2\relax}{#3}% }% \def\defopvarparsebody #1#2#3#4#5 {\begingroup\inENV % \medbreak % % Define the end token that this defining construct specifies % so that it will exit this group. \def#1{\endgraf\endgroup\medbreak}% \def#2##1 ##2 {\def#4{##1}% \begingroup\obeylines\spacesplit{#3{##2}}}% \parindent=0in \advance\leftskip by \defbodyindent \exdentamount=\defbodyindent \begingroup\obeylines\spacesplit{#3{#5}}} % Split up #2 at the first space token. % call #1 with two arguments: % the first is all of #2 before the space token, % the second is all of #2 after that space token. % If #2 contains no space token, all of it is passed as the first arg % and the second is passed as empty. {\obeylines \gdef\spacesplit#1#2^^M{\endgroup\spacesplitfoo{#1}#2 \relax\spacesplitfoo}% \long\gdef\spacesplitfoo#1#2 #3#4\spacesplitfoo{% \ifx\relax #3% #1{#2}{}\else #1{#2}{#3#4}\fi}} % So much for the things common to all kinds of definitions. % Define @defun. % First, define the processing that is wanted for arguments of \defun % Use this to expand the args and terminate the paragraph they make up \def\defunargs#1{\functionparens \sl % Expand, preventing hyphenation at `-' chars. % Note that groups don't affect changes in \hyphenchar. % Set the font temporarily and use \font in case \setfont made \tensl a macro. {\tensl\hyphenchar\font=0}% #1% {\tensl\hyphenchar\font=45}% \ifnum\parencount=0 \else \errmessage{Unbalanced parentheses in @def}\fi% \interlinepenalty=10000 \advance\rightskip by 0pt plus 1fil \endgraf\nobreak\vskip -\parskip\nobreak } \def\deftypefunargs #1{% % Expand, preventing hyphenation at `-' chars. % Note that groups don't affect changes in \hyphenchar. % Use \boldbraxnoamp, not \functionparens, so that & is not special. \boldbraxnoamp \tclose{#1}% avoid \code because of side effects on active chars \interlinepenalty=10000 \advance\rightskip by 0pt plus 1fil \endgraf\nobreak\vskip -\parskip\nobreak } % Do complete processing of one @defun or @defunx line already parsed. % @deffn Command forward-char nchars \def\deffn{\defmethparsebody\Edeffn\deffnx\deffnheader} \def\deffnheader #1#2#3{\doind {fn}{\code{#2}}% \begingroup\defname {#2}{#1}\defunargs{#3}\endgroup % \catcode 61=\other % Turn off change made in \defparsebody } % @defun == @deffn Function \def\defun{\defparsebody\Edefun\defunx\defunheader} \def\defunheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index \begingroup\defname {#1}{\putwordDeffunc}% \defunargs {#2}\endgroup % \catcode 61=\other % Turn off change made in \defparsebody } % @deftypefun int foobar (int @var{foo}, float @var{bar}) \def\deftypefun{\defparsebody\Edeftypefun\deftypefunx\deftypefunheader} % #1 is the data type. #2 is the name and args. \def\deftypefunheader #1#2{\deftypefunheaderx{#1}#2 \relax} % #1 is the data type, #2 the name, #3 the args. \def\deftypefunheaderx #1#2 #3\relax{% \doind {fn}{\code{#2}}% Make entry in function index \begingroup\defname {\defheaderxcond#1\relax$$$#2}{\putwordDeftypefun}% \deftypefunargs {#3}\endgroup % \catcode 61=\other % Turn off change made in \defparsebody } % @deftypefn {Library Function} int foobar (int @var{foo}, float @var{bar}) \def\deftypefn{\defmethparsebody\Edeftypefn\deftypefnx\deftypefnheader} % \defheaderxcond#1\relax$$$ % puts #1 in @code, followed by a space, but does nothing if #1 is null. \def\defheaderxcond#1#2$$${\ifx#1\relax\else\code{#1#2} \fi} % #1 is the classification. #2 is the data type. #3 is the name and args. \def\deftypefnheader #1#2#3{\deftypefnheaderx{#1}{#2}#3 \relax} % #1 is the classification, #2 the data type, #3 the name, #4 the args. \def\deftypefnheaderx #1#2#3 #4\relax{% \doind {fn}{\code{#3}}% Make entry in function index \begingroup \normalparens % notably, turn off `&' magic, which prevents % at least some C++ text from working \defname {\defheaderxcond#2\relax$$$#3}{#1}% \deftypefunargs {#4}\endgroup % \catcode 61=\other % Turn off change made in \defparsebody } % @defmac == @deffn Macro \def\defmac{\defparsebody\Edefmac\defmacx\defmacheader} \def\defmacheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index \begingroup\defname {#1}{\putwordDefmac}% \defunargs {#2}\endgroup % \catcode 61=\other % Turn off change made in \defparsebody } % @defspec == @deffn Special Form \def\defspec{\defparsebody\Edefspec\defspecx\defspecheader} \def\defspecheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index \begingroup\defname {#1}{\putwordDefspec}% \defunargs {#2}\endgroup % \catcode 61=\other % Turn off change made in \defparsebody } % @defop CATEGORY CLASS OPERATION ARG... % \def\defop #1 {\def\defoptype{#1}% \defopparsebody\Edefop\defopx\defopheader\defoptype} % \def\defopheader#1#2#3{% \dosubind {fn}{\code{#2}}{\putwordon\ #1}% Make entry in function index \begingroup\defname {#2}{\defoptype\ \putwordon\ #1}% \defunargs {#3}\endgroup % } % @deftypeop CATEGORY CLASS TYPE OPERATION ARG... % \def\deftypeop #1 {\def\deftypeopcategory{#1}% \deftypeopparsebody\Edeftypeop\deftypeopx\deftypeopheader \deftypeopcategory} % % #1 is the class name, #2 the data type, #3 the operation name, #4 the args. \def\deftypeopheader#1#2#3#4{% \dosubind{fn}{\code{#3}}{\putwordon\ \code{#1}}% entry in function index \begingroup \defname{\defheaderxcond#2\relax$$$#3} {\deftypeopcategory\ \putwordon\ \code{#1}}% \deftypefunargs{#4}% \endgroup } % @deftypemethod CLASS TYPE METHOD ARG... % \def\deftypemethod{% \deftypemethparsebody\Edeftypemethod\deftypemethodx\deftypemethodheader} % % #1 is the class name, #2 the data type, #3 the method name, #4 the args. \def\deftypemethodheader#1#2#3#4{% \dosubind{fn}{\code{#3}}{\putwordon\ \code{#1}}% entry in function index \begingroup \defname{\defheaderxcond#2\relax$$$#3}{\putwordMethodon\ \code{#1}}% \deftypefunargs{#4}% \endgroup } % @deftypeivar CLASS TYPE VARNAME % \def\deftypeivar{% \deftypemethparsebody\Edeftypeivar\deftypeivarx\deftypeivarheader} % % #1 is the class name, #2 the data type, #3 the variable name. \def\deftypeivarheader#1#2#3{% \dosubind{vr}{\code{#3}}{\putwordof\ \code{#1}}% entry in variable index \begingroup \defname{\defheaderxcond#2\relax$$$#3} {\putwordInstanceVariableof\ \code{#1}}% \defvarargs{#3}% \endgroup } % @defmethod == @defop Method % \def\defmethod{\defmethparsebody\Edefmethod\defmethodx\defmethodheader} % % #1 is the class name, #2 the method name, #3 the args. \def\defmethodheader#1#2#3{% \dosubind{fn}{\code{#2}}{\putwordon\ \code{#1}}% entry in function index \begingroup \defname{#2}{\putwordMethodon\ \code{#1}}% \defunargs{#3}% \endgroup } % @defcv {Class Option} foo-class foo-flag \def\defcv #1 {\def\defcvtype{#1}% \defopvarparsebody\Edefcv\defcvx\defcvarheader\defcvtype} \def\defcvarheader #1#2#3{% \dosubind {vr}{\code{#2}}{\putwordof\ #1}% Make entry in var index \begingroup\defname {#2}{\defcvtype\ \putwordof\ #1}% \defvarargs {#3}\endgroup % } % @defivar CLASS VARNAME == @defcv {Instance Variable} CLASS VARNAME % \def\defivar{\defvrparsebody\Edefivar\defivarx\defivarheader} % \def\defivarheader#1#2#3{% \dosubind {vr}{\code{#2}}{\putwordof\ #1}% entry in var index \begingroup \defname{#2}{\putwordInstanceVariableof\ #1}% \defvarargs{#3}% \endgroup } % @defvar % First, define the processing that is wanted for arguments of @defvar. % This is actually simple: just print them in roman. % This must expand the args and terminate the paragraph they make up \def\defvarargs #1{\normalparens #1% \interlinepenalty=10000 \endgraf\nobreak\vskip -\parskip\nobreak} % @defvr Counter foo-count \def\defvr{\defvrparsebody\Edefvr\defvrx\defvrheader} \def\defvrheader #1#2#3{\doind {vr}{\code{#2}}% \begingroup\defname {#2}{#1}\defvarargs{#3}\endgroup} % @defvar == @defvr Variable \def\defvar{\defvarparsebody\Edefvar\defvarx\defvarheader} \def\defvarheader #1#2{\doind {vr}{\code{#1}}% Make entry in var index \begingroup\defname {#1}{\putwordDefvar}% \defvarargs {#2}\endgroup % } % @defopt == @defvr {User Option} \def\defopt{\defvarparsebody\Edefopt\defoptx\defoptheader} \def\defoptheader #1#2{\doind {vr}{\code{#1}}% Make entry in var index \begingroup\defname {#1}{\putwordDefopt}% \defvarargs {#2}\endgroup % } % @deftypevar int foobar \def\deftypevar{\defvarparsebody\Edeftypevar\deftypevarx\deftypevarheader} % #1 is the data type. #2 is the name, perhaps followed by text that % is actually part of the data type, which should not be put into the index. \def\deftypevarheader #1#2{% \dovarind#2 \relax% Make entry in variables index \begingroup\defname {\defheaderxcond#1\relax$$$#2}{\putwordDeftypevar}% \interlinepenalty=10000 \endgraf\nobreak\vskip -\parskip\nobreak \endgroup} \def\dovarind#1 #2\relax{\doind{vr}{\code{#1}}} % @deftypevr {Global Flag} int enable \def\deftypevr{\defvrparsebody\Edeftypevr\deftypevrx\deftypevrheader} \def\deftypevrheader #1#2#3{\dovarind#3 \relax% \begingroup\defname {\defheaderxcond#2\relax$$$#3}{#1} \interlinepenalty=10000 \endgraf\nobreak\vskip -\parskip\nobreak \endgroup} % Now define @deftp % Args are printed in bold, a slight difference from @defvar. \def\deftpargs #1{\bf \defvarargs{#1}} % @deftp Class window height width ... \def\deftp{\deftpparsebody\Edeftp\deftpx\deftpheader} \def\deftpheader #1#2#3{\doind {tp}{\code{#2}}% \begingroup\defname {#2}{#1}\deftpargs{#3}\endgroup} % These definitions are used if you use @defunx (etc.) % anywhere other than immediately after a @defun or @defunx. % \def\defcvx#1 {\errmessage{@defcvx in invalid context}} \def\deffnx#1 {\errmessage{@deffnx in invalid context}} \def\defivarx#1 {\errmessage{@defivarx in invalid context}} \def\defmacx#1 {\errmessage{@defmacx in invalid context}} \def\defmethodx#1 {\errmessage{@defmethodx in invalid context}} \def\defoptx #1 {\errmessage{@defoptx in invalid context}} \def\defopx#1 {\errmessage{@defopx in invalid context}} \def\defspecx#1 {\errmessage{@defspecx in invalid context}} \def\deftpx#1 {\errmessage{@deftpx in invalid context}} \def\deftypefnx#1 {\errmessage{@deftypefnx in invalid context}} \def\deftypefunx#1 {\errmessage{@deftypefunx in invalid context}} \def\deftypeivarx#1 {\errmessage{@deftypeivarx in invalid context}} \def\deftypemethodx#1 {\errmessage{@deftypemethodx in invalid context}} \def\deftypeopx#1 {\errmessage{@deftypeopx in invalid context}} \def\deftypevarx#1 {\errmessage{@deftypevarx in invalid context}} \def\deftypevrx#1 {\errmessage{@deftypevrx in invalid context}} \def\defunx#1 {\errmessage{@defunx in invalid context}} \def\defvarx#1 {\errmessage{@defvarx in invalid context}} \def\defvrx#1 {\errmessage{@defvrx in invalid context}} \message{macros,} % @macro. % To do this right we need a feature of e-TeX, \scantokens, % which we arrange to emulate with a temporary file in ordinary TeX. \ifx\eTeXversion\undefined \newwrite\macscribble \def\scanmacro#1{% \begingroup \newlinechar`\^^M % Undo catcode changes of \startcontents and \doprintindex \catcode`\@=0 \catcode`\\=12 \escapechar=`\@ % Append \endinput to make sure that TeX does not see the ending newline. \toks0={#1\endinput}% \immediate\openout\macscribble=\jobname.tmp \immediate\write\macscribble{\the\toks0}% \immediate\closeout\macscribble \let\xeatspaces\eatspaces \input \jobname.tmp \endgroup } \else \def\scanmacro#1{% \begingroup \newlinechar`\^^M % Undo catcode changes of \startcontents and \doprintindex \catcode`\@=0 \catcode`\\=12 \escapechar=`\@ \let\xeatspaces\eatspaces\scantokens{#1\endinput}\endgroup} \fi \newcount\paramno % Count of parameters \newtoks\macname % Macro name \newif\ifrecursive % Is it recursive? \def\macrolist{} % List of all defined macros in the form % \do\macro1\do\macro2... % Utility routines. % Thisdoes \let #1 = #2, except with \csnames. \def\cslet#1#2{% \expandafter\expandafter \expandafter\let \expandafter\expandafter \csname#1\endcsname \csname#2\endcsname} % Trim leading and trailing spaces off a string. % Concepts from aro-bend problem 15 (see CTAN). {\catcode`\@=11 \gdef\eatspaces #1{\expandafter\trim@\expandafter{#1 }} \gdef\trim@ #1{\trim@@ @#1 @ #1 @ @@} \gdef\trim@@ #1@ #2@ #3@@{\trim@@@\empty #2 @} \def\unbrace#1{#1} \unbrace{\gdef\trim@@@ #1 } #2@{#1} } % Trim a single trailing ^^M off a string. {\catcode`\^^M=12\catcode`\Q=3% \gdef\eatcr #1{\eatcra #1Q^^MQ}% \gdef\eatcra#1^^MQ{\eatcrb#1Q}% \gdef\eatcrb#1Q#2Q{#1}% } % Macro bodies are absorbed as an argument in a context where % all characters are catcode 10, 11 or 12, except \ which is active % (as in normal texinfo). It is necessary to change the definition of \. % It's necessary to have hard CRs when the macro is executed. This is % done by making ^^M (\endlinechar) catcode 12 when reading the macro % body, and then making it the \newlinechar in \scanmacro. \def\macrobodyctxt{% \catcode`\~=12 \catcode`\^=12 \catcode`\_=12 \catcode`\|=12 \catcode`\<=12 \catcode`\>=12 \catcode`\+=12 \catcode`\{=12 \catcode`\}=12 \catcode`\@=12 \catcode`\^^M=12 \usembodybackslash} \def\macroargctxt{% \catcode`\~=12 \catcode`\^=12 \catcode`\_=12 \catcode`\|=12 \catcode`\<=12 \catcode`\>=12 \catcode`\+=12 \catcode`\@=12 \catcode`\\=12} % \mbodybackslash is the definition of \ in @macro bodies. % It maps \foo\ => \csname macarg.foo\endcsname => #N % where N is the macro parameter number. % We define \csname macarg.\endcsname to be \realbackslash, so % \\ in macro replacement text gets you a backslash. {\catcode`@=0 @catcode`@\=@active @gdef@usembodybackslash{@let\=@mbodybackslash} @gdef@mbodybackslash#1\{@csname macarg.#1@endcsname} } \expandafter\def\csname macarg.\endcsname{\realbackslash} \def\macro{\recursivefalse\parsearg\macroxxx} \def\rmacro{\recursivetrue\parsearg\macroxxx} \def\macroxxx#1{% \getargs{#1}% now \macname is the macname and \argl the arglist \ifx\argl\empty % no arguments \paramno=0% \else \expandafter\parsemargdef \argl;% \fi \if1\csname ismacro.\the\macname\endcsname \message{Warning: redefining \the\macname}% \else \expandafter\ifx\csname \the\macname\endcsname \relax \else \errmessage{The name \the\macname\space is reserved}\fi \global\cslet{macsave.\the\macname}{\the\macname}% \global\expandafter\let\csname ismacro.\the\macname\endcsname=1% % Add the macroname to \macrolist \toks0 = \expandafter{\macrolist\do}% \xdef\macrolist{\the\toks0 \expandafter\noexpand\csname\the\macname\endcsname}% \fi \begingroup \macrobodyctxt \ifrecursive \expandafter\parsermacbody \else \expandafter\parsemacbody \fi} \def\unmacro{\parsearg\unmacroxxx} \def\unmacroxxx#1{% \if1\csname ismacro.#1\endcsname \global\cslet{#1}{macsave.#1}% \global\expandafter\let \csname ismacro.#1\endcsname=0% % Remove the macro name from \macrolist \begingroup \edef\tempa{\expandafter\noexpand\csname#1\endcsname}% \def\do##1{% \def\tempb{##1}% \ifx\tempa\tempb % remove this \else \toks0 = \expandafter{\newmacrolist\do}% \edef\newmacrolist{\the\toks0\expandafter\noexpand\tempa}% \fi}% \def\newmacrolist{}% % Execute macro list to define \newmacrolist \macrolist \global\let\macrolist\newmacrolist \endgroup \else \errmessage{Macro #1 not defined}% \fi } % This makes use of the obscure feature that if the last token of a % is #, then the preceding argument is delimited by % an opening brace, and that opening brace is not consumed. \def\getargs#1{\getargsxxx#1{}} \def\getargsxxx#1#{\getmacname #1 \relax\getmacargs} \def\getmacname #1 #2\relax{\macname={#1}} \def\getmacargs#1{\def\argl{#1}} % Parse the optional {params} list. Set up \paramno and \paramlist % so \defmacro knows what to do. Define \macarg.blah for each blah % in the params list, to be ##N where N is the position in that list. % That gets used by \mbodybackslash (above). % We need to get `macro parameter char #' into several definitions. % The technique used is stolen from LaTeX: let \hash be something % unexpandable, insert that wherever you need a #, and then redefine % it to # just before using the token list produced. % % The same technique is used to protect \eatspaces till just before % the macro is used. \def\parsemargdef#1;{\paramno=0\def\paramlist{}% \let\hash\relax\let\xeatspaces\relax\parsemargdefxxx#1,;,} \def\parsemargdefxxx#1,{% \if#1;\let\next=\relax \else \let\next=\parsemargdefxxx \advance\paramno by 1% \expandafter\edef\csname macarg.\eatspaces{#1}\endcsname {\xeatspaces{\hash\the\paramno}}% \edef\paramlist{\paramlist\hash\the\paramno,}% \fi\next} % These two commands read recursive and nonrecursive macro bodies. % (They're different since rec and nonrec macros end differently.) \long\def\parsemacbody#1@end macro% {\xdef\temp{\eatcr{#1}}\endgroup\defmacro}% \long\def\parsermacbody#1@end rmacro% {\xdef\temp{\eatcr{#1}}\endgroup\defmacro}% % This defines the macro itself. There are six cases: recursive and % nonrecursive macros of zero, one, and many arguments. % Much magic with \expandafter here. % \xdef is used so that macro definitions will survive the file % they're defined in; @include reads the file inside a group. \def\defmacro{% \let\hash=##% convert placeholders to macro parameter chars \ifrecursive \ifcase\paramno % 0 \expandafter\xdef\csname\the\macname\endcsname{% \noexpand\scanmacro{\temp}}% \or % 1 \expandafter\xdef\csname\the\macname\endcsname{% \bgroup\noexpand\macroargctxt \noexpand\braceorline \expandafter\noexpand\csname\the\macname xxx\endcsname}% \expandafter\xdef\csname\the\macname xxx\endcsname##1{% \egroup\noexpand\scanmacro{\temp}}% \else % many \expandafter\xdef\csname\the\macname\endcsname{% \bgroup\noexpand\macroargctxt \noexpand\csname\the\macname xx\endcsname}% \expandafter\xdef\csname\the\macname xx\endcsname##1{% \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}% \expandafter\expandafter \expandafter\xdef \expandafter\expandafter \csname\the\macname xxx\endcsname \paramlist{\egroup\noexpand\scanmacro{\temp}}% \fi \else \ifcase\paramno % 0 \expandafter\xdef\csname\the\macname\endcsname{% \noexpand\norecurse{\the\macname}% \noexpand\scanmacro{\temp}\egroup}% \or % 1 \expandafter\xdef\csname\the\macname\endcsname{% \bgroup\noexpand\macroargctxt \noexpand\braceorline \expandafter\noexpand\csname\the\macname xxx\endcsname}% \expandafter\xdef\csname\the\macname xxx\endcsname##1{% \egroup \noexpand\norecurse{\the\macname}% \noexpand\scanmacro{\temp}\egroup}% \else % many \expandafter\xdef\csname\the\macname\endcsname{% \bgroup\noexpand\macroargctxt \expandafter\noexpand\csname\the\macname xx\endcsname}% \expandafter\xdef\csname\the\macname xx\endcsname##1{% \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}% \expandafter\expandafter \expandafter\xdef \expandafter\expandafter \csname\the\macname xxx\endcsname \paramlist{% \egroup \noexpand\norecurse{\the\macname}% \noexpand\scanmacro{\temp}\egroup}% \fi \fi} \def\norecurse#1{\bgroup\cslet{#1}{macsave.#1}} % \braceorline decides whether the next nonwhitespace character is a % {. If so it reads up to the closing }, if not, it reads the whole % line. Whatever was read is then fed to the next control sequence % as an argument (by \parsebrace or \parsearg) \def\braceorline#1{\let\next=#1\futurelet\nchar\braceorlinexxx} \def\braceorlinexxx{% \ifx\nchar\bgroup\else \expandafter\parsearg \fi \next} % We mant to disable all macros during \shipout so that they are not % expanded by \write. \def\turnoffmacros{\begingroup \def\do##1{\let\noexpand##1=\relax}% \edef\next{\macrolist}\expandafter\endgroup\next} % @alias. % We need some trickery to remove the optional spaces around the equal % sign. Just make them active and then expand them all to nothing. \def\alias{\begingroup\obeyspaces\parsearg\aliasxxx} \def\aliasxxx #1{\aliasyyy#1\relax} \def\aliasyyy #1=#2\relax{\ignoreactivespaces \edef\next{\global\let\expandafter\noexpand\csname#1\endcsname=% \expandafter\noexpand\csname#2\endcsname}% \expandafter\endgroup\next} \message{cross references,} % @xref etc. \newwrite\auxfile \newif\ifhavexrefs % True if xref values are known. \newif\ifwarnedxrefs % True if we warned once that they aren't known. % @inforef is relatively simple. \def\inforef #1{\inforefzzz #1,,,,**} \def\inforefzzz #1,#2,#3,#4**{\putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}}, node \samp{\ignorespaces#1{}}} % @node's job is to define \lastnode. \def\node{\ENVcheck\parsearg\nodezzz} \def\nodezzz#1{\nodexxx [#1,]} \def\nodexxx[#1,#2]{\gdef\lastnode{#1}} \let\nwnode=\node \let\lastnode=\relax % The sectioning commands (@chapter, etc.) call these. \def\donoderef{% \ifx\lastnode\relax\else \expandafter\expandafter\expandafter\setref{\lastnode}% {Ysectionnumberandtype}% \global\let\lastnode=\relax \fi } \def\unnumbnoderef{% \ifx\lastnode\relax\else \expandafter\expandafter\expandafter\setref{\lastnode}{Ynothing}% \global\let\lastnode=\relax \fi } \def\appendixnoderef{% \ifx\lastnode\relax\else \expandafter\expandafter\expandafter\setref{\lastnode}% {Yappendixletterandtype}% \global\let\lastnode=\relax \fi } % @anchor{NAME} -- define xref target at arbitrary point. % \newcount\savesfregister \gdef\savesf{\relax \ifhmode \savesfregister=\spacefactor \fi} \gdef\restoresf{\relax \ifhmode \spacefactor=\savesfregister \fi} \gdef\anchor#1{\savesf \setref{#1}{Ynothing}\restoresf \ignorespaces} % \setref{NAME}{SNT} defines a cross-reference point NAME, namely % NAME-title, NAME-pg, and NAME-SNT. Called from \foonoderef. We have % to set \indexdummies so commands such as @code in a section title % aren't expanded. It would be nicer not to expand the titles in the % first place, but there's so many layers that that is hard to do. % \def\setref#1#2{{% \indexdummies \pdfmkdest{#1}% \dosetq{#1-title}{Ytitle}% \dosetq{#1-pg}{Ypagenumber}% \dosetq{#1-snt}{#2}% }} % @xref, @pxref, and @ref generate cross-references. For \xrefX, #1 is % the node name, #2 the name of the Info cross-reference, #3 the printed % node name, #4 the name of the Info file, #5 the name of the printed % manual. All but the node name can be omitted. % \def\pxref#1{\putwordsee{} \xrefX[#1,,,,,,,]} \def\xref#1{\putwordSee{} \xrefX[#1,,,,,,,]} \def\ref#1{\xrefX[#1,,,,,,,]} \def\xrefX[#1,#2,#3,#4,#5,#6]{\begingroup \unsepspaces \def\printedmanual{\ignorespaces #5}% \def\printednodename{\ignorespaces #3}% \setbox1=\hbox{\printedmanual}% \setbox0=\hbox{\printednodename}% \ifdim \wd0 = 0pt % No printed node name was explicitly given. \expandafter\ifx\csname SETxref-automatic-section-title\endcsname\relax % Use the node name inside the square brackets. \def\printednodename{\ignorespaces #1}% \else % Use the actual chapter/section title appear inside % the square brackets. Use the real section title if we have it. \ifdim \wd1 > 0pt % It is in another manual, so we don't have it. \def\printednodename{\ignorespaces #1}% \else \ifhavexrefs % We know the real title if we have the xref values. \def\printednodename{\refx{#1-title}{}}% \else % Otherwise just copy the Info node name. \def\printednodename{\ignorespaces #1}% \fi% \fi \fi \fi % % If we use \unhbox0 and \unhbox1 to print the node names, TeX does not % insert empty discretionaries after hyphens, which means that it will % not find a line break at a hyphen in a node names. Since some manuals % are best written with fairly long node names, containing hyphens, this % is a loss. Therefore, we give the text of the node name again, so it % is as if TeX is seeing it for the first time. \ifpdf \leavevmode \getfilename{#4}% \ifnum\filenamelength>0 \startlink attr{/Border [0 0 0]}% goto file{\the\filename.pdf} name{#1@}% \else \startlink attr{/Border [0 0 0]}% goto name{#1@}% \fi \linkcolor \fi % \ifdim \wd1 > 0pt \putwordsection{} ``\printednodename'' \putwordin{} \cite{\printedmanual}% \else % _ (for example) has to be the character _ for the purposes of the % control sequence corresponding to the node, but it has to expand % into the usual \leavevmode...\vrule stuff for purposes of % printing. So we \turnoffactive for the \refx-snt, back on for the % printing, back off for the \refx-pg. {\normalturnoffactive % Only output a following space if the -snt ref is nonempty; for % @unnumbered and @anchor, it won't be. \setbox2 = \hbox{\ignorespaces \refx{#1-snt}{}}% \ifdim \wd2 > 0pt \refx{#1-snt}\space\fi }% % [mynode], [\printednodename],\space % page 3 \turnoffactive \putwordpage\tie\refx{#1-pg}{}% \fi \endlink \endgroup} % \dosetq is the interface for calls from other macros % Use \normalturnoffactive so that punctuation chars such as underscore % and backslash work in node names. (\turnoffactive doesn't do \.) \def\dosetq#1#2{% {\let\folio=0% \normalturnoffactive \edef\next{\write\auxfile{\internalsetq{#1}{#2}}}% \iflinks \next \fi }% } % \internalsetq {foo}{page} expands into % CHARACTERS 'xrdef {foo}{...expansion of \Ypage...} % When the aux file is read, ' is the escape character \def\internalsetq #1#2{'xrdef {#1}{\csname #2\endcsname}} % Things to be expanded by \internalsetq \def\Ypagenumber{\folio} \def\Ytitle{\thissection} \def\Ynothing{} \def\Ysectionnumberandtype{% \ifnum\secno=0 \putwordChapter\xreftie\the\chapno % \else \ifnum \subsecno=0 \putwordSection\xreftie\the\chapno.\the\secno % \else \ifnum \subsubsecno=0 % \putwordSection\xreftie\the\chapno.\the\secno.\the\subsecno % \else % \putwordSection\xreftie\the\chapno.\the\secno.\the\subsecno.\the\subsubsecno % \fi \fi \fi } \def\Yappendixletterandtype{% \ifnum\secno=0 \putwordAppendix\xreftie'char\the\appendixno{}% \else \ifnum \subsecno=0 \putwordSection\xreftie'char\the\appendixno.\the\secno % \else \ifnum \subsubsecno=0 % \putwordSection\xreftie'char\the\appendixno.\the\secno.\the\subsecno % \else % \putwordSection\xreftie'char\the\appendixno.\the\secno.\the\subsecno.\the\subsubsecno % \fi \fi \fi } \gdef\xreftie{'tie} % Use TeX 3.0's \inputlineno to get the line number, for better error % messages, but if we're using an old version of TeX, don't do anything. % \ifx\inputlineno\thisisundefined \let\linenumber = \empty % Non-3.0. \else \def\linenumber{\the\inputlineno:\space} \fi % Define \refx{NAME}{SUFFIX} to reference a cross-reference string named NAME. % If its value is nonempty, SUFFIX is output afterward. \def\refx#1#2{% \expandafter\ifx\csname X#1\endcsname\relax % If not defined, say something at least. \angleleft un\-de\-fined\angleright \iflinks \ifhavexrefs \message{\linenumber Undefined cross reference `#1'.}% \else \ifwarnedxrefs\else \global\warnedxrefstrue \message{Cross reference values unknown; you must run TeX again.}% \fi \fi \fi \else % It's defined, so just use it. \csname X#1\endcsname \fi #2% Output the suffix in any case. } % This is the macro invoked by entries in the aux file. % \def\xrdef#1{\begingroup % Reenable \ as an escape while reading the second argument. \catcode`\\ = 0 \afterassignment\endgroup \expandafter\gdef\csname X#1\endcsname } % Read the last existing aux file, if any. No error if none exists. \def\readauxfile{\begingroup \catcode`\^^@=\other \catcode`\^^A=\other \catcode`\^^B=\other \catcode`\^^C=\other \catcode`\^^D=\other \catcode`\^^E=\other \catcode`\^^F=\other \catcode`\^^G=\other \catcode`\^^H=\other \catcode`\^^K=\other \catcode`\^^L=\other \catcode`\^^N=\other \catcode`\^^P=\other \catcode`\^^Q=\other \catcode`\^^R=\other \catcode`\^^S=\other \catcode`\^^T=\other \catcode`\^^U=\other \catcode`\^^V=\other \catcode`\^^W=\other \catcode`\^^X=\other \catcode`\^^Z=\other \catcode`\^^[=\other \catcode`\^^\=\other \catcode`\^^]=\other \catcode`\^^^=\other \catcode`\^^_=\other \catcode`\@=\other \catcode`\^=\other % It was suggested to define this as 7, which would allow ^^e4 etc. % in xref tags, i.e., node names. But since ^^e4 notation isn't % supported in the main text, it doesn't seem desirable. Furthermore, % that is not enough: for node names that actually contain a ^ % character, we would end up writing a line like this: 'xrdef {'hat % b-title}{'hat b} and \xrdef does a \csname...\endcsname on the first % argument, and \hat is not an expandable control sequence. It could % all be worked out, but why? Either we support ^^ or we don't. % % The other change necessary for this was to define \auxhat: % \def\auxhat{\def^{'hat }}% extra space so ok if followed by letter % and then to call \auxhat in \setq. % \catcode`\~=\other \catcode`\[=\other \catcode`\]=\other \catcode`\"=\other \catcode`\_=\other \catcode`\|=\other \catcode`\<=\other \catcode`\>=\other \catcode`\$=\other \catcode`\#=\other \catcode`\&=\other \catcode`+=\other % avoid \+ for paranoia even though we've turned it off % Make the characters 128-255 be printing characters {% \count 1=128 \def\loop{% \catcode\count 1=\other \advance\count 1 by 1 \ifnum \count 1<256 \loop \fi }% }% % The aux file uses ' as the escape (for now). % Turn off \ as an escape so we do not lose on % entries which were dumped with control sequences in their names. % For example, 'xrdef {$\leq $-fun}{page ...} made by @defun ^^ % Reference to such entries still does not work the way one would wish, % but at least they do not bomb out when the aux file is read in. \catcode`\{=1 \catcode`\}=2 \catcode`\%=\other \catcode`\'=0 \catcode`\\=\other % \openin 1 \jobname.aux \ifeof 1 \else \closein 1 \input \jobname.aux \global\havexrefstrue \global\warnedobstrue \fi % Open the new aux file. TeX will close it automatically at exit. \openout\auxfile=\jobname.aux \endgroup} % Footnotes. \newcount \footnoteno % The trailing space in the following definition for supereject is % vital for proper filling; pages come out unaligned when you do a % pagealignmacro call if that space before the closing brace is % removed. (Generally, numeric constants should always be followed by a % space to prevent strange expansion errors.) \def\supereject{\par\penalty -20000\footnoteno =0 } % @footnotestyle is meaningful for info output only. \let\footnotestyle=\comment \let\ptexfootnote=\footnote {\catcode `\@=11 % % Auto-number footnotes. Otherwise like plain. \gdef\footnote{% \global\advance\footnoteno by \@ne \edef\thisfootno{$^{\the\footnoteno}$}% % % In case the footnote comes at the end of a sentence, preserve the % extra spacing after we do the footnote number. \let\@sf\empty \ifhmode\edef\@sf{\spacefactor\the\spacefactor}\/\fi % % Remove inadvertent blank space before typesetting the footnote number. \unskip \thisfootno\@sf \footnotezzz }% % Don't bother with the trickery in plain.tex to not require the % footnote text as a parameter. Our footnotes don't need to be so general. % % Oh yes, they do; otherwise, @ifset and anything else that uses % \parseargline fail inside footnotes because the tokens are fixed when % the footnote is read. --karl, 16nov96. % \long\gdef\footnotezzz{\insert\footins\bgroup % We want to typeset this text as a normal paragraph, even if the % footnote reference occurs in (for example) a display environment. % So reset some parameters. \interlinepenalty\interfootnotelinepenalty \splittopskip\ht\strutbox % top baseline for broken footnotes \splitmaxdepth\dp\strutbox \floatingpenalty\@MM \leftskip\z@skip \rightskip\z@skip \spaceskip\z@skip \xspaceskip\z@skip \parindent\defaultparindent % \smallfonts \rm % % Hang the footnote text off the number. \hang \textindent{\thisfootno}% % % Don't crash into the line above the footnote text. Since this % expands into a box, it must come within the paragraph, lest it % provide a place where TeX can split the footnote. \footstrut \futurelet\next\fo@t } \def\fo@t{\ifcat\bgroup\noexpand\next \let\next\f@@t \else\let\next\f@t\fi \next} \def\f@@t{\bgroup\aftergroup\@foot\let\next} \def\f@t#1{#1\@foot} \def\@foot{\strut\par\egroup} }%end \catcode `\@=11 % Set the baselineskip to #1, and the lineskip and strut size % correspondingly. There is no deep meaning behind these magic numbers % used as factors; they just match (closely enough) what Knuth defined. % \def\lineskipfactor{.08333} \def\strutheightpercent{.70833} \def\strutdepthpercent {.29167} % \def\setleading#1{% \normalbaselineskip = #1\relax \normallineskip = \lineskipfactor\normalbaselineskip \normalbaselines \setbox\strutbox =\hbox{% \vrule width0pt height\strutheightpercent\baselineskip depth \strutdepthpercent \baselineskip }% } % @| inserts a changebar to the left of the current line. It should % surround any changed text. This approach does *not* work if the % change spans more than two lines of output. To handle that, we would % have adopt a much more difficult approach (putting marks into the main % vertical list for the beginning and end of each change). % \def\|{% % \vadjust can only be used in horizontal mode. \leavevmode % % Append this vertical mode material after the current line in the output. \vadjust{% % We want to insert a rule with the height and depth of the current % leading; that is exactly what \strutbox is supposed to record. \vskip-\baselineskip % % \vadjust-items are inserted at the left edge of the type. So % the \llap here moves out into the left-hand margin. \llap{% % % For a thicker or thinner bar, change the `1pt'. \vrule height\baselineskip width1pt % % This is the space between the bar and the text. \hskip 12pt }% }% } % For a final copy, take out the rectangles % that mark overfull boxes (in case you have decided % that the text looks ok even though it passes the margin). % \def\finalout{\overfullrule=0pt} % @image. We use the macros from epsf.tex to support this. % If epsf.tex is not installed and @image is used, we complain. % % Check for and read epsf.tex up front. If we read it only at @image % time, we might be inside a group, and then its definitions would get % undone and the next image would fail. \openin 1 = epsf.tex \ifeof 1 \else \closein 1 % Do not bother showing banner with post-v2.7 epsf.tex (available in % doc/epsf.tex until it shows up on ctan). \def\epsfannounce{\toks0 = }% \input epsf.tex \fi % % We will only complain once about lack of epsf.tex. \newif\ifwarnednoepsf \newhelp\noepsfhelp{epsf.tex must be installed for images to work. It is also included in the Texinfo distribution, or you can get it from ftp://tug.org/tex/epsf.tex.} % \def\image#1{% \ifx\epsfbox\undefined \ifwarnednoepsf \else \errhelp = \noepsfhelp \errmessage{epsf.tex not found, images will be ignored}% \global\warnednoepsftrue \fi \else \imagexxx #1,,,\finish \fi } % % Arguments to @image: % #1 is (mandatory) image filename; we tack on .eps extension. % #2 is (optional) width, #3 is (optional) height. % #4 is just the usual extra ignored arg for parsing this stuff. \def\imagexxx#1,#2,#3,#4\finish{% \ifpdf \centerline{\dopdfimage{#1}{#2}{#3}}% \else % \epsfbox itself resets \epsf?size at each figure. \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \epsfxsize=#2\relax \fi \setbox0 = \hbox{\ignorespaces #3}\ifdim\wd0 > 0pt \epsfysize=#3\relax \fi \begingroup \catcode`\^^M = 5 % in case we're inside an example % If the image is by itself, center it. \ifvmode \nobreak\bigskip % Usually we'll have text after the image which will insert % \parskip glue, so insert it here too to equalize the space % above and below. \nobreak\vskip\parskip \nobreak \centerline{\epsfbox{#1.eps}}% \bigbreak \else % In the middle of a paragraph, no extra space. \epsfbox{#1.eps}% \fi \endgroup \fi } \message{localization,} % and i18n. % @documentlanguage is usually given very early, just after % @setfilename. If done too late, it may not override everything % properly. Single argument is the language abbreviation. % It would be nice if we could set up a hyphenation file here. % \def\documentlanguage{\parsearg\dodocumentlanguage} \def\dodocumentlanguage#1{% \tex % read txi-??.tex file in plain TeX. % Read the file if it exists. \openin 1 txi-#1.tex \ifeof1 \errhelp = \nolanghelp \errmessage{Cannot read language file txi-#1.tex}% \let\temp = \relax \else \def\temp{\input txi-#1.tex }% \fi \temp \endgroup } \newhelp\nolanghelp{The given language definition file cannot be found or is empty. Maybe you need to install it? In the current directory should work if nowhere else does.} % @documentencoding should change something in TeX eventually, most % likely, but for now just recognize it. \let\documentencoding = \comment % Page size parameters. % \newdimen\defaultparindent \defaultparindent = 15pt \chapheadingskip = 15pt plus 4pt minus 2pt \secheadingskip = 12pt plus 3pt minus 2pt \subsecheadingskip = 9pt plus 2pt minus 2pt % Prevent underfull vbox error messages. \vbadness = 10000 % Don't be so finicky about underfull hboxes, either. \hbadness = 2000 % Following George Bush, just get rid of widows and orphans. \widowpenalty=10000 \clubpenalty=10000 % Use TeX 3.0's \emergencystretch to help line breaking, but if we're % using an old version of TeX, don't do anything. We want the amount of % stretch added to depend on the line length, hence the dependence on % \hsize. We call this whenever the paper size is set. % \def\setemergencystretch{% \ifx\emergencystretch\thisisundefined % Allow us to assign to \emergencystretch anyway. \def\emergencystretch{\dimen0}% \else \emergencystretch = .15\hsize \fi } % Parameters in order: 1) textheight; 2) textwidth; 3) voffset; % 4) hoffset; 5) binding offset; 6) topskip. Then whoever calls us can % set \parskip and call \setleading for \baselineskip. % \def\internalpagesizes#1#2#3#4#5#6{% \voffset = #3\relax \topskip = #6\relax \splittopskip = \topskip % \vsize = #1\relax \advance\vsize by \topskip \outervsize = \vsize \advance\outervsize by 2\topandbottommargin \pageheight = \vsize % \hsize = #2\relax \outerhsize = \hsize \advance\outerhsize by 0.5in \pagewidth = \hsize % \normaloffset = #4\relax \bindingoffset = #5\relax % \parindent = \defaultparindent \setemergencystretch } % @letterpaper (the default). \def\letterpaper{{\globaldefs = 1 \parskip = 3pt plus 2pt minus 1pt \setleading{13.2pt}% % % If page is nothing but text, make it come out even. \internalpagesizes{46\baselineskip}{6in}{\voffset}{.25in}{\bindingoffset}{36pt}% }} % Use @smallbook to reset parameters for 7x9.5 (or so) format. \def\smallbook{{\globaldefs = 1 \parskip = 2pt plus 1pt \setleading{12pt}% % \internalpagesizes{7.5in}{5.in}{\voffset}{.25in}{\bindingoffset}{16pt}% % \lispnarrowing = 0.3in \tolerance = 700 \hfuzz = 1pt \contentsrightmargin = 0pt \deftypemargin = 0pt \defbodyindent = .5cm % \let\smalldisplay = \smalldisplayx \let\smallexample = \smalllispx \let\smallformat = \smallformatx \let\smalllisp = \smalllispx }} % Use @afourpaper to print on European A4 paper. \def\afourpaper{{\globaldefs = 1 \setleading{12pt}% \parskip = 3pt plus 2pt minus 1pt % \internalpagesizes{53\baselineskip}{160mm}{\voffset}{4mm}{\bindingoffset}{44pt}% % \tolerance = 700 \hfuzz = 1pt }} % A specific text layout, 24x15cm overall, intended for A4 paper. Top margin % 29mm, hence bottom margin 28mm, nominal side margin 3cm. \def\afourlatex{{\globaldefs = 1 \setleading{13.6pt}% % \afourpaper \internalpagesizes{237mm}{150mm}{3.6mm}{3.6mm}{3mm}{7mm}% % \globaldefs = 0 }} % Use @afourwide to print on European A4 paper in wide format. \def\afourwide{% \afourpaper \internalpagesizes{6.5in}{9.5in}{\hoffset}{\normaloffset}{\bindingoffset}{7mm}% % \globaldefs = 0 } % @pagesizes TEXTHEIGHT[,TEXTWIDTH] % Perhaps we should allow setting the margins, \topskip, \parskip, % and/or leading, also. Or perhaps we should compute them somehow. % \def\pagesizes{\parsearg\pagesizesxxx} \def\pagesizesxxx#1{\pagesizesyyy #1,,\finish} \def\pagesizesyyy#1,#2,#3\finish{{% \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \hsize=#2\relax \fi \globaldefs = 1 % \parskip = 3pt plus 2pt minus 1pt \setleading{13.2pt}% % \internalpagesizes{#1}{\hsize}{\voffset}{\normaloffset}{\bindingoffset}{44pt}% }} % Set default to letter. % \letterpaper \message{and turning on texinfo input format.} % Define macros to output various characters with catcode for normal text. \catcode`\"=\other \catcode`\~=\other \catcode`\^=\other \catcode`\_=\other \catcode`\|=\other \catcode`\<=\other \catcode`\>=\other \catcode`\+=\other \catcode`\$=\other \def\normaldoublequote{"} \def\normaltilde{~} \def\normalcaret{^} \def\normalunderscore{_} \def\normalverticalbar{|} \def\normalless{<} \def\normalgreater{>} \def\normalplus{+} \def\normaldollar{$} % This macro is used to make a character print one way in ttfont % where it can probably just be output, and another way in other fonts, % where something hairier probably needs to be done. % % #1 is what to print if we are indeed using \tt; #2 is what to print % otherwise. Since all the Computer Modern typewriter fonts have zero % interword stretch (and shrink), and it is reasonable to expect all % typewriter fonts to have this, we can check that font parameter. % \def\ifusingtt#1#2{\ifdim \fontdimen3\font=0pt #1\else #2\fi} % Same as above, but check for italic font. Actually this also catches % non-italic slanted fonts since it is impossible to distinguish them from % italic fonts. But since this is only used by $ and it uses \sl anyway % this is not a problem. \def\ifusingit#1#2{\ifdim \fontdimen1\font>0pt #1\else #2\fi} % Turn off all special characters except @ % (and those which the user can use as if they were ordinary). % Most of these we simply print from the \tt font, but for some, we can % use math or other variants that look better in normal text. \catcode`\"=\active \def\activedoublequote{{\tt\char34}} \let"=\activedoublequote \catcode`\~=\active \def~{{\tt\char126}} \chardef\hat=`\^ \catcode`\^=\active \def^{{\tt \hat}} \catcode`\_=\active \def_{\ifusingtt\normalunderscore\_} % Subroutine for the previous macro. \def\_{\leavevmode \kern.06em \vbox{\hrule width.3em height.1ex}} \catcode`\|=\active \def|{{\tt\char124}} \chardef \less=`\< \catcode`\<=\active \def<{{\tt \less}} \chardef \gtr=`\> \catcode`\>=\active \def>{{\tt \gtr}} \catcode`\+=\active \def+{{\tt \char 43}} \catcode`\$=\active \def${\ifusingit{{\sl\$}}\normaldollar} %\catcode 27=\active %\def^^[{$\diamondsuit$} % Set up an active definition for =, but don't enable it most of the time. {\catcode`\==\active \global\def={{\tt \char 61}}} \catcode`+=\active \catcode`\_=\active % If a .fmt file is being used, characters that might appear in a file % name cannot be active until we have parsed the command line. % So turn them off again, and have \everyjob (or @setfilename) turn them on. % \otherifyactive is called near the end of this file. \def\otherifyactive{\catcode`+=\other \catcode`\_=\other} \catcode`\@=0 % \rawbackslashxx output one backslash character in current font \global\chardef\rawbackslashxx=`\\ %{\catcode`\\=\other %@gdef@rawbackslashxx{\}} % \rawbackslash redefines \ as input to do \rawbackslashxx. {\catcode`\\=\active @gdef@rawbackslash{@let\=@rawbackslashxx }} % \normalbackslash outputs one backslash in fixed width font. \def\normalbackslash{{\tt\rawbackslashxx}} % \catcode 17=0 % Define control-q \catcode`\\=\active % Used sometimes to turn off (effectively) the active characters % even after parsing them. @def@turnoffactive{@let"=@normaldoublequote @let\=@realbackslash @let~=@normaltilde @let^=@normalcaret @let_=@normalunderscore @let|=@normalverticalbar @let<=@normalless @let>=@normalgreater @let+=@normalplus @let$=@normaldollar} @def@normalturnoffactive{@let"=@normaldoublequote @let\=@normalbackslash @let~=@normaltilde @let^=@normalcaret @let_=@normalunderscore @let|=@normalverticalbar @let<=@normalless @let>=@normalgreater @let+=@normalplus @let$=@normaldollar} % Make _ and + \other characters, temporarily. % This is canceled by @fixbackslash. @otherifyactive % If a .fmt file is being used, we don't want the `\input texinfo' to show up. % That is what \eatinput is for; after that, the `\' should revert to printing % a backslash. % @gdef@eatinput input texinfo{@fixbackslash} @global@let\ = @eatinput % On the other hand, perhaps the file did not have a `\input texinfo'. Then % the first `\{ in the file would cause an error. This macro tries to fix % that, assuming it is called before the first `\' could plausibly occur. % Also back turn on active characters that might appear in the input % file name, in case not using a pre-dumped format. % @gdef@fixbackslash{% @ifx\@eatinput @let\ = @normalbackslash @fi @catcode`+=@active @catcode`@_=@active } % Say @foo, not \foo, in error messages. @escapechar = `@@ % These look ok in all fonts, so just make them not special. @catcode`@& = @other @catcode`@# = @other @catcode`@% = @other @c Set initial fonts. @textfonts @rm @c Local variables: @c eval: (add-hook 'write-file-hooks 'time-stamp) @c page-delimiter: "^\\\\message" @c time-stamp-start: "def\\\\texinfoversion{" @c time-stamp-format: "%:y-%02m-%02d.%02H" @c time-stamp-end: "}" @c End: aalib-1.4.0/doc/aalib.texinfo0000644000766200001440000017235207272031253011477 \input texinfo @c -*-texinfo-*- @c Use A4 paper - If you don't like that, remove the following 3 lines. @iftex @afourpaper @end iftex @setfilename aalib.info @settitle An ascii-art library @dircategory Libraries @direntry * AA-lib: (aalib). An ASCII-art graphics library @end direntry @ifinfo @copyright{} 1997 Jan Hubicka & Kamil Toman Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies. @end ifinfo @c %**end of header @set VERSION 1.4 @set DATE Apr 17, 2001 @titlepage @title{AA-lib @value{VERSION}} @subtitle{An ascii-art library} @subtitle{API-DESCRIPTION} @author{Jan Hubi@v cka & Kamil Toman} @tex Dukelsk\'ych bojovn\'\i ku 1944 @end tex @* 390 03 T@'abor @* Czech Republic Email: @code{hubicka@@freesoft.cz} @value{DATE} @page @vskip 0pt plus 1filll @tex { \font\btt=cmtt12\space scaled\magstep 4 \btt \centerline{ \ \ \ \ \ dT8\ \ 8Tb\ \ \ \ \ }\br\medskip \centerline{ \ \ \ \ dT\ 8\ \ 8\ Tb\ \ \ \ }\br\medskip \centerline{ \ \ \ dT\ \ 8\ \ 8\ \ Tb\ \ \ }\br\medskip \centerline{ }\br\medskip \centerline{ \ dT\ \ \ \ 8\ \ 8\ \ \ \ Tb\ }\br\medskip \centerline{ dT@ \ \ \ \ 8\ \ 8\ \ \ \ \ Tb}\br\medskip } @end tex @vskip 0pt plus 1filll @copyright{} 1997 @tex Jan Hubi\v cka \& Kamil Toman @end tex Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies. @end titlepage @c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @node Top, Overview, (dir), (dir) @ifinfo @top AA-lib @value{VERSION} @flushright 1.2 An ascii-art library API DESCRIPTION @value{DATE} @end flushright @end ifinfo @menu * Overview:: What does this software do then ? * AA-Project:: You want join ? * Skeleton:: AA-lib program skeleton:: * Initialization:: How to start up AA-lib? * Drawing image:: How to draw image? * Rendering:: Rendering of image into ascii-art * Flushing:: Flushing into screen and text output functions * Keyboard:: Handling keyboard * Mouse:: Handling mouse * Resizing:: Resizing of display * Other functions:: Functions that was not documented yet. * Designing new driver::How to port AA-lib to new platform * Reference:: All AA-lib functions and variables. * Index:: Index of functions, types, macros and constants @end menu @ifinfo @example .,. _. . .%qwmy1(/. . _x]WWWK1==s,_,- `.amWWWWWZ13x|:=|@{?W#Ee==++=_ _jmWBWWWB@}l=:;:.<%|!??+;- ~.;==, _ud$WWWW#Xecc_|=-::<3@{~ . . .. ;::_ ++|>@{?+X*bSx%>`=: ..-<:-. . . -:==i, ....:`---+|+@{S=..-=:...= ` .....-|:. .. .-- . ..::;:=:+. . . .._--;=: . .:;==|=|=|||:: .......:<,=.=:+==. .. .::==|||iilxil|;::_=:+::=<(-+==. - .: .:;==+| ;)s .--`__,:- -:==|+|xoS2oo22ooX2Xa,.^x. i. -~~ . .::;===+|I12SSnnSXSXmX#s, +,. -` .. -- . ----+++|||II@}**!!!!|> '...., .,. .::.. . ..-:===::. :=%i3XWWWWWWWW#?? ...:-:::::... . .:+*Y?YXo=|3XWWWWBW[ .....:...........:.=nZmWms;=IX##### .............:-~+1s%X#####2s...... ........:+*1SX####XSommWWWWWWW[.+=:=:s%= QQQWL.. -@{1;...:.-.. . .......--+=i+== . . . . . . .......... -:=+lxSXXZ#Z?`.:::::.:==::===;= . . .. . .. . . . ...:=|lvn@}!...:.....:==<|:<|saaw QWQWQQWQWm#Qwa_, .. .... .:;~~ .......:=sawwWWWWWQWWWWW Honza Hubicka _a,an@}|^-=-:._._ .aJ#XS*||:::--::;=>=|_. ._JZSo1|+:;;:::.:.:=||===:.. _=nn31@}=,==:..::.:::__=====;... .=+"!+i%*+==::-:;=<;==+<+==.. .. .__|+~_;>`. . ..:===|:==-; . .--~-~~...-- ..:.;::+====>==_ . .. : . ....-+|;-:=+li===|!+:... :. . ...:::i||iixi|==;=|_._.. ..; . ...:.==|ixxunnns%iiaoouis%,=:== . ....:==iiv22XXXZZ#ZmZXXXdupoz=<> ........::=|ilvn2S2ZZ#####ZZZXZ#Xx=u>. . . . . .-:;=iill11X2X#m###mmZXzIl>@{`I`; ... ..-::;=|||illvv3XXXXXX#XmoS;==::-.. . . ...=====|i|||+"""~~++*1SoXs,-::... ......---===;. ..:=|i>"@{2S( ;_....--+._=us_J1s.+s; -. .. . . . :@{m, =|::::==xxoXzXonX(:x( ... ` ..... . . .:xZXc`|||=||ln2ZX'Snvc . . . ..:l=.innnn1xIiixnIIIl' . . _.:.-|linxvl|` . -~-++iii|iivvl||| . ....__|ixxxIvIi=|Il . . .::=|i%nnonnvI+=v1nl ...:=|Innn1@}+||vvnvv; ....:+++=xivvnnnno> . .:;=ivvnnvvno2o` . .. ..: . :=+|iIxvnvo2e';,. ...:<+:. ...-- . ..==iivlvIn1".|=:;.. . . -:: .::. ...=|iliIli~ =|`:<:/.. .. . n;: . . .::=|+~ :=+;;:.: : Kamil Toman @end example @end ifinfo @c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @node Overview, AA-Project, Top, Top @chapter Overview @menu * Why?:: Why such library? * What?:: What does this software do then? * History:: How this all started? @end menu @node Why?, What?, Overview, Overview @section Why such library? I vote for simplicity. There are many problems of various kinds with video cards, low frequency monitors, crashing graphical apps@dots{} AA-lib IS the solution. It works on a terminal of any kind, it is fast and portable, it gives to you standard API. It gives to your old hardware more power! @c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @node What?, History, Why?, Overview @comment node-name, next, previous, up @section What does this software do then ? AA-lib is a low level gfx library just as many other libraries are. The main difference is that AA-lib does not require graphics device. In fact, there is no graphical output possible. AA-lib replaces those old-fashioned output methods with powerful ascii-art renderer. Now my linux boots with a nice penguin logo at secondary display (yes! Like Win95 does:) AA-lib API is designed to be similar to other graphics libraries. Learning a new API would be a piece of cake! @c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @node History, , What?, Overview @section How this all started Once upon a time we've (my friend Kamil and I) bought two old Herculeses as secondary monitors. We didn't know for that time that our Diamond Stealths 64 cards would become obsolete soon. The next day we downloaded the logo of Linux Texas Users Group - nice silly penguin looking like a cowboy! It was so exciting logo ... we decided that we couldn't live without it and we wanted to see it at boot time as a logo on our secondary monitors. There was a small problem - Hercules doesn't support color graphics. So we decided to convert the penguin image to ascii art using netpbm tools. The output was very ugly because the converting algorithm was absolutly stupid. During the night I designed a new convertor that used a font bitmap to create an aproximation table. The output wasn't very good since the algorithm wasn't tuned so well. Many months this small piece of code was waiting on my disc for the day "D". Meanwhile I started a new project XaoS (a fractal zoomer) with my friend Thomas. And then I got an idea: Ascii Art Mandelbrots! I was really impressed by the result! XaoS was faster, portable and looking much better than ever before. I found a new way to go @dots{} @c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @node AA-Project, Skeleton, Overview, Top @chapter AA-Project @ifinfo @center @ @ @ @ @ dT8@ @ 8Tb@ @ @ @ @ @* @center @ @ @ @ dT@ 8@ @ 8@ Tb@ @ @ @ @* @center @ @ @ dT@ @ 8@ @ 8@ @ Tb@ @ @ @* @center @* @center @ dT@ @ @ @ 8@ @ 8@ @ @ @ Tb@ @* @center dT@ @ @ @ @ 8@ @ 8@ @ @ @ @ Tb@* @end ifinfo @tex %{ %\tt %\centerline{ \ \ \ \ \ dT8\ \ 8Tb\ \ \ \ \ }\br %\centerline{ \ \ \ \ dT\ 8\ \ 8\ Tb\ \ \ \ }\br %\centerline{ \ \ \ dT\ \ 8\ \ 8\ \ Tb\ \ \ }\br %\centerline{ }\br %\centerline{ \ dT\ \ \ \ 8\ \ 8\ \ \ \ Tb\ }\br %\centerline{ dT@ \ \ \ \ 8\ \ 8\ \ \ \ \ Tb}\br %} @end tex Three goals of AA-Project: @enumerate @item Port all important software (like Doom, Second Reality, X windows etc..) on AA-lib. @item Port AA-lib on all available platforms (mainly ZX-Spectrum and Sharp). @item Force IBM to start manufacturing MDA cards again. @end enumerate AA-project was started by Jan Hubicka. In that times just a few people knew about it. Then a new demo named BB has been relased to show the power of AA-lib technology. Now the project is freely available and anyone can help. Just join our mailing list: @code{aa-project-discuss@@lists.sourceforge.net}. Or just browse our homepage at @code{http://aa-project.sourceforge.net}. A ton of examples of ascii-art generated by aalib, pointers to other AA-Project resources etc. @c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @node Skeleton, Initialization , AA-Project, Top @chapter AA-lib program skeleton Following piece of code you may want to use as base for your future AA-lib program: @example #include int main (int argc, char **argv) @{ aa_context *context; /* The information about currently initialized device. */ aa_palette palette; /* Emulatted palette (optional) */ char *framebuffer; /* Parse command line options and output the help text. */ if (!aa_parseoptions (NULL, NULL, &argc, argv) || argc != 1) @{ printf ("%s", aa_help); exit (1); @} /* Initialize output driver. */ context = aa_autoinit (&aa_defparams); if (context == NULL) @{ printf ("Failed to initialize aalib\n"); exit (1); @} /* Pointer to the emulated videoram. */ framebuffer = aa_image (context); /* Create palette if needed: */ for (i = 0; i < 256; i++) aa_setpalette (palette, i, /* R value 0..255 */ , /* G value 0..255 */ , /* B value 0..255 */ ); /* Draw something using: */ aa_putpixel (context, /* X coord */ , /* Y coord */ , /* Color */ ); /* Render whole screen: */ aa_renderpalette (context, palette, aa_defrenderparams, /* Top left conner of rendered area: */ 0, 0, /* Bottom right */ aa_scrwidth (context), aa_scrheight (context)); /* If you don't use palette use following function: aa_render (context, aa_defrenderparams, 0, 0, aa_scrwidth (context), aa_scrheight (context)); */ /* And make it visible: */ aa_flush (context); /* And uninitialize the AA_lib (this probably makes the picture invisible again) */ aa_close (context); return 1; @} @end example @c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @node Initialization, Drawing image , Skeleton, Top @chapter Initialization It is possible to initialize AA-lib in various modes. The main initialization is done by following @code{aa_init} @findex aa_init @findex aa_context @example aa_context *aa_init(struct aa_driver *@var{driver}, struct aa_hardware_params *@var{defparams}, void *@var{driverdata}) @end example This function prepares @code{aa_context *} type variable used by all AA-lib functions. The @var{driver} parameter specifies hardware driver to initialize, @var{defparams} parameters of hardware you require and @var{driverdata} is used to pass implementation dependent extra information to the hardware driver. To undo all actions done by @code{aa_init} function, call @code{aa_close}: @findex aa_close @example aa_close(aa_context *@var{context}) @end example This function frees allocated memory for @code{aa_context} and call's unintialize function of the output drivers. Initializing AA-lib directly is non-trivial task. Many display drivers and modes are available. Several helper functions are provided to do this job for you. @ifinfo You may want initialize AA-lib in one of the following modes: @menu * Initialization as a normal graphics library:: * Initialization as an ascii art renderer:: * Initialization for image saving:: * Specifying hardware parameters:: @end menu @end ifinfo @c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @node Initialization as a normal graphics library, Initialization as an ascii art renderer, Initialization, Initialization @comment node-name, next, previous, up @section Initialization as normal graphics library If you initialize AA-lib as a normal graphics library you can use one of available hardware drivers. It initializes a display device and sets the output to the screen. Hardware drivers depend on a platform you are running at, configuration of your computer and many other things. Typically more than one driver is available. AA-lib can make the decision for you if you use @code{aa_autoinit} function: @findex aa_autoinit @example aa_context *aa_autoinit(struct aa_hardware_params *@var{params}) @end example This function initializes the hardware driver and returns @code{aa_context} structure used by other functions. @code{NULL} is returned on failure. Parameter @var{params} is used to specify hardware parameters you require. @menu * Easy initialization of AA-lib:: * Parsing of command line options:: * How does the autodetection work:: * Recommending drivers:: @end menu @c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @node Easy initialization of AA-lib,Parsing of command line options,Initialization as a normal graphics library,Initialization as a normal graphics library @comment node-name, next, previous, up @subsection Easy initialization of AA-lib Following example is the most trivial way to initialize AA-lib. @example #include #include aa_context *context; void main(void) @{ aa_parseoptions (NULL, NULL, NULL, NULL); /* Every AA-lib program ought to call the aa_perseoptions at least in this way to make the AAOPTS environment variable work. */ context = aa_autoinit(&aa_defparams); if(context == NULL) @{ fprintf(stderr,"Cannot initialize AA-lib. Sorry\n"); exit(1); @} ... aa_close(context); @} @end example This code will do all autodetection/initialization stuff for you and it will fire up AA-lib (using default parameters). Because AA-lib supports output driver using ordinarry stdio functions, the failure is very unlikely, but you ought to check it. @c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @node Parsing of command line options,How does the autodetection work,Easy initialization of AA-lib,Initialization as a normal graphics library @comment node-name, next, previous, up @subsection Parsing of command line options AA-lib works at many different output devices so it can be initialized with many different options. Somebody might want to change the defaults. This can be done using command line options. This is done using function @code{aa_parseoptions} that uses @code{argc/argv} variables and parses options for AA-lib. The options for AA-lib are removed during parsing from @code{argc/argv} so call to aa_parseoptions can preceede the normal command line options parsing code done by your program. @code{aa_help} variable contains help about options parsed by @code{aa_parseoptions}. @findex aa_parseoptions @example int aa_parseoptions(aa_hardwareparams *@var{p}, aa_renderparams *@var{r}, int *@var{argc}, char **@var{argv}); @end example First parameter is used for AA-lib initialization. It specifies the hardware parameters you require and is altered by @code{aa_parseoptions}. It is expected that your program will define his prefered parameters first, call @code{aa_parseoptions} and then alter it only when necessary to make program working correctly. If you don't brother about the hardware specification, you may use @code{aa_defparams} variable in both places (here and as passed to @code{aa_init} function familly). You may also pass NULL to use defaults (aa_defparams variable). The second argument is set of parameters for rendering. It works in similar way as the first parameters. Both of this variables will be explained later. Use NULL to force defaults (aa_defrenderparams). Fuction returns: @code{1} if OK or @code{0} on error. The function returns 1 on sucess and 0 on failure. @example #include #include aa_context *context; void main(int argc, char **argv) @{ if(!aa_parseoptions(NULL, NULL, &argc, argv) || argc!=1) @{ printf("Usage: %s [options]\n" "Options:\n" "%s", argv[0], aa_help); exit(1); @} context = aa_autoinit(&aa_defparams); if(context == NULL) @{ fprintf(stderr,"Cannot initialize AA-lib. Sorry\n"); exit(2); @} ... aa_close(context); @} @end example Note that options are parsed from command line and also from @code{AAOPTS} enviroment variable. This makes possible to set parameters for all AA-Lib programs. If you pass @code{NULL} as @code{argc/argv} only the enviroment variable is parsed. @page @findex aa_help Variable @code{aa_help} contains help string similiar to this one: @example -driver select driver available drivers:linux slang X11 -kbddriver select keyboard driver available drivers:slang X11 -kbddriver select mouse driver available drivers:X11 gpm Size options: -width set width -height set height -minwidth set minimal width -minheight set minimal height -maxwidth set maximal width -maxheight set maximal height -recwidth set recomended width -recheight set recomended height Attributes: -dim enable usage of dim (half bright) attribute -bold enable usage of bold (double bright) attribute -reverse enable usage of reverse attribute -normal enable usage of normal attribute -boldfont enable usage of boldfont attrubute -no disable (i.e -nobold) Font rendering options: -extended use all 256 characters -eight use eight bit ascii -font select font(This option have effect just on hardwares where aalib is unable to determine current font available fonts:vga8 vga9 mda14 vga14 X8x13 X8x16 X8x13bold vgagl8 line Rendering options: -inverse enable inverse rendering -noinverse disable inverse rendering -bright set bright (0-255) -contrast set contrast (0-255) -gamma set gamma correction value(0-1) Ditherng options: -nodither disable dithering -floyd_steinberg floyd steinberg dithering -error_distribution error distribution dithering -random set random dithering value(0-inf) @end example @tex \vskip 0pt plus 1filll @end tex @page @c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @node How does the autodetection work,Recommending drivers,Parsing of command line options, Initialization as a normal graphics library @comment node-name, next, previous, up @subsection How does the autodetection work To fully understand customizing of @code{aa_autoinit} you have to know (at least something) how does the autodetection work. All hardware drivers are stored in @code{aa_drivers} array --- array of pointers to drivers terminated by @code{NULL} pointer. Order is significant. First driver is tested before the second etc. It is possible to customize your own order of drivers. This can be done using @code{aa_displayrecomended} list. It's a double linked list of strings that are interpreted as names of drivers. These drivers are tested before @code{aa_drivers} is procesed. There are several reasons to do it this way. Firstly, this "aditional" list is passed before the first of "standard array" drivers is used. Thus you can recommend the probing order of drivers in a very natural and comfortable way. Second, this method reduces executable file size. Third, you can prefer different drivers on different platforms with no aditional care about current configuration of AA-lib. @c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @node Recommending drivers,,How does the autodetection work, Initialization as a normal graphics library @comment node-name, next, previous, up @subsection Recommending drivers Manipulation with recomended drivers (@code{aa_displayrecomended} list) can be done using macros: @findex aa_recomendhidisplay @findex aa_recomendlowdisplay @findex aa_displayrecomended @example aa_recomendhidisplay(@var{name}) aa_recomendlowdisplay(@var{name}) @end example @code{aa_displayrecomended} is a cyclic list. You can easily add drivers to the begining (using @code{aa_recomendhidisplay(name)}) or to the end using @code{aa_recomendlowdisplay(name)}. In other words @code{aa_recomendhidisplay} inserts with "high priority". (at the beggining of the list). The check for duplicity is performed. Despite @code{aa_recomendhidisplay(name)}, that moves an existing display to the begining, function @code{aa_recomendlowdisplay(name)} inserts to the end. Thus nothing can lower the required priority of your driver. This two priorities are usefull in many situations. For example: many display drivers recomend keyboard or mouse drivers (it's a good idea use @code{curses} keyboard when @code{curses} display driver is used). But some users may want to change it --- for example they might want to drive an aplication from a script and they might want to use @code{stdin} keyboard driver instead of @code{X11} recomended by @code{X11} driver. The following piece of code: @example aa_recomendhidisplay ("testa1"); aa_recomendlowdisplay("teste1"); aa_recomendhidisplay ("testa2"); aa_recomendlowdisplay("teste2"); aa_recomendlowdisplay("teste1"); aa_recomendhidisplay ("teste1"); @end example will produce the following list: @example teste1, testa2, testa1, teste1 teste2 @end example And autoprobing will first test in order all drivers on the lists (if such drivers exist in current AA-lib configuration) and then try all available drivers in the default order. @c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @node Initialization as an ascii art renderer, Initialization for image saving, Initialization as a normal graphics library, Initialization @comment node-name, next, previous, up @section Initialization as an ascii art renderer If you want to use just AA-lib's rendering routines but no output to screen (eg. you have your own output routines) you can use dummy memory driver. It's named @code{mem_d} and it's initialization should look like this: @findex mem_d @example context = aa_init(@var{mem_d},&@var{aa_defparams},NULL); @end example @c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @node Initialization for image saving,Specifying hardware parameters , Initialization as an ascii art renderer, Initialization @comment node-name, next, previous, up @section Initialization for image saving @findex save_d AA-Lib also have a driver specialized for image saving. It's name is @code{save_d}(currently only driver that uses @code{aa_savedata} structure): @findex aa_savedata @example struct aa_savedata @{ char *name; struct aa_format *format; FILE *file; @}; @end example Field @code{name} contains a filename (without extension). If you wish to specify file descriptor, you might want to use field @code{file} instead. Set @code{name} to @code{NULL} in this cases. Note that then file will not be closed automatically. In @code{name} you should use following tags: @table @samp @item %x X coordinate of page, if pages enabled otherwise none @item %y Y coordinate of page, if pages enabled otherwise none @item %c Coordinates in format: @code{_%x_%y}, if pages enabled otherwise none @item %e Default extension (like @code{.html}) @end table @code{Format} is a pointer to @code{aa_format} structure (format information): @findex aa_format @example struct aa_format @{ int width, height; /*@r{default width/height}*/ int pagewidth, pageheight;/*@r{in case output is made from pages}*/ int flags; /*@r{should be made from:} AA_USE_PAGES AA_NORMAL_SPACES */ int supported; /*@r{mask of supported attributes}*/ struct aa_font *font; /*@r{font used by hardware device}*/ char *formatname; /*@r{name of format}*/ char *extension; /*@r{file extension}*/ char *head; /*@r{text at the beggining of file}*/ char *end; /*@r{text at the end of file}*/ char *newline; /*@r{text at the end of line}*/ char *prints[AA_NATTRS]; /*@r{printf seqence for printing character}*/ char *begin[AA_NATTRS]; /*@r{text printed at the beggining of block} @r{of character at gived attribute}*/ char *ends[AA_NATTRS]; /*@r{text printed at the end of block}*/ char **conversions /*@r{conversion tabe}*/ @}; @end example Conversions is array of strings in format: character, replacement, terminated by @code{NULL}. Following code is an example of @code{HTML} format description: @findex aa_html_format @example static char *html_escapes[] = @{"<", "<", ">", ">", "&", "&", NULL@}; struct aa_format aa_html_format = @{ 79, 25, 0, 0, 0, AA_NORMAL_MASK | AA_BOLD_MASK | AA_BOLDFONT_MASK, NULL, "Pure html", ".html", "\n Ascii arted image done using aalib\n\n
\n",
      "
\n\n", "\n", /*The order is:normal, dim, bold, boldfont, reverse, special*/ @{ "%s", "%s", "%s", "%s", "%s", @}, @{"", "", "", "", "" @}, @{"", "", "", "", "" @}, html_escapes @}; @end example @findex aa_html_format @findex aa_html_alt_format @findex aa_irc_format @findex aa_zephyr_format @findex aa_nhtml_format @findex aa_more_format @findex aa_ansi_format @findex aa_hp_format @findex aa_hp2_format @findex aa_text_format Usually you don't need to worry about filling in this large structure since the formats are already defined: @code{aa_nhtml_format}, @code{aa_html_format}, @code{aa_html_alt_format}, @code{aa_ansi_format}, @code{aa_text_format}, @code{aa_more_format}, @code{aa_hp_format}, @code{aa_hp2_format}, @code{aa_zephyr_format}, @code{aa_irc_format}. All formats are collected in @code{aa_formats} array. It is array of pointers to @code{aa_format} terminated by @code{NULL} All additional new formats are welcomed. @c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @node Specifying hardware parameters,,Initialization for image saving, Initialization @comment node-name, next, previous, up @section Specifying hardware parameters In previous examples we used @code{aa_defparams} without description. This variable says to AA-lib what hardware do you expect. @findex aa_hardwareparams @findex aa_hardware_params @findex aa_defparams @example struct aa_hardware_params @{ struct aa_font *font; int supported; int minwidth, minheight; int maxwidth, maxheight; int recwidth, recheight; int mmwidth, mmheight; int width, height; @}; @end example Filed @code{font} contains the default font. If your driver is unable to autodetect the font used by the output device (such as terminal drivers or most of saving drivers), you may want to select one of the fonts compiled into aalib. @findex font8 @findex fontgl @findex font14 @findex font9 @findex font16 @findex fontlinux @findex fontX13 @findex fontX13B @findex fontX16 Following fonts are available: @code{font8}, @code{font14}, @code{font16}, @code{font9}, @code{fontline}, @code{fontgl}, @code{fontX13}, @code{fontX16}, @code{fontX13B}. If you specify @code{NULL} as an argument @code{font16} is used. Integer @code{supported} contains a mask. Following masks are available: @findex AA_NORMAL_MASK @findex AA_DIM_MASK @findex AA_BOLD_MASK @findex AA_BOLDFONT_MASK @findex AA_REVERSE_MASK @findex AA_EXTENDED @findex AA_ALL @findex AA_EIGHT @code{AA_NORMAL_MASK}, @code{AA_DIM_MASK}, @code{AA_BOLD_MASK}, @code{AA_BOLDFONT_MASK}, @code{AA_REVERSE_MASK}. You can use @code{AA_EXTENDED} to enable all 256 of characters or @code{AA_EIGHT} to enable using of characters numbered higher than 127. This should be set also after the initialization using @code{aa_setsupported} Other fields are used to specify the display size. If your program requires a fixed size of the display you should set @code{width},@code{height} fields (otherwise expect problems ;). You can also adjust how tolerant AA-lib should be. Minimum is set by @code{minwidth/minheight}, maximum is set by @code{maxwidth/maxheight}. Then you can set @code{width/height} parameters and call the init function. The nearest value (in specified bounds `coz) will be set. If all these fields are set to zero (default) hardware drivers prompt user for the size and memory/save drivers will set some defaults. Hardware drivers also have default values(forced by enter). If you wanted to modify them you'd have to set @code{recwidth/recheight}. Note that @code{minwidth/minheight} and @code{maxwidth/maxheight} still have an effect even if @code{width/height} is zero. It is recomended to set all the parameters that can be alternated by user just before @code{aa_parseoptions} is called, so options can't be changed. @code{mmwidth/mmheight} should be used to specify size of window in milimeters (but it is ignored by all drivers now ;). @c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @node Drawing image, Rendering , Initialization, Top @chapter How to draw an image? @findex aa_imgwidth @findex aa_imgheight @findex aa_putpixel @findex aa_image AA-lib emulates video-ram so it looks just like a plain memory. It contains @code{aa_imgheight (context)} lines of @code{aa_imgwidth(context)} bytes where each of them specifies a grayscale value or an index to a colormap (or graymap ?). Pointer to this memory can be obtained using @code{aa_image(context)} macro. Note that width and height of videoram differ from physical width/height of a device (stored in @code{aa_hardwareparams} variables). Currently it is twice bigger because every four pixels are rendered into one character. Future versions should (possibly) support nine pixels. There's nearly no difference in API between classical gfx libraries and AA-lib. There are currently no higher level graphics functions. But AA-lib provides @code{aa_putpixel(context,x,y,color)} macro. There is no problem to make more complex functions. A great help to a potential programmer is the fact that AA-lib provides a colormap mode emulation. To set the palette you should use macro: @findex aa_setpalette @findex aa_palette @example aa_setpalette(@var{palette}, @var{index}, @var{red}, @var{green}, @var{blue}) @end example Red, green and blue components are recalculated into super-grayscale. Values are in range 0--255 where 0 means black. You can also set directly value using something like: @example palette[index]=value; @end example @findex aa_mmwidth @findex aa_mmheight Another difference is that your aplication is expected to handle various imgwidth/imgheights (in case you didn't exacly specified them in hardwareparams during initialization). Also your aplication should take care for @code{aa_mmwidth(context)} and @code{aa_mmheight(context)} values that contain real size in millimeters of output device. You cannot simply expect that pixel has the same width and height as at normal graphics libraries. Many old programs may require some scalling functions to convert images from their internal size (320x200) to AA-Lib real size. Note that image WON'T be displayed on the screen unless it is rendered and FLUSHED ! @c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @node Rendering, Flushing, Drawing image, Top @chapter Rendering of image into ascii-art Once image is drawn it needs to be rendered. For this purpose three functions are provided: @findex aa_fastrender @findex aa_render @findex aa_renderpalette @example void aa_fastrender(aa_context *@var{c}, int @var{x1}, int @var{y1}, int @var{x2}, int @var{y2}); void aa_render(aa_context * @var{c}, aa_renderparams *@var{p}, int @var{x1}, int @var{y1}, int @var{x2}, int @var{y2}); void aa_renderpalette(aa_context *@var{c}, aa_palette @var{table}, aa_renderparams *@var{p}, int @var{x1}, int @var{y1}, int @var{x2}, int @var{y2}); @end example @code{x1}, @code{y1}, @code{x2}, @code{y2} parameters specify Top left/bottom right corner of rendered rectangle. Note that these coordinates are SCREEN not IMAGE ones. So they can be twice smaller !! Specify the range 0@dots{}@code{aa_scrwidth(context)} or 0@dots{}@code{aa_scrheight(context)}). Please do NOT confuse them with image coords otherwise you'll get strange results! Note that the first call of our rendering function can take significantly more time becouse it pre-computes internal look-up tables. Function @code{aa_fastrender} does very fast (but not as perfect) results. It is designed for aplications that prefers simplicity and speed to the quality of output. Quick and easy way to use render routines is to call: @example aa_fastrender(context, 0, 0, aa_scrwidth(context), aa_scrheight(context)); @end example Function @code{aa_render} is a bit more complex than the previous one. It uses 256 colors instead of 16 ones and it has an extra parameter @code{p}. This parameter allows a control of its advanced features. It's a pointer to the following structure: @findex aa_renderparams @findex aa_defrenderparams @example struct aa_renderparams @{ int bright, contrast; float gamma; int dither; int inversion; int randomval; @}; @end example Values @code{bright}, @code{contrast}, @code{gamma} let you control the quality of the output image. Brightness of range 0@dots{}255 and contrast 0@dots{}127; dither can be set to one of the following values: @table @samp @item AA_NONE disables dithering @item AA_ERROR_DISTRIB enables error distribution dithering @item AA_FLOYD_S enables floyd-steinberg dithering @end table Inversion enables/disables the inversion. Randomval can be used to control the random dithering. If randomval is non-zero a random value in range ( --randomval / 2 , ranomval / 2) is added to every pixel value before the rendering. Note that this can be combined with all other ditherings too. Function @code{aa_renderpalette} is similiar to @code{aa_render}. The only difference is that it lets you specify the palette. @c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @node Flushing, Keyboard , Rendering, Top @chapter Flushing into screen and text output functions We've written the whole charapter for small functions to get your attention. None of them without flusing the image into screen will work. Once AA-lib is started, image drawn and rendered it needs to be finally displayed on the screen. Yes! That's it! You have to flush the data (or you'll get a blank screen:). @findex aa_flush @findex aa_text @findex aa_attr @example void aa_flush(aa_context *@var{c}); @end example This function will update the screen due to the situation stored in text and attribute buffers. This buffers are filled by rendering but they may be also accesed directly. A pointer to them can be obtained by calling @code{aa_text(context)} or @code{aa_attrs(context)} macros. The @code{aa_text} returns pointer to array representing text output buffer. An "videroram-like" array represented in the same way as @code{aa_image} (with the screen, not image dimenstions) where each byte is ascii value of character to display. The @code{aa_attrs} return pointer to array representing additional attribute for each character. @findex AA_NORMAL @findex AA_DIM @findex AA_BOLD @findex AA_BOLDFONT @findex AA_REVERSE @findex AA_SPECIAL Attribute buffer can contain following values: @table @samp @item AA_NORMAL for normal characters @item AA_BOLD for bold (double bright) characters @item AA_DIM for dim (half bright) characters @item AA_BOLDFONT for characters displayed using bold font @item AA_REVERSE for reversed characters @item AA_SPECIAL this can be used for displaying text over images. Its implementation depends at driver. Most drivers implement it as a white text on a blue background. @end table For more comfortable output you may use: @findex aa_puts @example void aa_puts(aa_context *@var{c}, int @var{x}, int @var{y}, int @var{attr}, char *@var{s}); int aa_printf(aa_context *@var{c}, int @var{x}, int @var{y}, int @var{attr}, char *@var{fmt}, ...); @end example It puts a string @code{s} (and atribute @code{attr}) at coordinates @code{x}, @code{y}. Note that it doesn't move the cursor nor flushes buffers to screen. To move the cursor you have to use following function @findex aa_gotoxy @findex aa_hidecursor @findex aa_showcursor @example void aa_gotoxy(aa_context *@var{c}, int @var{x}, int @var{y}); @end example Some drivers can also support cursor hiding: @code{aa_hidecursor} or @code{aa_showcursor} functions. @c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @node Keyboard, Mouse, Flushing, Top @chapter Keyboard AA-lib provides a simple interface to keyboard. It helps to make aplications portable since the same keyboard interface is available on all platforms. On the other hand it is very "dumb" (who cares@dots{}wait till the next version). @menu * Initialization of keyboard:: * Getting events:: @end menu @c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @node Initialization of keyboard, Getting events, Keyboard, Keyboard @section Initialization Keyboard interface needs to be initialized after display driver since the existence of aa_context is required. The following function is available for initializing: @findex aa_autoinitkbd @findex aa_initkbd @findex AA_SENDRELEASE @example int aa_autoinitkbd(struct aa_context *@var{context}, int @var{mode}); int aa_initkbd(struct aa_context *@var{context}, struct aa_kbddriver *@var{drv}, int @var{mode}); @end example The situation is very similiar to the initialization of hardware display drivers. The meaning is almost the same. Mode variable can be set to zero for normal keyboard mode or to AA_SENDRELEASE that forces driver to inform you about keys releasing (currently, only a few drivers support this feature :(). You can recommend drivers: @findex aa_recomendhikbd @findex aa_recomendlowkbd @findex aa_uninitkbd @example aa_recomendhikbd(@var{name}); aa_recomendlowkbd(@var{name}); @end example Close context or use @example void aa_uninitkbd(struct aa_context *@var{context}); @end example to uninitialize a keyboard driver. @c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @node Getting events, , Initialization of keyboard, Keyboard @section Getting events Once keyboard is up you should use following function to get the events: @findex aa_getevent @findex aa_getkey @findex AA_NONE @findex AA_RELEASE @example int aa_getevent(aa_context *@var{c}, int @var{wait}); @end example if @var{wait} is set to 1 functions wait for an event otherwise they just peek for an event (and might return AA_NONE). Event can be: @enumerate @item ascii code of pressed key (value is lower than 255) @item one of the following special keys: AA_UP, AA_DOWN, AA_LEFT, AA_RIGHT, AA_BACKSPACE, AA_ESC @item value higher or equal to AA_UNKNOWN but lower than AA_RELEASE means unknown key. @item two special events AA_MOUSE and AA_RESIZE (will be explained later) @item higher value than AA_RELEASE means released key. To get keycode use: @code{value &= ~AA_RELEASE}. @end enumerate If you don't want to be informed about such strange events and if you want to know just about the keys use: @example int aa_getkey(aa_context *@var{c}, int @var{wait}); @end example @c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @node Mouse, Resizing , Keyboard, Top @chapter Mouse @findex aa_autoinitmouse @findex aa_initmouse @findex AA_MOUSEMOVEMASK @findex AA_MOUSEPRESSMASK @findex AA_PRESSEDMOVEMAKS @findex AA_MOUSEALLMASK @findex aa_recomendhimouse @findex aa_recomendlowmouse @findex aa_uninitmouse @findex aa_getmouse @findex aa_hidemouse @findex aa_showmouse AA-lib also provides a simple mouse interface. It needs to be initialized after the keyboard driver (and uninitialized before) since it uses it to report events. Its initialization is almost identical to keyboards (just replace kbd by mouse in function names). If you need more details read the keyboard section. The only difference is mode parameter. It says what kind of events you should be informed about. It is a mask from the following fields: AA_MOUSEMOVEMASK, AA_MOUSEPRESSMASK and AA_PRESSEDMOVEMAKS. Note that mouse driver should ignore this mask. Set it to AA_MOUSEALLMASK to enables all these events. Mouse event is reported by AA_MOUSE value returned by @code{aa_getevent} function. Then the mouse possition can be obtained using: @example void aa_getmouse(aa_context *@var{c}, int *@var{x}, int *@var{y}, int *@var{b}); @end example @code{X} and @code{y} are reported in screen coordinates (not image ones). @code{B} contains state of buttons (AA_BUTTON1, AA_BUTTON2, AA_BUTTON3). @example void aa_hidemouse(aa_context *@var{c}); void aa_showmouse(aa_context *@var{c}); @end example This functions should be used to hide/show mouse cursor. @c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @node Resizing, Other functions, Mouse, Top @chapter Resizing of display @findex AA_RESIZE @findex aa_resize @findex aa_resizehandler Some display devices (like unix terminals or X11 windows) allows runtime resizing. This event is reported by AA_RESIZE. Then application is expected to call the function @example int aa_resize(aa_context *@var{c}); @end example that changes the values in aa_context and resizes buffer. Function returns 0 if it failed. If everything went OK application must redraw the screen according to the new size because the original one has been lost. If your aplication handles these events at many various places or uses @code{aa_getkey} the catch of AA_RESIZE is more complicated and you should use the resize handler. @example void aa_resizehandler(aa_context *@var{c}, void (*@var{handler}) (aa_context *)); @end example Then the resize handler is called by @code{aa_getevent} or @code{aa_getkey} functions when AA_RESIZE event appears. Some simple apps that don't rely on the display size and they redraw the whole screen after every event (some animations) should also use a bit tricky construction: @example aa_resizehandler(aa_context *@var{c}, (void *)aa_resize); @end example This will cause automatical handling of resize events without any special stuff done by the application. @c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @node Other functions, Designing new driver, Resizing, Top @chapter Other functions @findex aa_getrenderparams @example aa_renderparams *aa_getrenderparams(void); @end example This functions allocates a copy of aa_defrenderparams variable. It should be used by aplications that use more rendering parameters and that don't want to change aa_defrenderparams every time. @findex aa_registerfont @example int aa_registerfont(struct aa_font *@var{f}); @end example This functions allows you to register a new font into font databaze (that is contained in @code{aa_fonts} array). This is often used by hardware drivers (that autodetect their fonts @dots{}). @findex aa_setsupported @example void aa_setsupported(aa_context *@var{c}, int @var{supported}); @end example Allows you to change a supported variable (see Initialization) at runtime. @findex aa_setfont @example void aa_setfont(aa_context *@var{c}, struct aa_font *@var{font}); @end example Allows you to change a font used for approximation tables at runtime. @findex aa_edit @example void aa_edit(aa_context *@var{c}, int @var{x}, int @var{y}, int @var{size}, char *@var{s}, int @var{maxsize}); @end example A simple line editor: @code{X}, @code{y}, @code{size} express possitions of editor window, @code{s} -- pointer to string you may want to edit and @code{maxsize} specifies the maximal size of input line. @findex aa_createedit @findex aa_editkey @example struct aa_edit *aa_createedit(aa_context *@var{c}, int @var{x}, int @var{y}, int @var{size}, char *@var{s}, int @var{maxsize}); void aa_editkey(struct aa_edit *@var{e}, int @var{c}); @end example Event handled version of an editor. @code{aa_createedit} fills in the struct @code{aa_edit} for the input line and @code{aa_editkey} processes an event for editor. Can be used by some "user friendly (huh:)" aplications@dots{}. @c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @node Designing new driver, Reference, Other functions, Top @chapter Designing new driver To write new driver is quite easy. You need to implement just few very basic functions (like initialization, drawing to screen etc...) and register it in the driver registry. There is separate drivers for screen, mouse and keyboard. @subsection Display driver Display driver is the most significant driver (of course) so it is recomended to implement it first. Its structure is as follows: @example struct aa_driver @{ char *shortname, *name; int (*init) (struct aa_hardware_params *, void *, struct aa_hardware_params); void (*uninit) (struct aa_context *); void (*getsize) (struct aa_context *, int *, int *); void (*setattr) (struct aa_context *, int); void (*print) (struct aa_context *, char *); void (*gotoxy) (struct aa_context *, int, int); void (*flush) (struct aa_context *); void (*cursormode) (struct aa_context *, int); @}; @end example @deffn Text shortname @var{Shortname} is an string that contain short name of your driver. Short name is expected to be one word name like ``@code{linux}''. @end deffn @deffn Text name @var{Name} is an string that contain full name of your driver. It should contain version etc. like ``@code{Linux console driver version 1.0}'' @end deffn @deffn Function init This function is expected to initialize driver. It returns 0 if failed or 1 if driver is initialized. Note that driver can't produce any garbage when failed since AAlib will try to initialize other driver. First parameter specifies hardware parameters that user expect. Structure contain mask of attributes and recomended size. Mechanizm of handling sizes is described in section. Second parameter is pointer to user data that should be passed by application. It is @code{NULL} by default. Last is pointer to hardware_params structure, where driver will put parameters of initialized device. This structure holds information about atributes and parameters supported by your driver. @xref{Initialization for image saving}. Just first two fields are used (@code{font} and @code{supported}). @var{Font} is pointer to font structure used by hardware. This field should be filed at runtime (see @code{aalinux.c} for example), set statically to one of aalib's fonts or set to @code{NULL} if hardware does not allow detection of font (such as text terminals). @var{Supported} is mask of all atributes supported by your hardware ( @code{AA_NORMAL_MASK}, @code{AA_DIM_MASK}, @code{AA_BOLD_MASK}, @code{AA_BOLDFONT_MASK}, @code{AA_REVERSE_MASK}) and rage of useable characters (by default just standard ASCII characters are used) use @code{AA_EXTENDED} if your driver supports all characters (0-255). @code{AA_ALL} should be used if your driver displays characters instead of blanks (cr, tab etc..), @code{AA_EIGHT} lets AAlib use characters greater than 128. @code{Mmwidth} and @code{mmheight} fields should be also set if is possible to determine physical size of screen/window. @ref{Specifying hardware parameters} Last parameter should be used to define pointer that will be later set to @code{driverdata} field of @code{aa_context}. If driver needs some additional data, it should alloc driverdata structure, that will hold this data. AAlib will automatically free this pointer at @code{aa_close} if it is non-NULL. This function should also recomend best available keyboard and mouse drivers. @xref{How does the autodetection work}. @end deffn @deffn Function uninit This functin uninitializes driver and frees all resources used by it. @end deffn @deffn Function getsize This function returns width and height of screen in characters. @end deffn There is two alternate ways to implement screen output. First way is commonly used by text libraries - print/gotoxy/setattr mechanizm. Second one is flush. Flush should be fast function that display AAlibs internal buffer to screen. This way is preffered. In case @var{print} field is set to @code{NULL} AAlib will call just flush and expect that driver will update screen automatically from internal buffers. When both @var{print} and @var{flush} are non@code{NULL} AAlib will first use @var{print}/@var{setattr}/@var{gotoxy} to update screen and then call @var{flush}. Note that in case @var{print} is @code{NULL}, @var{setattr} should be also @code{NULL} but @code{gotoxy} needs to be non@code{NULL} since it is used to sed hardware cursor. @deffn Function setattr Set current attributes @end deffn @deffn Function print Print text at current cursor possition using current attrubutes @end deffn @deffn Function gotoxy Change cursor possition (coordinated begins by 0,0 in top left corner) @end deffn @deffn Function flush Flush current screen to output. In case you use AAlibs internal buffers to update screen (not @var{print}) mechanizm get pointer to text and attribute buffer using @code{aa_text} and @code{aa_attr} functions. Buffers are formated into ``normal'' videoram - starting in top left corner and continue like english text. Attribute buffer should contain @code{AA_NORMAL}, @code{AA_BOLD}, @code{AA_BOLDFONT}, @code{AA_DIM}, @code{AA_REVERSE} and @code{AA_SPECIAL} values. @end deffn @deffn Function cursormode This function is used to enable/disable cursor. 1 means enable, 0 disable. Should be set to @code{NULL} if your hardware don't support this. @end deffn @subsection Keyboard driver This driver is defined by structure: @example struct aa_kbddriver @{ char *shortname, *name; int flags; int (*init) (struct aa_context *, int mode); void (*uninit) (struct aa_context *); int (*getkey) (struct aa_context *, int); @}; @end example @deffn String shortname @end deffn @deffn String name This fields have similiar as in display drivers. @end deffn @deffn Integer flags This field informs about extensions supported by driver. Currently should be set to @code{AA_SENDRELEASE} in case driver should inform about key releases too. @end deffn @deffn Function init Similiar functionality as in display drivers. @var{mode} should be set to 0 or @code{AA_SENDRELEASE} in case application wants to be informed about key releases too. Note that driver should send releases even @var{mode} is 0. This function should also recomend best available mouse driver. @xref{How does the autodetection work}. @end deffn @deffn Function uninit Uninitializes driver @end deffn @deffn Function getkey This funtion return key. Second parameters is set to 1 if function is expected to wait for key or 0 if is expected to return @code{AA_NONE} of no event is pending. Function returns also key releases --- like normal keys masked by @code{AA_RELEASE}. It also recognizes some special keys. @xref{Getting events}. It should also cooperate with mouse driver and return @code{AA_MOUSE} if mouse event is pending. Second way is to ignore wait parameters and never wait for key when mouse driver is enabled. This way is not recomended for multitasking enviroments. @end deffn @subsection Mouse driver This driver is defined by structure: @example struct aa_mousedriver @{ char *shortname, *name; int flags; int (*init) (struct aa_context *, int mode); void (*uninit) (struct aa_context *); void (*getmouse) (struct aa_context *, int *x, int *y, int *buttons); void (*cursormode) (struct aa_context *,int); @}; @end example First five fields has very similiar meaning to ones in keyboard driver. @code{flags} is set to all events driver should report about: @code{AA_MOUSEMOVEMASK}, @code{AA_MOUSEPRESSMASK} and @code{AA_PRESSEDMOVEMAKS}. All of them are colected into @code{AA_MOUSEALLMASK}. If driver has showcursor/hidecursor functionality set also flag @code{AA_HIDECURSOR}. @var{Mode} parameter to @var{init} function should be set to mask of events application wants to know about, like in @var{flags}. @deffn Function getmouse This function returns coordinates of cursor and mask of buttons (@code{AA_BUTTON1}, @code{AA_BUTTON2}, @code{AA_BUTTON3}). Coordinates are same as for @code{gotoxy} call. @end deffn @deffn Function cursormode This function is used to show/disable mouse cursor. Should be set to @code{NULL} if not supported. @end deffn @include reference.texinfo @node Index, , Reference, Top @c node-name, next, previous, up @unnumbered Index of functions, variables, types and constants @printindex fn @iftex @page @example , ._j'.~S@@?_. . . ..!`,` ' :7x!, ., _,`' ,'': "``~~~~:"\,)., _ ._yV' ~ ,'.'.,, ,``~7"\/.,, \_K"~ ., ,.:.', , :':...:.. _~I", . .:':::`'. ...,:\:::::;.~k, . . ~, , :':':.:;. ..:2:z:g\j;j:;:.5t_ .(.:.,.,.,, ,, ,'..:':j\::,.:jgaaKKp22r:j::.,~ , .:::::::::..... ,.:j:::::\:::\jKQQgjq52yj::j::,,:,, (=Cj\\j\jj:j::;:::::_z:jj::j":j:oxQ@@@@x2k2jj5\:::'''.::, _QQQqzj22\:\2jj:21K55?"""::::::'@{"q25ozj\:\;::;:`, ',~:_` ($zpjQzgzqgzj2jo2:::::.:'...''':::jj:::t;":::~:::.:.:;:@{, [QQ@@g@@zQK2j:jj::::..'''',,,,,,,`::::':::::,.,..':.::j::2\ [@@@@@@QQ@@QQQ::jj::.....',,,,,,, ,,'':,:.:.@{\\:::z\;:\:jja2@@@}, @@@@@@@@@@@@@@Q@@@@yjj::.:...''',,,,, ', ,,'::/:;;qgQzj:KQ\/j":jj2) .@@@@@@@@@@@@@@@@@@@@$gn:::'..''',,, ,,,, ,, ,~:;_;~jKpqQaeq@@Qa2::;~""~ [@@@@@@@@@@@@@@@@@@@@$@@p::....'', , , , ,, , ,~"j_ 7$@@@@@@Q~\@@@@@@$@@Qz `~ @@@@@@@@@@@@@@$zQ@@Yt:.:.-...'', , ,,, , , , ~~\,/"@@@@@@Q/@@@@@@pqp @@@@@@@@@@@@h775::j2j\zzz__::.,..',,,,',,.... .:"\z:VVVVH@@B"~ =4@@@@@@$@@@}:::j"jjjjzQQ@@@@@@aj:j::....::::j2"::''~'~, "q], .:$@@@@k:":::::jYn:o@@$f:Cj2\:; , ,~"""L@@@{~":: , :j`.` ::q@@Q\:::.:::::""""\""\:":: ,.:.' :j !::q@@\::..:.:.:::::::":""": , :; , `,."\::..:.:.:.:.::::""":', .` @@@} \::::.::-:..:-::@{":::' ' , , .""::::::.:::::"":jj::.,, . ,:,,, ~ ::""::::::::::::"""::"::,, ':,, ` :""""::::@{"""""::::: ., , ,'',, ~ :""":::"""j:jjjjjj""~~~~~~~~~~'`, , .__gy"~::":"":":":""::":"::.., , , , ~' _ ~@{_. .....j=:', ,.:jj":"::::::::":::'` ' , , , ~.;..'. , '..:"""j:, ,,."::"j""""::::::::',, , .:'.:.:.' "":~:\"jj:, ,,'::j:::"\"\"@{"":":::,,,, , ,, ::'.:':' '- "\"jj\.,,.:"::::::""\""\""":"":"::...'', .::...:.:` "j:2a2::::"":::":""""""""@{@{""":::'', , .:.:':.::` .::\":j:j\j2S@@Q\j:"":"::""""@{"""""""::',, ..:::::.::''.:,':.. jjj@{\\j\@{:j:jo@@@@Qgj"\"""":""""""""::.',, ,, , , .:::::::.::'..::'..:.- \"j"j::@{jj:\jjjK@@@@@@@@pzj@{@{\"j@{jj\"j:::..',, .,.::::::::::-.:.':: .'``` ~ @sp 1 char *aa_attrs(aa_context *a); @end example @heading Parameters @noindent @quotation @table @code @item aa_context *a Specifies the AA-lib context to operate on. @end table @end quotation @heading Description @noindent The attribute output buffer is simple array of characters specifying the attributes. The array is organizated in the aa_scrheight (a) rows of aa_scrwidth(a) characters. @heading Return value @noindent Pointer the text output buffer used by AA-lib. @node aa_autoinitkbd, aa_autoinitmouse, aa_attrs, Reference @findex aa_autoinitkbd @appendixsec aa_autoinitkbd @noindent @noindent @example #include @sp 1 int aa_autoinitkbd ( struct aa_context *context, int mode ); @end example @heading Parameters @noindent @quotation @table @code @item struct aa_context *context Specifies the AA-lib context to operate on. @item int mode Mask of extra features you request. Can contain AA_SENDRELEASE if you are interested in release events too. @end table @end quotation @heading Description @noindent Attempts to find available keyboard driver supporting the specified mode. First attempts to initialize the recommended drivers and then in order drivers available in the aa_kbddrivers array (all regular output drivers compiled into AA-lib). Every AA-lib program ought to have call to aa_parseoptions before first call to aa_init. @heading Return value @noindent 1 when succesfull or 0 on failure. @node aa_autoinitmouse, aa_autoinit, aa_autoinitkbd, Reference @findex aa_autoinitmouse @appendixsec aa_autoinitmouse @noindent @noindent @example #include @sp 1 int aa_autoinitmouse ( struct aa_context *c, int mode ); @end example @heading Parameters @noindent @quotation @table @code @item struct aa_context *c Specifies the AA-lib context to operate on. @item int mode Mask of extra features you request. No such features are available in the current AA-lib version. @end table @end quotation @heading Description @noindent Attempts to find available mouse driver supporting the specified mode. First attempts to initialize the recommended drivers and then in order drivers available in the aa_kbddrivers array (all regular output drivers compiled into AA-lib). @heading Return value @noindent 1 when succesfull or 0 on failure. @node aa_autoinit, aa_close, aa_autoinitmouse, Reference @findex aa_autoinit @appendixsec aa_autoinit @noindent @noindent @example #include @sp 1 aa_context *aa_autoinit(const struct aa_hardware_params *params); @end example @heading Parameters @noindent @quotation @table @code @item const struct aa_hardware_params *params Hardware parameters you want. Use aa_defparams for default values. @end table @end quotation @heading Description @noindent Attempts to find available output driver supporting the specified parameters. First attempts to initialize the recommended drivers and then in order drivers available in the aa_drivers array (all regular output drivers compiled into AA-lib). @heading Return value @noindent Pointer to initialized context structure when succesfull or NULL on failure. @node aa_close, aa_createedit, aa_autoinit, Reference @findex aa_close @appendixsec aa_close @noindent @noindent @example #include @sp 1 void aa_close(aa_context *c); @end example @heading Parameters @noindent @quotation @table @code @item aa_context *c Specifies the AA-lib context to operate on. @end table @end quotation @heading Description @noindent Uninitialize all activated drivers and frees the memory used by context structures. @node aa_createedit, aa_currentfont, aa_close, Reference @findex aa_createedit @appendixsec aa_createedit @noindent @noindent @example #include @sp 1 struct aa_edit *aa_createedit ( aa_context *c, int x, int y, int size, char *s, int maxsize ); @end example @heading Parameters @noindent @quotation @table @code @item aa_context *c Specifies the AA-lib context to operate on. @item int x X coordinate of the edited text. @item int y Y coordinate of the edited text. @item int size Length of the editor window. @item char *s Buffer to edit (containing default value). @item int maxsize Size of the buffer. @end table @end quotation @heading Description @noindent You might use this function to input strings in AA-lib programs. This function initializes the aa_edit structure used by event-based editor. You might then call the aa_editkey function when key is pressed. @heading Return value @noindent Pointer to edit context when succesfull and NULL on failure. @node aa_currentfont, aa_defparams, aa_createedit, Reference @findex aa_currentfont @appendixsec aa_currentfont @noindent @noindent @example #include @sp 1 const struct aa_font *aa_currentfont(aa_context *a); @end example @heading Parameters @noindent @quotation @table @code @item aa_context *a Specifies the AA-lib context to operate on. @end table @end quotation @heading Description @noindent Returns specification of the fonts used by AA-lib rendering routines. @node aa_defparams, aa_defrenderparams, aa_currentfont, Reference @findex aa_defparams @appendixsec aa_defparams @noindent @noindent @example #include @sp 1 extern struct aa_hardware_params aa_defparams; @end example @heading Description @noindent Pa Default hardware paramters requested by AA-lib programs. Passed to aa_init function familly. @node aa_defrenderparams, aa_displayrecommended, aa_defparams, Reference @findex aa_defrenderparams @appendixsec aa_defrenderparams @noindent @noindent @example #include @sp 1 extern struct aa_renderparams aa_defrenderparams; @end example @heading Description @noindent Default rendering parameters. Passed to aa_render function familly. @node aa_displayrecommended, aa_dithernames, aa_defrenderparams, Reference @findex aa_displayrecommended @appendixsec aa_displayrecommended @noindent @noindent @example #include @sp 1 extern aa_linkedlist *aa_displayrecommended; @end example @heading Description @noindent List of recommended drivers is used by aa_autoinit familly of functions and altered by aa_recommend familly of functions. @node aa_dithernames, aa_drivers, aa_displayrecommended, Reference @findex aa_dithernames @appendixsec aa_dithernames @noindent @noindent @example #include @sp 1 extern const char *const aa_dithernames[]; @end example @heading Description @noindent NULL terminated array containing the names of supported dithering methods as ascii strings. @node aa_drivers, aa_editkey, aa_dithernames, Reference @findex aa_drivers @appendixsec aa_drivers @noindent @noindent @example #include @sp 1 extern const struct aa_driver *const aa_drivers[]; @end example @heading Description @noindent NULL-terminated array of output drivers available in AA-lib. @node aa_editkey, aa_edit, aa_drivers, Reference @findex aa_editkey @appendixsec aa_editkey @noindent @noindent @example #include @sp 1 void aa_editkey ( struct aa_edit *e, int c ); @end example @heading Parameters @noindent @quotation @table @code @item struct aa_edit *e Editor context to use (see aa_createedit). @item int c Key pressed. @end table @end quotation @heading Description @noindent Notify the line editor about keypress. @node aa_edit, aa_fastrender, aa_editkey, Reference @findex aa_edit @appendixsec aa_edit @noindent @noindent @example #include @sp 1 void aa_edit ( aa_context *c, int x, int y, int size, char *s, int maxsize ); @end example @heading Parameters @noindent @quotation @table @code @item aa_context *c Specifies the AA-lib context to operate on. @item int x X coordinate of the edited text. @item int y Y coordinate of the edited text. @item int size Length of the editor window. @item char *s Buffer to edit (containing default value). @item int maxsize Size of the buffer. @end table @end quotation @heading Description @noindent This function produces the simple interactive line editor that can be used by AA-lib programs to input strings. @node aa_fastrender, aa_fonts, aa_edit, Reference @findex aa_fastrender @appendixsec aa_fastrender @noindent @noindent @example #include @sp 1 void aa_fastrender ( aa_context *c, int x1, int y1, int x2, int y2 ); @end example @heading Parameters @noindent @quotation @table @code @item aa_context *c Specifies the AA-lib context to operate on. @item int x1 Column of top left coner of rendered area (in characters!). @item int y1 Row of top left coner of rendered area. @item int x2 Column of bottom right coner of rendered area. @item int y2 Row of bottom right coner of rendered area. @end table @end quotation @heading Description @noindent This function does the trick of converting the emulated framebuffer into high quality ASCII-art. It is slightly faster and less flexible the aa_render function. Note that to see the effect you need to call aa_flush too. First call to this function may take a while, because the rendering tables are produced. @node aa_fonts, aa_formats, aa_fastrender, Reference @findex aa_fonts @appendixsec aa_fonts @noindent @noindent @example #include @sp 1 extern const struct aa_font *aa_fonts[]; @end example @heading Description @noindent Null-terminated array of available fonts. @node aa_formats, aa_getevent, aa_fonts, Reference @findex aa_formats @appendixsec aa_formats @noindent @noindent @example #include @sp 1 extern const struct aa_format *const aa_formats[]; @end example @heading Description @noindent NULL terminated array of save formats supported by AA-lib. @node aa_getevent, aa_getkey, aa_formats, Reference @findex aa_getevent @appendixsec aa_getevent @noindent @noindent @example #include @sp 1 int aa_getevent ( aa_context *c, int wait ); @end example @heading Parameters @noindent @quotation @table @code @item aa_context *c Specifies the AA-lib context to operate on. @item int wait 1 if you wish to wait for the even when queue is empty. @end table @end quotation @heading Description @noindent Return next event from queue. Return next even from queue. Optionally wait for even when queue is empty. @heading Return value @noindent Next event from queue (values lower than 256 are used to report ascii values of pressed keys and higher values have special meanings) See the AA-lib texinfo documentation for more details. 0 is returned when queue is empty and wait is set to 0. @node aa_getkey, aa_getmouse, aa_getevent, Reference @findex aa_getkey @appendixsec aa_getkey @noindent @noindent @example #include @sp 1 int aa_getkey ( aa_context *c, int wait ); @end example @heading Parameters @noindent @quotation @table @code @item aa_context *c Specifies the AA-lib context to operate on. @item int wait 1 if you wish to wait for the even when queue is empty. @end table @end quotation @heading Description @noindent Return next keypress event from queue. @heading Return value @noindent Next keypress event from queue (values lower than 256 are used to report ascii values of pressed keys and higher values are used to represent some special keys like arrows) See the AA-lib texinfo documentation for more details. @node aa_getmouse, aa_gotoxy, aa_getkey, Reference @findex aa_getmouse @appendixsec aa_getmouse @noindent @noindent @example #include @sp 1 void aa_getmouse ( aa_context *c, int *x, int *y, int *b ); @end example @heading Parameters @noindent @quotation @table @code @item aa_context *c Specifies the AA-lib context to operate on. @item int *x Used to return X coordinate of mouse in characters. @item int *y Used to return Y coordinate of mouse in characters. @item int *b Used to return button mask of mouse. (Values used are AA_BUTTON1, AA_BUTTON2 and AA_BUTTON3). @end table @end quotation @heading Description @noindent Get mouse position as specified by last mouse event read by aa_getevent. @node aa_gotoxy, aa_help, aa_getmouse, Reference @findex aa_gotoxy @appendixsec aa_gotoxy @noindent @noindent @example #include @sp 1 void aa_gotoxy ( aa_context *c, int x, int y ); @end example @heading Parameters @noindent @quotation @table @code @item aa_context *c Specifies the AA-lib context to operate on. @item int x X coordinate of new position. @item int y Y coordinate of the position. @end table @end quotation @heading Description @noindent Move the hardware cursor (if any) to specified position. To see the effect you need to call aa_flush too. @node aa_help, aa_hidecursor, aa_gotoxy, Reference @findex aa_help @appendixsec aa_help @noindent @noindent @example #include @sp 1 extern const char *const aa_help; @end example @heading Description @noindent AA-lib help string for the default command line parser. @node aa_hidecursor, aa_hidemouse, aa_help, Reference @findex aa_hidecursor @appendixsec aa_hidecursor @noindent @noindent @example #include @sp 1 void aa_hidecursor(aa_context *c); @end example @heading Parameters @noindent @quotation @table @code @item aa_context *c Specifies the AA-lib context to operate on. @end table @end quotation @heading Description @noindent Hide the hardware cursor. This function may be ignored by some drivers. @node aa_hidemouse, aa_image, aa_hidecursor, Reference @findex aa_hidemouse @appendixsec aa_hidemouse @noindent @noindent @example #include @sp 1 void aa_hidemouse(aa_context *c); @end example @heading Parameters @noindent @quotation @table @code @item aa_context *c Not Documented. @end table @end quotation @heading Description @noindent Hide the mouse cursor. This function may be ignored by some drivers. @node aa_image, aa_imgheight, aa_hidemouse, Reference @findex aa_image @appendixsec aa_image @noindent @noindent @example #include @sp 1 char *aa_image(aa_context *a); @end example @heading Parameters @noindent @quotation @table @code @item aa_context *a Specifies the AA-lib context to operate on. @end table @end quotation @heading Description @noindent The framebuffer is simple array of characters specifying the brightness value (or palette index depending on the aa_render call). The array is organizated in the aa_imgheight (a) rows of aa_imgwidth(a) characters. @heading Return value @noindent Pointer to framebuffer emulated by AA-lib. @node aa_imgheight, aa_imgwidth, aa_image, Reference @findex aa_imgheight @appendixsec aa_imgheight @noindent @noindent @example #include @sp 1 int aa_imgheight(aa_context *a); @end example @heading Parameters @noindent @quotation @table @code @item aa_context *a Specifies the AA-lib context to operate on. @end table @end quotation @heading Description @noindent Returns height of the emulated image in pixels. @node aa_imgwidth, aa_initkbd, aa_imgheight, Reference @findex aa_imgwidth @appendixsec aa_imgwidth @noindent @noindent @example #include @sp 1 int aa_imgwidth(aa_context *a); @end example @heading Parameters @noindent @quotation @table @code @item aa_context *a Specifies the AA-lib context to operate on. @end table @end quotation @heading Description @noindent Returns width of the emulated image in pixels. @node aa_initkbd, aa_initmouse, aa_imgwidth, Reference @findex aa_initkbd @appendixsec aa_initkbd @noindent @noindent @example #include @sp 1 int aa_initkbd ( struct aa_context *context, const struct aa_kbddriver *drv, int mode ); @end example @heading Parameters @noindent @quotation @table @code @item struct aa_context *context Specifies the AA-lib context to operate on. @item const struct aa_kbddriver *drv Driver you wish to use. @item int mode Mask of extra features you request. Can contain AA_SENDRELEASE if you are interested in release events too. @end table @end quotation @heading Description @noindent This is the most primitive AA-lib keyboard initialization function. Allows better control over the process than the easier to use aa_autoinitkbd function. @heading Return value @noindent 1 on success and 0 on fail. @node aa_initmouse, aa_init, aa_initkbd, Reference @findex aa_initmouse @appendixsec aa_initmouse @noindent @noindent @example #include @sp 1 int aa_initmouse ( struct aa_context *c, const struct aa_mousedriver *d, int mode ); @end example @heading Parameters @noindent @quotation @table @code @item struct aa_context *c Specifies the AA-lib context to operate on. @item const struct aa_mousedriver *d Driver you wish to use. @item int mode Mask of extra features you request. No such features are available in the current AA-lib version. @end table @end quotation @heading Description @noindent This is the most primitive AA-lib keyboard initialization function. Allows better control over the process than the easier to use aa_autoinitmouse function. @heading Return value @noindent 1 on success and 0 on fail. @node aa_init, aa_kbddrivers, aa_initmouse, Reference @findex aa_init @appendixsec aa_init @noindent @noindent @example #include @sp 1 aa_context *aa_init ( const struct aa_driver *driver, const struct aa_hardware_params *defparams, const void *driverdata ); @end example @heading Parameters @noindent @quotation @table @code @item const struct aa_driver *driver Driver you want to use. Available drivers are listed in the NULL terminated aa_drivers array. @item const struct aa_hardware_params *defparams Hardware parameters you want. Use aa_defparams for default values. @item const void *driverdata This pointer is passed dirrectly to driver used to specify additional driver dependent parameters. @end table @end quotation @heading Description @noindent This is the most primitive AA-lib initialization function. Allows better control over the process than the easier to use aa_autoinit function. Every AA-lib program ought to have call to aa_parseoptions before first call to aa_init. @heading Return value @noindent Pointer to new AA-lib context or NULL if failed. @node aa_kbddrivers, aa_kbdrecommended, aa_init, Reference @findex aa_kbddrivers @appendixsec aa_kbddrivers @noindent @noindent @example #include @sp 1 extern const struct aa_kbddriver *const aa_kbddrivers[]; @end example @heading Description @noindent NULL-terminated array of keyboard drivers available in AA_lib. @node aa_kbdrecommended, aa_mmheight, aa_kbddrivers, Reference @findex aa_kbdrecommended @appendixsec aa_kbdrecommended @noindent @noindent @example #include @sp 1 extern aa_linkedlist *aa_kbdrecommended; @end example @heading Description @noindent List of recommended drivers is used by aa_autoinit familly of functions and altered by aa_recommend familly of functions. @node aa_mmheight, aa_mmwidth, aa_kbdrecommended, Reference @findex aa_mmheight @appendixsec aa_mmheight @noindent @noindent @example #include @sp 1 int aa_mmheight(aa_context *a); @end example @heading Parameters @noindent @quotation @table @code @item aa_context *a Specifies the AA-lib context to operate on. @end table @end quotation @heading Description @noindent Returns height of the output screen in millimeters. @node aa_mmwidth, aa_mousedrivers, aa_mmheight, Reference @findex aa_mmwidth @appendixsec aa_mmwidth @noindent @noindent @example #include @sp 1 int aa_mmwidth(aa_context *a); @end example @heading Parameters @noindent @quotation @table @code @item aa_context *a Specifies the AA-lib context to operate on. @end table @end quotation @heading Description @noindent Returns width of the output screen in millimeters. @node aa_mousedrivers, aa_mouserecommended, aa_mmwidth, Reference @findex aa_mousedrivers @appendixsec aa_mousedrivers @noindent @noindent @example #include @sp 1 extern const struct aa_mousedriver *const aa_mousedrivers[]; @end example @heading Description @noindent NULL terminated array of mouse drivers supported by AA-lib. @node aa_mouserecommended, aa_parseoptions, aa_mousedrivers, Reference @findex aa_mouserecommended @appendixsec aa_mouserecommended @noindent @noindent @example #include @sp 1 extern aa_linkedlist *aa_mouserecommended; @end example @heading Description @noindent List of recommended drivers is used by aa_autoinit familly of functions and altered by aa_recommend familly of functions. @node aa_parseoptions, aa_printf, aa_mouserecommended, Reference @findex aa_parseoptions @appendixsec aa_parseoptions @noindent @noindent @example #include @sp 1 int aa_parseoptions ( struct aa_hardware_params *p, aa_renderparams *r, int *argc, char **argv ); @end example @heading Parameters @noindent @quotation @table @code @item struct aa_hardware_params *p Hardware parameters structure to alter. It is expected that this structure only with necessary modifications will be later used to initialize the AA-lib context. @item aa_renderparams *r Rendering prameters structure to alter. It is expected that this structure only with necessary modifications will be later used to render images. @item int *argc Pointer to argc parameter passed to function "main". @item char **argv Pointer to argv parameter passed to function "main". @end table @end quotation @heading Description @noindent Use this function to parse the standard command line options used by AA-lib. Every AA-lib program ought to call this function to let user specify some extra parameters. The function alters the aa_hardware_params and aa_renderparams structures and removes known options from the argc/argv lists. It also parse the AAOPTS environment variable. When called with NULL for the argc/argv parameters, it parses AAOPTS only. At least this call ought to be in every AA-lib program. @heading Return value @noindent 1 when sucesfull and 0 on failure. The program then can print the help text available in aa_help variable. @node aa_printf, aa_putpixel, aa_parseoptions, Reference @findex aa_printf @appendixsec aa_printf @noindent @noindent @example #include @sp 1 int aa_printf ( aa_context *c, int x, int y, enum aa_attribute attr, const char *fmt, ... ); @end example @heading Parameters @noindent @quotation @table @code @item aa_context *c Specifies the AA-lib context to operate on. @item int x X coordinate of the first character. @item int y Y coordinate of the first character. @item enum aa_attribute attr Attribute to use. @sp 1 Possible values for an @code{enum aa_attribute} are as follows: @quotation @table @code @item AA_NORMAL Normal characters. @item AA_DIM Dark characters. @item AA_BOLD Bright characters. @item AA_BOLDFONT Characters rendered in bold font. @item AA_REVERSE Reversed (black on whilte) characters. @item AA_SPECIAL Render characters in a way easilly visible on the screen. The exact rendering is driver dependent, but this mode ought to be used to output texts you want to make easilly visible in the image. @end table @end quotation @item const char *fmt Text to output in standard printf format. @item ... Not Documented. @end table @end quotation @heading Description @noindent Print given text to AA-lib output buffers. To see the effect you need to call aa_flush too. @node aa_putpixel, aa_puts, aa_printf, Reference @findex aa_putpixel @appendixsec aa_putpixel @noindent @noindent @example #include @sp 1 void aa_putpixel ( aa_context *c, int x, int y, int color ); @end example @heading Parameters @noindent @quotation @table @code @item aa_context *c Specifies the AA-lib context to operate on. @item int x X coordinate. @item int y Y coordinate. @item int color Palette index or brightness value (0..255). @end table @end quotation @heading Description @noindent Put pixel to emulated framebuffer. @node aa_puts, aa_recommendhidisplay, aa_putpixel, Reference @findex aa_puts @appendixsec aa_puts @noindent @noindent @example #include @sp 1 void aa_puts ( aa_context *c, int x, int y, enum aa_attribute attr, const char *s ); @end example @heading Parameters @noindent @quotation @table @code @item aa_context *c Specifies the AA-lib context to operate on. @item int x X coordinate of the first character. @item int y Y coordinate of the first character. @item enum aa_attribute attr Attribute to use. @sp 1 Possible values for an @code{enum aa_attribute} are as follows: @quotation @table @code @item AA_NORMAL Normal characters. @item AA_DIM Dark characters. @item AA_BOLD Bright characters. @item AA_BOLDFONT Characters rendered in bold font. @item AA_REVERSE Reversed (black on whilte) characters. @item AA_SPECIAL Render characters in a way easilly visible on the screen. The exact rendering is driver dependent, but this mode ought to be used to output texts you want to make easilly visible in the image. @end table @end quotation @item const char *s String to output. @end table @end quotation @heading Description @noindent Output given string to AA-lib output buffers. To see the effect you need to call aa_flush too. @node aa_recommendhidisplay, aa_recommendhikbd, aa_puts, Reference @findex aa_recommendhidisplay @appendixsec aa_recommendhidisplay @noindent @noindent @example #include @sp 1 void aa_recommendhidisplay(const char *name); @end example @heading Parameters @noindent @quotation @table @code @item const char *name Name of the driver (ought to match the "shortname" field of the driver definition structure). @end table @end quotation @heading Description @noindent Insert the given driver on beggining of the list of recommended display drivers. @node aa_recommendhikbd, aa_recommendhimouse, aa_recommendhidisplay, Reference @findex aa_recommendhikbd @appendixsec aa_recommendhikbd @noindent @noindent @example #include @sp 1 void aa_recommendhikbd(const char *name); @end example @heading Parameters @noindent @quotation @table @code @item const char *name Name of the driver (ought to match the "shortname" field of the driver definition structure). @end table @end quotation @heading Description @noindent Insert the given driver on beggining of the list of recommended keyboard drivers. @node aa_recommendhimouse, aa_recommendhi, aa_recommendhikbd, Reference @findex aa_recommendhimouse @appendixsec aa_recommendhimouse @noindent @noindent @example #include @sp 1 void aa_recommendhimouse(const char *name); @end example @heading Parameters @noindent @quotation @table @code @item const char *name Name of the driver (ought to match the "shortname" field of the driver definition structure). @end table @end quotation @heading Description @noindent Insert the given driver on beggining of the list of recommended mouse drivers. @node aa_recommendhi, aa_recommendlowdisplay, aa_recommendhimouse, Reference @findex aa_recommendhi @appendixsec aa_recommendhi @noindent @noindent @example #include @sp 1 void aa_recommendhi ( aa_linkedlist **l, const char *name ); @end example @heading Parameters @noindent @quotation @table @code @item aa_linkedlist **l List to operate on (aa_displayrecommended, aa_kbdrecommended or aa_mouserecommended). @item const char *name Name of the driver (ought to match the "shortname" field of the driver definition structure). @end table @end quotation @heading Description @noindent Insert the given driver on beggining of the list of recommended drivers. @node aa_recommendlowdisplay, aa_recommendlowkbd, aa_recommendhi, Reference @findex aa_recommendlowdisplay @appendixsec aa_recommendlowdisplay @noindent @noindent @example #include @sp 1 void aa_recommendlowdisplay(const char *name); @end example @heading Parameters @noindent @quotation @table @code @item const char *name Name of the driver (ought to match the "shortname" field of the driver definition structure). @end table @end quotation @heading Description @noindent Add the given driver to the end of list of display recommended drivers. @node aa_recommendlowkbd, aa_recommendlowmouse, aa_recommendlowdisplay, Reference @findex aa_recommendlowkbd @appendixsec aa_recommendlowkbd @noindent @noindent @example #include @sp 1 void aa_recommendlowkbd(const char *name); @end example @heading Parameters @noindent @quotation @table @code @item const char *name Name of the driver (ought to match the "shortname" field of the driver definition structure). @end table @end quotation @heading Description @noindent Add the given driver to the end of list of keyboard recommended drivers. @node aa_recommendlowmouse, aa_recommendlow, aa_recommendlowkbd, Reference @findex aa_recommendlowmouse @appendixsec aa_recommendlowmouse @noindent @noindent @example #include @sp 1 void aa_recommendlowmouse(const char *name); @end example @heading Parameters @noindent @quotation @table @code @item const char *name Name of the driver (ought to match the "shortname" field of the driver definition structure). @end table @end quotation @heading Description @noindent Add the given driver to the end of list of mouse recommended drivers. @node aa_recommendlow, aa_registerfont, aa_recommendlowmouse, Reference @findex aa_recommendlow @appendixsec aa_recommendlow @noindent @noindent @example #include @sp 1 void aa_recommendlow ( aa_linkedlist **l, const char *name ); @end example @heading Parameters @noindent @quotation @table @code @item aa_linkedlist **l List to operate on (aa_displayrecommended, aa_kbdrecommended or aa_mouserecommended). @item const char *name Name of the driver (ought to match the "shortname" field of the driver definition structure). @end table @end quotation @heading Description @noindent Add the given driver to the end of list of recommended drivers. @node aa_registerfont, aa_render, aa_recommendlow, Reference @findex aa_registerfont @appendixsec aa_registerfont @noindent @noindent @example #include @sp 1 int aa_registerfont(const struct aa_font *f); @end example @heading Parameters @noindent @quotation @table @code @item const struct aa_font *f Font specification structure. @end table @end quotation @heading Description @noindent Add new font specification to aa_fonts array. @heading Return value @noindent 1 when succesfull or 0 on failure. @node aa_render, aa_resizehandler, aa_registerfont, Reference @findex aa_render @appendixsec aa_render @noindent @noindent @example #include @sp 1 void aa_render ( aa_context *c, const aa_renderparams *p, int x1, int y1, int x2, int y2 ); @end example @heading Parameters @noindent @quotation @table @code @item aa_context *c Specifies the AA-lib context to operate on. @item const aa_renderparams *p Rendering parametters used to specify brightness, gamma correction and other usefull stuff. Use aa_defrenderparams for default values. @item int x1 Column of top left coner of rendered area (in characters!). @item int y1 Row of top left coner of rendered area. @item int x2 Column of bottom right coner of rendered area. @item int y2 Row of bottom right coner of rendered area. @end table @end quotation @heading Description @noindent This function does the trick of converting the emulated framebuffer into high quality ASCII-art. If you want to be really fast, you might use aa_fastrender. If you want to emulate palette, use aa_renderpalette. Note that to see the effect you need to call aa_flush too. First call to this function may take a while, because the rendering tables are produced. @node aa_resizehandler, aa_resize, aa_render, Reference @findex aa_resizehandler @appendixsec aa_resizehandler @noindent @noindent @example #include @sp 1 void aa_resizehandler ( aa_context *c, void (*handler)(aa_context *) ); @end example @heading Parameters @noindent @quotation @table @code @item aa_context *c Specifies the AA-lib context to operate on. @item void (*handler)(aa_context *) Function to be called when resize happends. @end table @end quotation @heading Description @noindent Set user handler to be called on resize event. @node aa_resize, aa_scrheight, aa_resizehandler, Reference @findex aa_resize @appendixsec aa_resize @noindent @noindent @example #include @sp 1 int aa_resize(aa_context *c); @end example @heading Parameters @noindent @quotation @table @code @item aa_context *c Specifies the AA-lib context to operate on. @end table @end quotation @heading Description @noindent Do resize action. This function ought to be called when application takes into account the AA_RESIZE event. The context is reinitialized and set to new sizes. @heading Return value @noindent 0 when no resizing is done and 1 when resizing was succesfull. @node aa_scrheight, aa_scrwidth, aa_resize, Reference @findex aa_scrheight @appendixsec aa_scrheight @noindent @noindent @example #include @sp 1 int aa_scrheight(aa_context *a); @end example @heading Parameters @noindent @quotation @table @code @item aa_context *a Specifies the AA-lib context to operate on. @end table @end quotation @heading Description @noindent Returns height of the output screen in characters. @node aa_scrwidth, aa_setfont, aa_scrheight, Reference @findex aa_scrwidth @appendixsec aa_scrwidth @noindent @noindent @example #include @sp 1 int aa_scrwidth(aa_context *a); @end example @heading Parameters @noindent @quotation @table @code @item aa_context *a Specifies the AA-lib context to operate on. @end table @end quotation @heading Description @noindent Returns width of the output screen in characters. @node aa_setfont, aa_setsupported, aa_scrwidth, Reference @findex aa_setfont @appendixsec aa_setfont @noindent @noindent @example #include @sp 1 void aa_setfont ( aa_context *c, const struct aa_font *font ); @end example @heading Parameters @noindent @quotation @table @code @item aa_context *c Specifies the AA-lib context to operate on. @item const struct aa_font *font Font specification structure. @end table @end quotation @heading Description @noindent Set font specification to be used by rendering functions. @node aa_setsupported, aa_showcursor, aa_setfont, Reference @findex aa_setsupported @appendixsec aa_setsupported @noindent @noindent @example #include @sp 1 void aa_setsupported ( aa_context *c, int supported ); @end example @heading Parameters @noindent @quotation @table @code @item aa_context *c Specifies the AA-lib context to operate on. @item int supported New mask of requested features. Can contain AA_EXTENDED to enable use of all 256 characters and AA_EIGHT to enable use of the character numbered higher than 127. @end table @end quotation @heading Description @noindent This function can be used to alter "supported" field of hardware-params structure used by AA-lib. @node aa_showcursor, aa_showmouse, aa_setsupported, Reference @findex aa_showcursor @appendixsec aa_showcursor @noindent @noindent @example #include @sp 1 void aa_showcursor(aa_context *c); @end example @heading Parameters @noindent @quotation @table @code @item aa_context *c Specifies the AA-lib context to operate on. @end table @end quotation @heading Description @noindent Show the hardware cursor. This function may not be ignored by some drivers. @node aa_showmouse, aa_text, aa_showcursor, Reference @findex aa_showmouse @appendixsec aa_showmouse @noindent @noindent @example #include @sp 1 void aa_showmouse(aa_context *c); @end example @heading Parameters @noindent @quotation @table @code @item aa_context *c Not Documented. @end table @end quotation @heading Description @noindent Show the mouse cursor. This function may be ignored by some drivers. @node aa_text, aa_uninitkbd, aa_showmouse, Reference @findex aa_text @appendixsec aa_text @noindent @noindent @example #include @sp 1 char *aa_text(aa_context *a); @end example @heading Parameters @noindent @quotation @table @code @item aa_context *a Specifies the AA-lib context to operate on. @end table @end quotation @heading Description @noindent The text output buffer is simple array of characters specifying the ascii-value of the characters. The array is organizated in the aa_scrheight (a) rows of aa_scrwidth(a) characters. @heading Return value @noindent Pointer the text output buffer used by AA-lib. @node aa_uninitkbd, aa_uninitmouse, aa_text, Reference @findex aa_uninitkbd @appendixsec aa_uninitkbd @noindent @noindent @example #include @sp 1 void aa_uninitkbd(aa_context *context); @end example @heading Parameters @noindent @quotation @table @code @item aa_context *context Specifies the AA-lib context to operate on. @end table @end quotation @heading Description @noindent Calls "uninitialize" function of the keyboard driver. It ought to undo all actions done by "initialize" function. @node aa_uninitmouse, mem_d, aa_uninitkbd, Reference @findex aa_uninitmouse @appendixsec aa_uninitmouse @noindent @noindent @example #include @sp 1 void aa_uninitmouse(aa_context *context); @end example @heading Parameters @noindent @quotation @table @code @item aa_context *context Specifies the AA-lib context to operate on. @end table @end quotation @heading Description @noindent Calls "uninitialize" function of the mouse driver. It ought to undo all actions done by "initialize" function. @node mem_d, save_d, aa_uninitmouse, Reference @findex mem_d @appendixsec mem_d @noindent @noindent @example #include @sp 1 extern const struct aa_driver mem_d; @end example @heading Description @noindent Used to render ascii-art images into memory. You might use this driver to render images into memory and then use your own routines to handle them in case you want to avoid AA-lib's output mechanizms. @node save_d, , mem_d, Reference @findex save_d @appendixsec save_d @noindent @noindent @example #include @sp 1 extern const struct aa_driver save_d; @end example @heading Description @noindent Initialize this driver using aa_init function and specify the driver dependent parameters in aa_savedata structure to save image into file. See the texinfo documentation for details. aalib-1.4.0/doc/aalib.info0000644000766200001440000000555507272031253010756 This is aalib.info, produced by makeinfo version 4.0 from aalib.texinfo. INFO-DIR-SECTION Libraries START-INFO-DIR-ENTRY * AA-lib: (aalib). An ASCII-art graphics library END-INFO-DIR-ENTRY (C) 1997 Jan Hubicka & Kamil Toman Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies.  Indirect: aalib.info-1: 409 aalib.info-2: 42306 aalib.info-3: 91590  Tag Table: (Indirect) Node: Top409 Node: Overview6006 Node: Why?6220 Node: What?6630 Node: History7251 Node: AA-Project8545 Node: Skeleton9645 Node: Initialization11729 Node: Initialization as a normal graphics library13034 Node: Easy initialization of AA-lib14102 Node: Parsing of command line options15208 Node: How does the autodetection work19684 Node: Recommending drivers20897 Node: Initialization as an ascii art renderer22696 Node: Initialization for image saving23230 Node: Specifying hardware parameters26820 Node: Drawing image29270 Node: Rendering31294 Node: Flushing33847 Node: Keyboard35989 Node: Initialization of keyboard36379 Node: Getting events37375 Node: Mouse38345 Node: Resizing39530 Node: Other functions40768 Node: Designing new driver42306 Node: Reference50455 Node: aa_attrs55203 Node: aa_autoinitkbd55730 Node: aa_autoinitmouse56662 Node: aa_autoinit57485 Node: aa_close58238 Node: aa_createedit58622 Node: aa_currentfont59644 Node: aa_defparams60056 Node: aa_defrenderparams60391 Node: aa_displayrecommended60720 Node: aa_dithernames61106 Node: aa_drivers61438 Node: aa_editkey61728 Node: aa_edit62149 Node: aa_fastrender62953 Node: aa_fonts63958 Node: aa_formats64212 Node: aa_getevent64495 Node: aa_getkey65304 Node: aa_getmouse66023 Node: aa_gotoxy66756 Node: aa_help67321 Node: aa_hidecursor67578 Node: aa_hidemouse67966 Node: aa_image68321 Node: aa_imgheight68907 Node: aa_imgwidth69265 Node: aa_initkbd69621 Node: aa_initmouse70462 Node: aa_init71286 Node: aa_kbddrivers72394 Node: aa_kbdrecommended72701 Node: aa_mmheight73063 Node: aa_mmwidth73429 Node: aa_mousedrivers73789 Node: aa_mouserecommended74108 Node: aa_parseoptions74484 Node: aa_printf76050 Node: aa_putpixel77598 Node: aa_puts78156 Node: aa_recommendhidisplay79627 Node: aa_recommendhikbd80126 Node: aa_recommendhimouse80626 Node: aa_recommendhi81122 Node: aa_recommendlowdisplay81783 Node: aa_recommendlowkbd82285 Node: aa_recommendlowmouse82782 Node: aa_recommendlow83275 Node: aa_registerfont83925 Node: aa_render84367 Node: aa_resizehandler85655 Node: aa_resize86181 Node: aa_scrheight86739 Node: aa_scrwidth87101 Node: aa_setfont87460 Node: aa_setsupported87961 Node: aa_showcursor88645 Node: aa_showmouse89045 Node: aa_text89399 Node: aa_uninitkbd89955 Node: aa_uninitmouse90394 Node: mem_d90834 Node: save_d91231 Node: Index91590  End Tag Table aalib-1.4.0/doc/aalib.info-10000644000766200001440000012250207272031253011104 This is aalib.info, produced by makeinfo version 4.0 from aalib.texinfo. INFO-DIR-SECTION Libraries START-INFO-DIR-ENTRY * AA-lib: (aalib). An ASCII-art graphics library END-INFO-DIR-ENTRY (C) 1997 Jan Hubicka & Kamil Toman Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies.  File: aalib.info, Node: Top, Next: Overview, Prev: (dir), Up: (dir) AA-lib 1.4 ********** An ascii-art library API DESCRIPTION Apr 17, 2001 * Menu: * Overview:: What does this software do then ? * AA-Project:: You want join ? * Skeleton:: AA-lib program skeleton:: * Initialization:: How to start up AA-lib? * Drawing image:: How to draw image? * Rendering:: Rendering of image into ascii-art * Flushing:: Flushing into screen and text output functions * Keyboard:: Handling keyboard * Mouse:: Handling mouse * Resizing:: Resizing of display * Other functions:: Functions that was not documented yet. * Designing new driver::How to port AA-lib to new platform * Reference:: All AA-lib functions and variables. * Index:: Index of functions, types, macros and constants .,. _. . .%qwmy1(/. . _x]WWWK1==s,_,- `.amWWWWWZ13x|:=|{?W#Ee==++=_ _jmWBWWWB}l=:;:.<%|!??+;- ~.;==, _ud$WWWW#Xecc_|=-::<3{~ . . .. ;::_ ++|>{?+X*bSx%>`=: ..-<:-. . . -:==i, ....:`---+|+{S=..-=:...= ` .....-|:. .. .-- . ..::;:=:+. . . .._--;=: . .:;==|=|=|||:: .......:<,=.=:+==. .. .::==|||iilxil|;::_=:+::=<(-+==. - .: .:;==+| ;)s .--`__,:- -:==|+|xoS2oo22ooX2Xa,.^x. i. -~~ . .::;===+|I12SSnnSXSXmX#s, +,. -` .. -- . ----+++|||II}**!!!!|> '...., .,. .::.. . ..-:===::. :=%i3XWWWWWWWW#?? ...:-:::::... . .:+*Y?YXo=|3XWWWWBW[ .....:...........:.=nZmWms;=IX##### .............:-~+1s%X#####2s...... ........:+*1SX####XSommWWWWWWW[.+=:=:s%= QQQWL.. -{1;...:.-.. . .......--+=i+== . . . . . . .......... -:=+lxSXXZ#Z?`.:::::.:==::===;= . . .. . .. . . . ...:=|lvn}!...:.....:==<|:<|saaw QWQWQQWQWm#Qwa_, .. .... .:;~~ .......:=sawwWWWWWQWWWWW Honza Hubicka _a,an}|^-=-:._._ .aJ#XS*||:::--::;=>=|_. ._JZSo1|+:;;:::.:.:=||===:.. _=nn31}=,==:..::.:::__=====;... .=+"!+i%*+==::-:;=<;==+<+==.. .. .__|+~_;>`. . ..:===|:==-; . .--~-~~...-- ..:.;::+====>==_ . .. : . ....-+|;-:=+li===|!+:... :. . ...:::i||iixi|==;=|_._.. ..; . ...:.==|ixxunnns%iiaoouis%,=:== . ....:==iiv22XXXZZ#ZmZXXXdupoz=<> ........::=|ilvn2S2ZZ#####ZZZXZ#Xx=u>. . . . . .-:;=iill11X2X#m###mmZXzIl>{`I`; ... ..-::;=|||illvv3XXXXXX#XmoS;==::-.. . . ...=====|i|||+"""~~++*1SoXs,-::... ......---===;. ..:=|i>"{2S( ;_....--+._=us_J1s.+s; -. .. . . . :{m, =|::::==xxoXzXonX(:x( ... ` ..... . . .:xZXc`|||=||ln2ZX'Snvc . . . ..:l=.innnn1xIiixnIIIl' . . _.:.-|linxvl|` . -~-++iii|iivvl||| . ....__|ixxxIvIi=|Il . . .::=|i%nnonnvI+=v1nl ...:=|Innn1}+||vvnvv; ....:+++=xivvnnnno> . .:;=ivvnnvvno2o` . .. ..: . :=+|iIxvnvo2e';,. ...:<+:. ...-- . ..==iivlvIn1".|=:;.. . . -:: .::. ...=|iliIli~ =|`:<:/.. .. . n;: . . .::=|+~ :=+;;:.: : Kamil Toman  File: aalib.info, Node: Overview, Next: AA-Project, Prev: Top, Up: Top Overview ******** * Menu: * Why?:: Why such library? * What?:: What does this software do then? * History:: How this all started?  File: aalib.info, Node: Why?, Next: What?, Prev: Overview, Up: Overview Why such library? ================= I vote for simplicity. There are many problems of various kinds with video cards, low frequency monitors, crashing graphical apps... AA-lib IS the solution. It works on a terminal of any kind, it is fast and portable, it gives to you standard API. It gives to your old hardware more power!  File: aalib.info, Node: What?, Next: History, Prev: Why?, Up: Overview What does this software do then ? ================================= AA-lib is a low level gfx library just as many other libraries are. The main difference is that AA-lib does not require graphics device. In fact, there is no graphical output possible. AA-lib replaces those old-fashioned output methods with powerful ascii-art renderer. Now my linux boots with a nice penguin logo at secondary display (yes! Like Win95 does:) AA-lib API is designed to be similar to other graphics libraries. Learning a new API would be a piece of cake!  File: aalib.info, Node: History, Prev: What?, Up: Overview How this all started ==================== Once upon a time we've (my friend Kamil and I) bought two old Herculeses as secondary monitors. We didn't know for that time that our Diamond Stealths 64 cards would become obsolete soon. The next day we downloaded the logo of Linux Texas Users Group - nice silly penguin looking like a cowboy! It was so exciting logo ... we decided that we couldn't live without it and we wanted to see it at boot time as a logo on our secondary monitors. There was a small problem - Hercules doesn't support color graphics. So we decided to convert the penguin image to ascii art using netpbm tools. The output was very ugly because the converting algorithm was absolutly stupid. During the night I designed a new convertor that used a font bitmap to create an aproximation table. The output wasn't very good since the algorithm wasn't tuned so well. Many months this small piece of code was waiting on my disc for the day "D". Meanwhile I started a new project XaoS (a fractal zoomer) with my friend Thomas. And then I got an idea: Ascii Art Mandelbrots! I was really impressed by the result! XaoS was faster, portable and looking much better than ever before. I found a new way to go ...  File: aalib.info, Node: AA-Project, Next: Skeleton, Prev: Overview, Up: Top AA-Project ********** dT8 8Tb dT 8 8 Tb dT 8 8 Tb dT 8 8 Tb dT 8 8 Tb Three goals of AA-Project: 1. Port all important software (like Doom, Second Reality, X windows etc..) on AA-lib. 2. Port AA-lib on all available platforms (mainly ZX-Spectrum and Sharp). 3. Force IBM to start manufacturing MDA cards again. AA-project was started by Jan Hubicka. In that times just a few people knew about it. Then a new demo named BB has been relased to show the power of AA-lib technology. Now the project is freely available and anyone can help. Just join our mailing list: `aa-project-discuss@lists.sourceforge.net'. Or just browse our homepage at `http://aa-project.sourceforge.net'. A ton of examples of ascii-art generated by aalib, pointers to other AA-Project resources etc.  File: aalib.info, Node: Skeleton, Next: Initialization, Prev: AA-Project, Up: Top AA-lib program skeleton *********************** Following piece of code you may want to use as base for your future AA-lib program: #include int main (int argc, char **argv) { aa_context *context; /* The information about currently initialized device. */ aa_palette palette; /* Emulatted palette (optional) */ char *framebuffer; /* Parse command line options and output the help text. */ if (!aa_parseoptions (NULL, NULL, &argc, argv) || argc != 1) { printf ("%s", aa_help); exit (1); } /* Initialize output driver. */ context = aa_autoinit (&aa_defparams); if (context == NULL) { printf ("Failed to initialize aalib\n"); exit (1); } /* Pointer to the emulated videoram. */ framebuffer = aa_image (context); /* Create palette if needed: */ for (i = 0; i < 256; i++) aa_setpalette (palette, i, /* R value 0..255 */ , /* G value 0..255 */ , /* B value 0..255 */ ); /* Draw something using: */ aa_putpixel (context, /* X coord */ , /* Y coord */ , /* Color */ ); /* Render whole screen: */ aa_renderpalette (context, palette, aa_defrenderparams, /* Top left conner of rendered area: */ 0, 0, /* Bottom right */ aa_scrwidth (context), aa_scrheight (context)); /* If you don't use palette use following function: aa_render (context, aa_defrenderparams, 0, 0, aa_scrwidth (context), aa_scrheight (context)); */ /* And make it visible: */ aa_flush (context); /* And uninitialize the AA_lib (this probably makes the picture invisible again) */ aa_close (context); return 1; }  File: aalib.info, Node: Initialization, Next: Drawing image, Prev: Skeleton, Up: Top Initialization ************** It is possible to initialize AA-lib in various modes. The main initialization is done by following `aa_init' aa_context *aa_init(struct aa_driver *DRIVER, struct aa_hardware_params *DEFPARAMS, void *DRIVERDATA) This function prepares `aa_context *' type variable used by all AA-lib functions. The DRIVER parameter specifies hardware driver to initialize, DEFPARAMS parameters of hardware you require and DRIVERDATA is used to pass implementation dependent extra information to the hardware driver. To undo all actions done by `aa_init' function, call `aa_close': aa_close(aa_context *CONTEXT) This function frees allocated memory for `aa_context' and call's unintialize function of the output drivers. Initializing AA-lib directly is non-trivial task. Many display drivers and modes are available. Several helper functions are provided to do this job for you. You may want initialize AA-lib in one of the following modes: * Menu: * Initialization as a normal graphics library:: * Initialization as an ascii art renderer:: * Initialization for image saving:: * Specifying hardware parameters::  File: aalib.info, Node: Initialization as a normal graphics library, Next: Initialization as an ascii art renderer, Prev: Initialization, Up: Initialization Initialization as normal graphics library ========================================= If you initialize AA-lib as a normal graphics library you can use one of available hardware drivers. It initializes a display device and sets the output to the screen. Hardware drivers depend on a platform you are running at, configuration of your computer and many other things. Typically more than one driver is available. AA-lib can make the decision for you if you use `aa_autoinit' function: aa_context *aa_autoinit(struct aa_hardware_params *PARAMS) This function initializes the hardware driver and returns `aa_context' structure used by other functions. `NULL' is returned on failure. Parameter PARAMS is used to specify hardware parameters you require. * Menu: * Easy initialization of AA-lib:: * Parsing of command line options:: * How does the autodetection work:: * Recommending drivers::  File: aalib.info, Node: Easy initialization of AA-lib, Next: Parsing of command line options, Prev: Initialization as a normal graphics library, Up: Initialization as a normal graphics library Easy initialization of AA-lib ----------------------------- Following example is the most trivial way to initialize AA-lib. #include #include aa_context *context; void main(void) { aa_parseoptions (NULL, NULL, NULL, NULL); /* Every AA-lib program ought to call the aa_perseoptions at least in this way to make the AAOPTS environment variable work. */ context = aa_autoinit(&aa_defparams); if(context == NULL) { fprintf(stderr,"Cannot initialize AA-lib. Sorry\n"); exit(1); } ... aa_close(context); } This code will do all autodetection/initialization stuff for you and it will fire up AA-lib (using default parameters). Because AA-lib supports output driver using ordinarry stdio functions, the failure is very unlikely, but you ought to check it.  File: aalib.info, Node: Parsing of command line options, Next: How does the autodetection work, Prev: Easy initialization of AA-lib, Up: Initialization as a normal graphics library Parsing of command line options ------------------------------- AA-lib works at many different output devices so it can be initialized with many different options. Somebody might want to change the defaults. This can be done using command line options. This is done using function `aa_parseoptions' that uses `argc/argv' variables and parses options for AA-lib. The options for AA-lib are removed during parsing from `argc/argv' so call to aa_parseoptions can preceede the normal command line options parsing code done by your program. `aa_help' variable contains help about options parsed by `aa_parseoptions'. int aa_parseoptions(aa_hardwareparams *P, aa_renderparams *R, int *ARGC, char **ARGV); First parameter is used for AA-lib initialization. It specifies the hardware parameters you require and is altered by `aa_parseoptions'. It is expected that your program will define his prefered parameters first, call `aa_parseoptions' and then alter it only when necessary to make program working correctly. If you don't brother about the hardware specification, you may use `aa_defparams' variable in both places (here and as passed to `aa_init' function familly). You may also pass NULL to use defaults (aa_defparams variable). The second argument is set of parameters for rendering. It works in similar way as the first parameters. Both of this variables will be explained later. Use NULL to force defaults (aa_defrenderparams). Fuction returns: `1' if OK or `0' on error. The function returns 1 on sucess and 0 on failure. #include #include aa_context *context; void main(int argc, char **argv) { if(!aa_parseoptions(NULL, NULL, &argc, argv) || argc!=1) { printf("Usage: %s [options]\n" "Options:\n" "%s", argv[0], aa_help); exit(1); } context = aa_autoinit(&aa_defparams); if(context == NULL) { fprintf(stderr,"Cannot initialize AA-lib. Sorry\n"); exit(2); } ... aa_close(context); } Note that options are parsed from command line and also from `AAOPTS' enviroment variable. This makes possible to set parameters for all AA-Lib programs. If you pass `NULL' as `argc/argv' only the enviroment variable is parsed. Variable `aa_help' contains help string similiar to this one: -driver select driver available drivers:linux slang X11 -kbddriver select keyboard driver available drivers:slang X11 -kbddriver select mouse driver available drivers:X11 gpm Size options: -width set width -height set height -minwidth set minimal width -minheight set minimal height -maxwidth set maximal width -maxheight set maximal height -recwidth set recomended width -recheight set recomended height Attributes: -dim enable usage of dim (half bright) attribute -bold enable usage of bold (double bright) attribute -reverse enable usage of reverse attribute -normal enable usage of normal attribute -boldfont enable usage of boldfont attrubute -no disable (i.e -nobold) Font rendering options: -extended use all 256 characters -eight use eight bit ascii -font select font(This option have effect just on hardwares where aalib is unable to determine current font available fonts:vga8 vga9 mda14 vga14 X8x13 X8x16 X8x13bold vgagl8 line Rendering options: -inverse enable inverse rendering -noinverse disable inverse rendering -bright set bright (0-255) -contrast set contrast (0-255) -gamma set gamma correction value(0-1) Ditherng options: -nodither disable dithering -floyd_steinberg floyd steinberg dithering -error_distribution error distribution dithering -random set random dithering value(0-inf)  File: aalib.info, Node: How does the autodetection work, Next: Recommending drivers, Prev: Parsing of command line options, Up: Initialization as a normal graphics library How does the autodetection work ------------------------------- To fully understand customizing of `aa_autoinit' you have to know (at least something) how does the autodetection work. All hardware drivers are stored in `aa_drivers' array -- array of pointers to drivers terminated by `NULL' pointer. Order is significant. First driver is tested before the second etc. It is possible to customize your own order of drivers. This can be done using `aa_displayrecomended' list. It's a double linked list of strings that are interpreted as names of drivers. These drivers are tested before `aa_drivers' is procesed. There are several reasons to do it this way. Firstly, this "aditional" list is passed before the first of "standard array" drivers is used. Thus you can recommend the probing order of drivers in a very natural and comfortable way. Second, this method reduces executable file size. Third, you can prefer different drivers on different platforms with no aditional care about current configuration of AA-lib.  File: aalib.info, Node: Recommending drivers, Prev: How does the autodetection work, Up: Initialization as a normal graphics library Recommending drivers -------------------- Manipulation with recomended drivers (`aa_displayrecomended' list) can be done using macros: aa_recomendhidisplay(NAME) aa_recomendlowdisplay(NAME) `aa_displayrecomended' is a cyclic list. You can easily add drivers to the begining (using `aa_recomendhidisplay(name)') or to the end using `aa_recomendlowdisplay(name)'. In other words `aa_recomendhidisplay' inserts with "high priority". (at the beggining of the list). The check for duplicity is performed. Despite `aa_recomendhidisplay(name)', that moves an existing display to the begining, function `aa_recomendlowdisplay(name)' inserts to the end. Thus nothing can lower the required priority of your driver. This two priorities are usefull in many situations. For example: many display drivers recomend keyboard or mouse drivers (it's a good idea use `curses' keyboard when `curses' display driver is used). But some users may want to change it -- for example they might want to drive an aplication from a script and they might want to use `stdin' keyboard driver instead of `X11' recomended by `X11' driver. The following piece of code: aa_recomendhidisplay ("testa1"); aa_recomendlowdisplay("teste1"); aa_recomendhidisplay ("testa2"); aa_recomendlowdisplay("teste2"); aa_recomendlowdisplay("teste1"); aa_recomendhidisplay ("teste1"); will produce the following list: teste1, testa2, testa1, teste1 teste2 And autoprobing will first test in order all drivers on the lists (if such drivers exist in current AA-lib configuration) and then try all available drivers in the default order.  File: aalib.info, Node: Initialization as an ascii art renderer, Next: Initialization for image saving, Prev: Initialization as a normal graphics library, Up: Initialization Initialization as an ascii art renderer ======================================= If you want to use just AA-lib's rendering routines but no output to screen (eg. you have your own output routines) you can use dummy memory driver. It's named `mem_d' and it's initialization should look like this: context = aa_init(MEM_D,&AA_DEFPARAMS,NULL);  File: aalib.info, Node: Initialization for image saving, Next: Specifying hardware parameters, Prev: Initialization as an ascii art renderer, Up: Initialization Initialization for image saving =============================== AA-Lib also have a driver specialized for image saving. It's name is `save_d'(currently only driver that uses `aa_savedata' structure): struct aa_savedata { char *name; struct aa_format *format; FILE *file; }; Field `name' contains a filename (without extension). If you wish to specify file descriptor, you might want to use field `file' instead. Set `name' to `NULL' in this cases. Note that then file will not be closed automatically. In `name' you should use following tags: `%x' X coordinate of page, if pages enabled otherwise none `%y' Y coordinate of page, if pages enabled otherwise none `%c' Coordinates in format: `_%x_%y', if pages enabled otherwise none `%e' Default extension (like `.html') `Format' is a pointer to `aa_format' structure (format information): struct aa_format { int width, height; /*default width/height*/ int pagewidth, pageheight;/*in case output is made from pages*/ int flags; /*should be made from: AA_USE_PAGES AA_NORMAL_SPACES */ int supported; /*mask of supported attributes*/ struct aa_font *font; /*font used by hardware device*/ char *formatname; /*name of format*/ char *extension; /*file extension*/ char *head; /*text at the beggining of file*/ char *end; /*text at the end of file*/ char *newline; /*text at the end of line*/ char *prints[AA_NATTRS]; /*printf seqence for printing character*/ char *begin[AA_NATTRS]; /*text printed at the beggining of block of character at gived attribute*/ char *ends[AA_NATTRS]; /*text printed at the end of block*/ char **conversions /*conversion tabe*/ }; Conversions is array of strings in format: character, replacement, terminated by `NULL'. Following code is an example of `HTML' format description: static char *html_escapes[] = {"<", "<", ">", ">", "&", "&", NULL}; struct aa_format aa_html_format = { 79, 25, 0, 0, 0, AA_NORMAL_MASK | AA_BOLD_MASK | AA_BOLDFONT_MASK, NULL, "Pure html", ".html", "\n Ascii arted image done using aalib\n\n
\n",
           "
\n\n", "\n", /*The order is:normal, dim, bold, boldfont, reverse, special*/ { "%s", "%s", "%s", "%s", "%s", }, {"", "", "", "", "" }, {"", "", "", "", "" }, html_escapes }; Usually you don't need to worry about filling in this large structure since the formats are already defined: `aa_nhtml_format', `aa_html_format', `aa_html_alt_format', `aa_ansi_format', `aa_text_format', `aa_more_format', `aa_hp_format', `aa_hp2_format', `aa_zephyr_format', `aa_irc_format'. All formats are collected in `aa_formats' array. It is array of pointers to `aa_format' terminated by `NULL' All additional new formats are welcomed.  File: aalib.info, Node: Specifying hardware parameters, Prev: Initialization for image saving, Up: Initialization Specifying hardware parameters ============================== In previous examples we used `aa_defparams' without description. This variable says to AA-lib what hardware do you expect. struct aa_hardware_params { struct aa_font *font; int supported; int minwidth, minheight; int maxwidth, maxheight; int recwidth, recheight; int mmwidth, mmheight; int width, height; }; Filed `font' contains the default font. If your driver is unable to autodetect the font used by the output device (such as terminal drivers or most of saving drivers), you may want to select one of the fonts compiled into aalib. Following fonts are available: `font8', `font14', `font16', `font9', `fontline', `fontgl', `fontX13', `fontX16', `fontX13B'. If you specify `NULL' as an argument `font16' is used. Integer `supported' contains a mask. Following masks are available: `AA_NORMAL_MASK', `AA_DIM_MASK', `AA_BOLD_MASK', `AA_BOLDFONT_MASK', `AA_REVERSE_MASK'. You can use `AA_EXTENDED' to enable all 256 of characters or `AA_EIGHT' to enable using of characters numbered higher than 127. This should be set also after the initialization using `aa_setsupported' Other fields are used to specify the display size. If your program requires a fixed size of the display you should set `width',`height' fields (otherwise expect problems ;). You can also adjust how tolerant AA-lib should be. Minimum is set by `minwidth/minheight', maximum is set by `maxwidth/maxheight'. Then you can set `width/height' parameters and call the init function. The nearest value (in specified bounds `coz) will be set. If all these fields are set to zero (default) hardware drivers prompt user for the size and memory/save drivers will set some defaults. Hardware drivers also have default values(forced by enter). If you wanted to modify them you'd have to set `recwidth/recheight'. Note that `minwidth/minheight' and `maxwidth/maxheight' still have an effect even if `width/height' is zero. It is recomended to set all the parameters that can be alternated by user just before `aa_parseoptions' is called, so options can't be changed. `mmwidth/mmheight' should be used to specify size of window in milimeters (but it is ignored by all drivers now ;).  File: aalib.info, Node: Drawing image, Next: Rendering, Prev: Initialization, Up: Top How to draw an image? ********************* AA-lib emulates video-ram so it looks just like a plain memory. It contains `aa_imgheight (context)' lines of `aa_imgwidth(context)' bytes where each of them specifies a grayscale value or an index to a colormap (or graymap ?). Pointer to this memory can be obtained using `aa_image(context)' macro. Note that width and height of videoram differ from physical width/height of a device (stored in `aa_hardwareparams' variables). Currently it is twice bigger because every four pixels are rendered into one character. Future versions should (possibly) support nine pixels. There's nearly no difference in API between classical gfx libraries and AA-lib. There are currently no higher level graphics functions. But AA-lib provides `aa_putpixel(context,x,y,color)' macro. There is no problem to make more complex functions. A great help to a potential programmer is the fact that AA-lib provides a colormap mode emulation. To set the palette you should use macro: aa_setpalette(PALETTE, INDEX, RED, GREEN, BLUE) Red, green and blue components are recalculated into super-grayscale. Values are in range 0-255 where 0 means black. You can also set directly value using something like: palette[index]=value; Another difference is that your aplication is expected to handle various imgwidth/imgheights (in case you didn't exacly specified them in hardwareparams during initialization). Also your aplication should take care for `aa_mmwidth(context)' and `aa_mmheight(context)' values that contain real size in millimeters of output device. You cannot simply expect that pixel has the same width and height as at normal graphics libraries. Many old programs may require some scalling functions to convert images from their internal size (320x200) to AA-Lib real size. Note that image WON'T be displayed on the screen unless it is rendered and FLUSHED !  File: aalib.info, Node: Rendering, Next: Flushing, Prev: Drawing image, Up: Top Rendering of image into ascii-art ********************************* Once image is drawn it needs to be rendered. For this purpose three functions are provided: void aa_fastrender(aa_context *C, int X1, int Y1, int X2, int Y2); void aa_render(aa_context * C, aa_renderparams *P, int X1, int Y1, int X2, int Y2); void aa_renderpalette(aa_context *C, aa_palette TABLE, aa_renderparams *P, int X1, int Y1, int X2, int Y2); `x1', `y1', `x2', `y2' parameters specify Top left/bottom right corner of rendered rectangle. Note that these coordinates are SCREEN not IMAGE ones. So they can be twice smaller !! Specify the range 0...`aa_scrwidth(context)' or 0...`aa_scrheight(context)'). Please do NOT confuse them with image coords otherwise you'll get strange results! Note that the first call of our rendering function can take significantly more time becouse it pre-computes internal look-up tables. Function `aa_fastrender' does very fast (but not as perfect) results. It is designed for aplications that prefers simplicity and speed to the quality of output. Quick and easy way to use render routines is to call: aa_fastrender(context, 0, 0, aa_scrwidth(context), aa_scrheight(context)); Function `aa_render' is a bit more complex than the previous one. It uses 256 colors instead of 16 ones and it has an extra parameter `p'. This parameter allows a control of its advanced features. It's a pointer to the following structure: struct aa_renderparams { int bright, contrast; float gamma; int dither; int inversion; int randomval; }; Values `bright', `contrast', `gamma' let you control the quality of the output image. Brightness of range 0...255 and contrast 0...127; dither can be set to one of the following values: `AA_NONE' disables dithering `AA_ERROR_DISTRIB' enables error distribution dithering `AA_FLOYD_S' enables floyd-steinberg dithering Inversion enables/disables the inversion. Randomval can be used to control the random dithering. If randomval is non-zero a random value in range ( -randomval / 2 , ranomval / 2) is added to every pixel value before the rendering. Note that this can be combined with all other ditherings too. Function `aa_renderpalette' is similiar to `aa_render'. The only difference is that it lets you specify the palette.  File: aalib.info, Node: Flushing, Next: Keyboard, Prev: Rendering, Up: Top Flushing into screen and text output functions ********************************************** We've written the whole charapter for small functions to get your attention. None of them without flusing the image into screen will work. Once AA-lib is started, image drawn and rendered it needs to be finally displayed on the screen. Yes! That's it! You have to flush the data (or you'll get a blank screen:). void aa_flush(aa_context *C); This function will update the screen due to the situation stored in text and attribute buffers. This buffers are filled by rendering but they may be also accesed directly. A pointer to them can be obtained by calling `aa_text(context)' or `aa_attrs(context)' macros. The `aa_text' returns pointer to array representing text output buffer. An "videroram-like" array represented in the same way as `aa_image' (with the screen, not image dimenstions) where each byte is ascii value of character to display. The `aa_attrs' return pointer to array representing additional attribute for each character. Attribute buffer can contain following values: `AA_NORMAL' for normal characters `AA_BOLD' for bold (double bright) characters `AA_DIM' for dim (half bright) characters `AA_BOLDFONT' for characters displayed using bold font `AA_REVERSE' for reversed characters `AA_SPECIAL' this can be used for displaying text over images. Its implementation depends at driver. Most drivers implement it as a white text on a blue background. For more comfortable output you may use: void aa_puts(aa_context *C, int X, int Y, int ATTR, char *S); int aa_printf(aa_context *C, int X, int Y, int ATTR, char *FMT, ...); It puts a string `s' (and atribute `attr') at coordinates `x', `y'. Note that it doesn't move the cursor nor flushes buffers to screen. To move the cursor you have to use following function void aa_gotoxy(aa_context *C, int X, int Y); Some drivers can also support cursor hiding: `aa_hidecursor' or `aa_showcursor' functions.  File: aalib.info, Node: Keyboard, Next: Mouse, Prev: Flushing, Up: Top Keyboard ******** AA-lib provides a simple interface to keyboard. It helps to make aplications portable since the same keyboard interface is available on all platforms. On the other hand it is very "dumb" (who cares...wait till the next version). * Menu: * Initialization of keyboard:: * Getting events::  File: aalib.info, Node: Initialization of keyboard, Next: Getting events, Prev: Keyboard, Up: Keyboard Initialization ============== Keyboard interface needs to be initialized after display driver since the existence of aa_context is required. The following function is available for initializing: int aa_autoinitkbd(struct aa_context *CONTEXT, int MODE); int aa_initkbd(struct aa_context *CONTEXT, struct aa_kbddriver *DRV, int MODE); The situation is very similiar to the initialization of hardware display drivers. The meaning is almost the same. Mode variable can be set to zero for normal keyboard mode or to AA_SENDRELEASE that forces driver to inform you about keys releasing (currently, only a few drivers support this feature :(). You can recommend drivers: aa_recomendhikbd(NAME); aa_recomendlowkbd(NAME); Close context or use void aa_uninitkbd(struct aa_context *CONTEXT); to uninitialize a keyboard driver.  File: aalib.info, Node: Getting events, Prev: Initialization of keyboard, Up: Keyboard Getting events ============== Once keyboard is up you should use following function to get the events: int aa_getevent(aa_context *C, int WAIT); if WAIT is set to 1 functions wait for an event otherwise they just peek for an event (and might return AA_NONE). Event can be: 1. ascii code of pressed key (value is lower than 255) 2. one of the following special keys: AA_UP, AA_DOWN, AA_LEFT, AA_RIGHT, AA_BACKSPACE, AA_ESC 3. value higher or equal to AA_UNKNOWN but lower than AA_RELEASE means unknown key. 4. two special events AA_MOUSE and AA_RESIZE (will be explained later) 5. higher value than AA_RELEASE means released key. To get keycode use: `value &= ~AA_RELEASE'. If you don't want to be informed about such strange events and if you want to know just about the keys use: int aa_getkey(aa_context *C, int WAIT);  File: aalib.info, Node: Mouse, Next: Resizing, Prev: Keyboard, Up: Top Mouse ***** AA-lib also provides a simple mouse interface. It needs to be initialized after the keyboard driver (and uninitialized before) since it uses it to report events. Its initialization is almost identical to keyboards (just replace kbd by mouse in function names). If you need more details read the keyboard section. The only difference is mode parameter. It says what kind of events you should be informed about. It is a mask from the following fields: AA_MOUSEMOVEMASK, AA_MOUSEPRESSMASK and AA_PRESSEDMOVEMAKS. Note that mouse driver should ignore this mask. Set it to AA_MOUSEALLMASK to enables all these events. Mouse event is reported by AA_MOUSE value returned by `aa_getevent' function. Then the mouse possition can be obtained using: void aa_getmouse(aa_context *C, int *X, int *Y, int *B); `X' and `y' are reported in screen coordinates (not image ones). `B' contains state of buttons (AA_BUTTON1, AA_BUTTON2, AA_BUTTON3). void aa_hidemouse(aa_context *C); void aa_showmouse(aa_context *C); This functions should be used to hide/show mouse cursor.  File: aalib.info, Node: Resizing, Next: Other functions, Prev: Mouse, Up: Top Resizing of display ******************* Some display devices (like unix terminals or X11 windows) allows runtime resizing. This event is reported by AA_RESIZE. Then application is expected to call the function int aa_resize(aa_context *C); that changes the values in aa_context and resizes buffer. Function returns 0 if it failed. If everything went OK application must redraw the screen according to the new size because the original one has been lost. If your aplication handles these events at many various places or uses `aa_getkey' the catch of AA_RESIZE is more complicated and you should use the resize handler. void aa_resizehandler(aa_context *C, void (*HANDLER) (aa_context *)); Then the resize handler is called by `aa_getevent' or `aa_getkey' functions when AA_RESIZE event appears. Some simple apps that don't rely on the display size and they redraw the whole screen after every event (some animations) should also use a bit tricky construction: aa_resizehandler(aa_context *C, (void *)aa_resize); This will cause automatical handling of resize events without any special stuff done by the application.  File: aalib.info, Node: Other functions, Next: Designing new driver, Prev: Resizing, Up: Top Other functions *************** aa_renderparams *aa_getrenderparams(void); This functions allocates a copy of aa_defrenderparams variable. It should be used by aplications that use more rendering parameters and that don't want to change aa_defrenderparams every time. int aa_registerfont(struct aa_font *F); This functions allows you to register a new font into font databaze (that is contained in `aa_fonts' array). This is often used by hardware drivers (that autodetect their fonts ...). void aa_setsupported(aa_context *C, int SUPPORTED); Allows you to change a supported variable (see Initialization) at runtime. void aa_setfont(aa_context *C, struct aa_font *FONT); Allows you to change a font used for approximation tables at runtime. void aa_edit(aa_context *C, int X, int Y, int SIZE, char *S, int MAXSIZE); A simple line editor: `X', `y', `size' express possitions of editor window, `s' - pointer to string you may want to edit and `maxsize' specifies the maximal size of input line. struct aa_edit *aa_createedit(aa_context *C, int X, int Y, int SIZE, char *S, int MAXSIZE); void aa_editkey(struct aa_edit *E, int C); Event handled version of an editor. `aa_createedit' fills in the struct `aa_edit' for the input line and `aa_editkey' processes an event for editor. Can be used by some "user friendly (huh:)" aplications.... aalib-1.4.0/doc/aalib.info-20000644000766200001440000014103507272031253011107 This is aalib.info, produced by makeinfo version 4.0 from aalib.texinfo. INFO-DIR-SECTION Libraries START-INFO-DIR-ENTRY * AA-lib: (aalib). An ASCII-art graphics library END-INFO-DIR-ENTRY (C) 1997 Jan Hubicka & Kamil Toman Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies.  File: aalib.info, Node: Designing new driver, Next: Reference, Prev: Other functions, Up: Top Designing new driver ******************** To write new driver is quite easy. You need to implement just few very basic functions (like initialization, drawing to screen etc...) and register it in the driver registry. There is separate drivers for screen, mouse and keyboard. Display driver -------------- Display driver is the most significant driver (of course) so it is recomended to implement it first. Its structure is as follows: struct aa_driver { char *shortname, *name; int (*init) (struct aa_hardware_params *, void *, struct aa_hardware_params); void (*uninit) (struct aa_context *); void (*getsize) (struct aa_context *, int *, int *); void (*setattr) (struct aa_context *, int); void (*print) (struct aa_context *, char *); void (*gotoxy) (struct aa_context *, int, int); void (*flush) (struct aa_context *); void (*cursormode) (struct aa_context *, int); }; - Text: shortname SHORTNAME is an string that contain short name of your driver. Short name is expected to be one word name like "`linux'". - Text: name NAME is an string that contain full name of your driver. It should contain version etc. like "`Linux console driver version 1.0'" - Function: init This function is expected to initialize driver. It returns 0 if failed or 1 if driver is initialized. Note that driver can't produce any garbage when failed since AAlib will try to initialize other driver. First parameter specifies hardware parameters that user expect. Structure contain mask of attributes and recomended size. Mechanizm of handling sizes is described in section. Second parameter is pointer to user data that should be passed by application. It is `NULL' by default. Last is pointer to hardware_params structure, where driver will put parameters of initialized device. This structure holds information about atributes and parameters supported by your driver. *Note Initialization for image saving::. Just first two fields are used (`font' and `supported'). FONT is pointer to font structure used by hardware. This field should be filed at runtime (see `aalinux.c' for example), set statically to one of aalib's fonts or set to `NULL' if hardware does not allow detection of font (such as text terminals). SUPPORTED is mask of all atributes supported by your hardware ( `AA_NORMAL_MASK', `AA_DIM_MASK', `AA_BOLD_MASK', `AA_BOLDFONT_MASK', `AA_REVERSE_MASK') and rage of useable characters (by default just standard ASCII characters are used) use `AA_EXTENDED' if your driver supports all characters (0-255). `AA_ALL' should be used if your driver displays characters instead of blanks (cr, tab etc..), `AA_EIGHT' lets AAlib use characters greater than 128. `Mmwidth' and `mmheight' fields should be also set if is possible to determine physical size of screen/window. *Note Specifying hardware parameters:: Last parameter should be used to define pointer that will be later set to `driverdata' field of `aa_context'. If driver needs some additional data, it should alloc driverdata structure, that will hold this data. AAlib will automatically free this pointer at `aa_close' if it is non-NULL. This function should also recomend best available keyboard and mouse drivers. *Note How does the autodetection work::. - Function: uninit This functin uninitializes driver and frees all resources used by it. - Function: getsize This function returns width and height of screen in characters. There is two alternate ways to implement screen output. First way is commonly used by text libraries - print/gotoxy/setattr mechanizm. Second one is flush. Flush should be fast function that display AAlibs internal buffer to screen. This way is preffered. In case PRINT field is set to `NULL' AAlib will call just flush and expect that driver will update screen automatically from internal buffers. When both PRINT and FLUSH are non`NULL' AAlib will first use PRINT/SETATTR/GOTOXY to update screen and then call FLUSH. Note that in case PRINT is `NULL', SETATTR should be also `NULL' but `gotoxy' needs to be non`NULL' since it is used to sed hardware cursor. - Function: setattr Set current attributes - Function: print Print text at current cursor possition using current attrubutes - Function: gotoxy Change cursor possition (coordinated begins by 0,0 in top left corner) - Function: flush Flush current screen to output. In case you use AAlibs internal buffers to update screen (not PRINT) mechanizm get pointer to text and attribute buffer using `aa_text' and `aa_attr' functions. Buffers are formated into "normal" videoram - starting in top left corner and continue like english text. Attribute buffer should contain `AA_NORMAL', `AA_BOLD', `AA_BOLDFONT', `AA_DIM', `AA_REVERSE' and `AA_SPECIAL' values. - Function: cursormode This function is used to enable/disable cursor. 1 means enable, 0 disable. Should be set to `NULL' if your hardware don't support this. Keyboard driver --------------- This driver is defined by structure: struct aa_kbddriver { char *shortname, *name; int flags; int (*init) (struct aa_context *, int mode); void (*uninit) (struct aa_context *); int (*getkey) (struct aa_context *, int); }; - String: shortname - String: name This fields have similiar as in display drivers. - Integer: flags This field informs about extensions supported by driver. Currently should be set to `AA_SENDRELEASE' in case driver should inform about key releases too. - Function: init Similiar functionality as in display drivers. MODE should be set to 0 or `AA_SENDRELEASE' in case application wants to be informed about key releases too. Note that driver should send releases even MODE is 0. This function should also recomend best available mouse driver. *Note How does the autodetection work::. - Function: uninit Uninitializes driver - Function: getkey This funtion return key. Second parameters is set to 1 if function is expected to wait for key or 0 if is expected to return `AA_NONE' of no event is pending. Function returns also key releases -- like normal keys masked by `AA_RELEASE'. It also recognizes some special keys. *Note Getting events::. It should also cooperate with mouse driver and return `AA_MOUSE' if mouse event is pending. Second way is to ignore wait parameters and never wait for key when mouse driver is enabled. This way is not recomended for multitasking enviroments. Mouse driver ------------ This driver is defined by structure: struct aa_mousedriver { char *shortname, *name; int flags; int (*init) (struct aa_context *, int mode); void (*uninit) (struct aa_context *); void (*getmouse) (struct aa_context *, int *x, int *y, int *buttons); void (*cursormode) (struct aa_context *,int); }; First five fields has very similiar meaning to ones in keyboard driver. `flags' is set to all events driver should report about: `AA_MOUSEMOVEMASK', `AA_MOUSEPRESSMASK' and `AA_PRESSEDMOVEMAKS'. All of them are colected into `AA_MOUSEALLMASK'. If driver has showcursor/hidecursor functionality set also flag `AA_HIDECURSOR'. MODE parameter to INIT function should be set to mask of events application wants to know about, like in FLAGS. - Function: getmouse This function returns coordinates of cursor and mask of buttons (`AA_BUTTON1', `AA_BUTTON2', `AA_BUTTON3'). Coordinates are same as for `gotoxy' call. - Function: cursormode This function is used to show/disable mouse cursor. Should be set to `NULL' if not supported.  File: aalib.info, Node: Reference, Next: Index, Prev: Designing new driver, Up: Top Reference ********* * Menu: * aa_attrs:: returns pointer to the text output buffer used by AA-lib. * aa_autoinitkbd:: easy to use AA-lib keyboard initialization function. * aa_autoinitmouse:: easy to use AA-lib mouse initialization function. * aa_autoinit:: easy to use AA-lib initialization function. * aa_close:: close the AA-lib context. * aa_createedit:: Simple interactive line editor provided as helper function. * aa_currentfont:: returns specification of the fonts used by AA-lib rendering routines. * aa_defparams:: default hardware paramters requested by AA-lib programs. * aa_defrenderparams:: default rendering parameters. * aa_displayrecommended::List of recommended drivers. * aa_dithernames:: Names of dithering methods supported by AA-lib. * aa_drivers:: NULL-terminated array of output drivers available in AA-lib. * aa_editkey:: Notify the line editor about keypress. * aa_edit:: Simple interactive line editor. * aa_fastrender:: simple and fast AA-lib rendering function. * aa_fonts:: Null-terminated array of available fonts. * aa_formats:: NULL terminated array of save formats supported by AA-lib. * aa_getevent:: keyboard functions * aa_getkey:: return next keypress event from queue. * aa_getmouse:: Get mouse position as specified by last mouse event read by aa_getevent. * aa_gotoxy:: move the hardware cursor (if any) to specified position. * aa_help:: AA-lib help string for the default command line parser. * aa_hidecursor:: hide the hardware cursor. * aa_hidemouse:: hide the mouse cursor. * aa_image:: returns pointer to the framebuffer emulated by AA-lib. * aa_imgheight:: returns height of the emulated image in pixels. * aa_imgwidth:: returns width of the emulated image in pixels. * aa_initkbd:: initialize the AA-lib keyboard driver. * aa_initmouse:: initialize the AA-lib mouse driver. * aa_init:: open the output display for AA-lib. * aa_kbddrivers:: NULL-terminated array of keyboard drivers available in AA_lib. * aa_kbdrecommended:: List of recommended drivers. * aa_mmheight:: returns height of the output screen in millimeters. * aa_mmwidth:: returns width of the output screen in millimeters. * aa_mousedrivers:: NULL terminated array of mouse drivers supported by AA-lib. * aa_mouserecommended:: List of recommended drivers. * aa_parseoptions:: parse the standard command line options used by AA-lib. * aa_printf:: print text to AA-lib output buffers. * aa_putpixel:: put pixel to emulated framebuffer * aa_puts:: output string to AA-lib output buffers. * aa_recommendhidisplay::insert the given driver on beggining of the list of recommended display drivers. * aa_recommendhikbd:: insert the given driver on beggining of the list of recommended keyboard drivers. * aa_recommendhimouse:: insert the given driver on beggining of the list of recommended mouse drivers. * aa_recommendhi:: insert the given driver on beggining of the list of recommended drivers. * aa_recommendlowdisplay::Add the given driver to the end of list of display recommended drivers. * aa_recommendlowkbd:: Add the given driver to the end of list of keyboard recommended drivers. * aa_recommendlowmouse:: Add the given driver to the end of list of mouse recommended drivers. * aa_recommendlow:: Add the given driver to the end of list of recommended drivers. * aa_registerfont:: add new font specification to aa_fonts array. * aa_render:: convert image buffer to ASCII-art. * aa_resizehandler:: Set user handler to be called on resize event. * aa_resize:: resize functions * aa_scrheight:: returns height of the output screen in characters. * aa_scrwidth:: returns width of the output screen in characters. * aa_setfont:: set font specification to be used by rendering functions. * aa_setsupported:: alter the "supported" field of hardware_params structure used by AA-lib * aa_showcursor:: show the hardware cursor. * aa_showmouse:: show the mouse cursor. * aa_text:: returns pointer to the text output buffer used by AA-lib. * aa_uninitkbd:: uninitialize the keyboard driver. * aa_uninitmouse:: uninitialize the mouse driver. * mem_d:: AA-lib memory driver. * save_d:: AA-lib driver used to save ascii-art image into file in used specified format.  File: aalib.info, Node: aa_attrs, Next: aa_autoinitkbd, Up: Reference aa_attrs ======== #include char *aa_attrs(aa_context *a); Parameters ========== `aa_context *a' Specifies the AA-lib context to operate on. Description =========== The attribute output buffer is simple array of characters specifying the attributes. The array is organizated in the aa_scrheight (a) rows of aa_scrwidth(a) characters. Return value ============ Pointer the text output buffer used by AA-lib.  File: aalib.info, Node: aa_autoinitkbd, Next: aa_autoinitmouse, Prev: aa_attrs, Up: Reference aa_autoinitkbd ============== #include int aa_autoinitkbd ( struct aa_context *context, int mode ); Parameters ========== `struct aa_context *context' Specifies the AA-lib context to operate on. `int mode' Mask of extra features you request. Can contain AA_SENDRELEASE if you are interested in release events too. Description =========== Attempts to find available keyboard driver supporting the specified mode. First attempts to initialize the recommended drivers and then in order drivers available in the aa_kbddrivers array (all regular output drivers compiled into AA-lib). Every AA-lib program ought to have call to aa_parseoptions before first call to aa_init. Return value ============ 1 when succesfull or 0 on failure.  File: aalib.info, Node: aa_autoinitmouse, Next: aa_autoinit, Prev: aa_autoinitkbd, Up: Reference aa_autoinitmouse ================ #include int aa_autoinitmouse ( struct aa_context *c, int mode ); Parameters ========== `struct aa_context *c' Specifies the AA-lib context to operate on. `int mode' Mask of extra features you request. No such features are available in the current AA-lib version. Description =========== Attempts to find available mouse driver supporting the specified mode. First attempts to initialize the recommended drivers and then in order drivers available in the aa_kbddrivers array (all regular output drivers compiled into AA-lib). Return value ============ 1 when succesfull or 0 on failure.  File: aalib.info, Node: aa_autoinit, Next: aa_close, Prev: aa_autoinitmouse, Up: Reference aa_autoinit =========== #include aa_context *aa_autoinit(const struct aa_hardware_params *params); Parameters ========== `const struct aa_hardware_params *params' Hardware parameters you want. Use aa_defparams for default values. Description =========== Attempts to find available output driver supporting the specified parameters. First attempts to initialize the recommended drivers and then in order drivers available in the aa_drivers array (all regular output drivers compiled into AA-lib). Return value ============ Pointer to initialized context structure when succesfull or NULL on failure.  File: aalib.info, Node: aa_close, Next: aa_createedit, Prev: aa_autoinit, Up: Reference aa_close ======== #include void aa_close(aa_context *c); Parameters ========== `aa_context *c' Specifies the AA-lib context to operate on. Description =========== Uninitialize all activated drivers and frees the memory used by context structures.  File: aalib.info, Node: aa_createedit, Next: aa_currentfont, Prev: aa_close, Up: Reference aa_createedit ============= #include struct aa_edit *aa_createedit ( aa_context *c, int x, int y, int size, char *s, int maxsize ); Parameters ========== `aa_context *c' Specifies the AA-lib context to operate on. `int x' X coordinate of the edited text. `int y' Y coordinate of the edited text. `int size' Length of the editor window. `char *s' Buffer to edit (containing default value). `int maxsize' Size of the buffer. Description =========== You might use this function to input strings in AA-lib programs. This function initializes the aa_edit structure used by event-based editor. You might then call the aa_editkey function when key is pressed. Return value ============ Pointer to edit context when succesfull and NULL on failure.  File: aalib.info, Node: aa_currentfont, Next: aa_defparams, Prev: aa_createedit, Up: Reference aa_currentfont ============== #include const struct aa_font *aa_currentfont(aa_context *a); Parameters ========== `aa_context *a' Specifies the AA-lib context to operate on. Description =========== Returns specification of the fonts used by AA-lib rendering routines.  File: aalib.info, Node: aa_defparams, Next: aa_defrenderparams, Prev: aa_currentfont, Up: Reference aa_defparams ============ #include extern struct aa_hardware_params aa_defparams; Description =========== Pa Default hardware paramters requested by AA-lib programs. Passed to aa_init function familly.  File: aalib.info, Node: aa_defrenderparams, Next: aa_displayrecommended, Prev: aa_defparams, Up: Reference aa_defrenderparams ================== #include extern struct aa_renderparams aa_defrenderparams; Description =========== Default rendering parameters. Passed to aa_render function familly.  File: aalib.info, Node: aa_displayrecommended, Next: aa_dithernames, Prev: aa_defrenderparams, Up: Reference aa_displayrecommended ===================== #include extern aa_linkedlist *aa_displayrecommended; Description =========== List of recommended drivers is used by aa_autoinit familly of functions and altered by aa_recommend familly of functions.  File: aalib.info, Node: aa_dithernames, Next: aa_drivers, Prev: aa_displayrecommended, Up: Reference aa_dithernames ============== #include extern const char *const aa_dithernames[]; Description =========== NULL terminated array containing the names of supported dithering methods as ascii strings.  File: aalib.info, Node: aa_drivers, Next: aa_editkey, Prev: aa_dithernames, Up: Reference aa_drivers ========== #include extern const struct aa_driver *const aa_drivers[]; Description =========== NULL-terminated array of output drivers available in AA-lib.  File: aalib.info, Node: aa_editkey, Next: aa_edit, Prev: aa_drivers, Up: Reference aa_editkey ========== #include void aa_editkey ( struct aa_edit *e, int c ); Parameters ========== `struct aa_edit *e' Editor context to use (see aa_createedit). `int c' Key pressed. Description =========== Notify the line editor about keypress.  File: aalib.info, Node: aa_edit, Next: aa_fastrender, Prev: aa_editkey, Up: Reference aa_edit ======= #include void aa_edit ( aa_context *c, int x, int y, int size, char *s, int maxsize ); Parameters ========== `aa_context *c' Specifies the AA-lib context to operate on. `int x' X coordinate of the edited text. `int y' Y coordinate of the edited text. `int size' Length of the editor window. `char *s' Buffer to edit (containing default value). `int maxsize' Size of the buffer. Description =========== This function produces the simple interactive line editor that can be used by AA-lib programs to input strings.  File: aalib.info, Node: aa_fastrender, Next: aa_fonts, Prev: aa_edit, Up: Reference aa_fastrender ============= #include void aa_fastrender ( aa_context *c, int x1, int y1, int x2, int y2 ); Parameters ========== `aa_context *c' Specifies the AA-lib context to operate on. `int x1' Column of top left coner of rendered area (in characters!). `int y1' Row of top left coner of rendered area. `int x2' Column of bottom right coner of rendered area. `int y2' Row of bottom right coner of rendered area. Description =========== This function does the trick of converting the emulated framebuffer into high quality ASCII-art. It is slightly faster and less flexible the aa_render function. Note that to see the effect you need to call aa_flush too. First call to this function may take a while, because the rendering tables are produced.  File: aalib.info, Node: aa_fonts, Next: aa_formats, Prev: aa_fastrender, Up: Reference aa_fonts ======== #include extern const struct aa_font *aa_fonts[]; Description =========== Null-terminated array of available fonts.  File: aalib.info, Node: aa_formats, Next: aa_getevent, Prev: aa_fonts, Up: Reference aa_formats ========== #include extern const struct aa_format *const aa_formats[]; Description =========== NULL terminated array of save formats supported by AA-lib.  File: aalib.info, Node: aa_getevent, Next: aa_getkey, Prev: aa_formats, Up: Reference aa_getevent =========== #include int aa_getevent ( aa_context *c, int wait ); Parameters ========== `aa_context *c' Specifies the AA-lib context to operate on. `int wait' 1 if you wish to wait for the even when queue is empty. Description =========== Return next event from queue. Return next even from queue. Optionally wait for even when queue is empty. Return value ============ Next event from queue (values lower than 256 are used to report ascii values of pressed keys and higher values have special meanings) See the AA-lib texinfo documentation for more details. 0 is returned when queue is empty and wait is set to 0.  File: aalib.info, Node: aa_getkey, Next: aa_getmouse, Prev: aa_getevent, Up: Reference aa_getkey ========= #include int aa_getkey ( aa_context *c, int wait ); Parameters ========== `aa_context *c' Specifies the AA-lib context to operate on. `int wait' 1 if you wish to wait for the even when queue is empty. Description =========== Return next keypress event from queue. Return value ============ Next keypress event from queue (values lower than 256 are used to report ascii values of pressed keys and higher values are used to represent some special keys like arrows) See the AA-lib texinfo documentation for more details.  File: aalib.info, Node: aa_getmouse, Next: aa_gotoxy, Prev: aa_getkey, Up: Reference aa_getmouse =========== #include void aa_getmouse ( aa_context *c, int *x, int *y, int *b ); Parameters ========== `aa_context *c' Specifies the AA-lib context to operate on. `int *x' Used to return X coordinate of mouse in characters. `int *y' Used to return Y coordinate of mouse in characters. `int *b' Used to return button mask of mouse. (Values used are AA_BUTTON1, AA_BUTTON2 and AA_BUTTON3). Description =========== Get mouse position as specified by last mouse event read by aa_getevent.  File: aalib.info, Node: aa_gotoxy, Next: aa_help, Prev: aa_getmouse, Up: Reference aa_gotoxy ========= #include void aa_gotoxy ( aa_context *c, int x, int y ); Parameters ========== `aa_context *c' Specifies the AA-lib context to operate on. `int x' X coordinate of new position. `int y' Y coordinate of the position. Description =========== Move the hardware cursor (if any) to specified position. To see the effect you need to call aa_flush too.  File: aalib.info, Node: aa_help, Next: aa_hidecursor, Prev: aa_gotoxy, Up: Reference aa_help ======= #include extern const char *const aa_help; Description =========== AA-lib help string for the default command line parser.  File: aalib.info, Node: aa_hidecursor, Next: aa_hidemouse, Prev: aa_help, Up: Reference aa_hidecursor ============= #include void aa_hidecursor(aa_context *c); Parameters ========== `aa_context *c' Specifies the AA-lib context to operate on. Description =========== Hide the hardware cursor. This function may be ignored by some drivers.  File: aalib.info, Node: aa_hidemouse, Next: aa_image, Prev: aa_hidecursor, Up: Reference aa_hidemouse ============ #include void aa_hidemouse(aa_context *c); Parameters ========== `aa_context *c' Not Documented. Description =========== Hide the mouse cursor. This function may be ignored by some drivers.  File: aalib.info, Node: aa_image, Next: aa_imgheight, Prev: aa_hidemouse, Up: Reference aa_image ======== #include char *aa_image(aa_context *a); Parameters ========== `aa_context *a' Specifies the AA-lib context to operate on. Description =========== The framebuffer is simple array of characters specifying the brightness value (or palette index depending on the aa_render call). The array is organizated in the aa_imgheight (a) rows of aa_imgwidth(a) characters. Return value ============ Pointer to framebuffer emulated by AA-lib.  File: aalib.info, Node: aa_imgheight, Next: aa_imgwidth, Prev: aa_image, Up: Reference aa_imgheight ============ #include int aa_imgheight(aa_context *a); Parameters ========== `aa_context *a' Specifies the AA-lib context to operate on. Description =========== Returns height of the emulated image in pixels.  File: aalib.info, Node: aa_imgwidth, Next: aa_initkbd, Prev: aa_imgheight, Up: Reference aa_imgwidth =========== #include int aa_imgwidth(aa_context *a); Parameters ========== `aa_context *a' Specifies the AA-lib context to operate on. Description =========== Returns width of the emulated image in pixels.  File: aalib.info, Node: aa_initkbd, Next: aa_initmouse, Prev: aa_imgwidth, Up: Reference aa_initkbd ========== #include int aa_initkbd ( struct aa_context *context, const struct aa_kbddriver *drv, int mode ); Parameters ========== `struct aa_context *context' Specifies the AA-lib context to operate on. `const struct aa_kbddriver *drv' Driver you wish to use. `int mode' Mask of extra features you request. Can contain AA_SENDRELEASE if you are interested in release events too. Description =========== This is the most primitive AA-lib keyboard initialization function. Allows better control over the process than the easier to use aa_autoinitkbd function. Return value ============ 1 on success and 0 on fail.  File: aalib.info, Node: aa_initmouse, Next: aa_init, Prev: aa_initkbd, Up: Reference aa_initmouse ============ #include int aa_initmouse ( struct aa_context *c, const struct aa_mousedriver *d, int mode ); Parameters ========== `struct aa_context *c' Specifies the AA-lib context to operate on. `const struct aa_mousedriver *d' Driver you wish to use. `int mode' Mask of extra features you request. No such features are available in the current AA-lib version. Description =========== This is the most primitive AA-lib keyboard initialization function. Allows better control over the process than the easier to use aa_autoinitmouse function. Return value ============ 1 on success and 0 on fail.  File: aalib.info, Node: aa_init, Next: aa_kbddrivers, Prev: aa_initmouse, Up: Reference aa_init ======= #include aa_context *aa_init ( const struct aa_driver *driver, const struct aa_hardware_params *defparams, const void *driverdata ); Parameters ========== `const struct aa_driver *driver' Driver you want to use. Available drivers are listed in the NULL terminated aa_drivers array. `const struct aa_hardware_params *defparams' Hardware parameters you want. Use aa_defparams for default values. `const void *driverdata' This pointer is passed dirrectly to driver used to specify additional driver dependent parameters. Description =========== This is the most primitive AA-lib initialization function. Allows better control over the process than the easier to use aa_autoinit function. Every AA-lib program ought to have call to aa_parseoptions before first call to aa_init. Return value ============ Pointer to new AA-lib context or NULL if failed.  File: aalib.info, Node: aa_kbddrivers, Next: aa_kbdrecommended, Prev: aa_init, Up: Reference aa_kbddrivers ============= #include extern const struct aa_kbddriver *const aa_kbddrivers[]; Description =========== NULL-terminated array of keyboard drivers available in AA_lib.  File: aalib.info, Node: aa_kbdrecommended, Next: aa_mmheight, Prev: aa_kbddrivers, Up: Reference aa_kbdrecommended ================= #include extern aa_linkedlist *aa_kbdrecommended; Description =========== List of recommended drivers is used by aa_autoinit familly of functions and altered by aa_recommend familly of functions.  File: aalib.info, Node: aa_mmheight, Next: aa_mmwidth, Prev: aa_kbdrecommended, Up: Reference aa_mmheight =========== #include int aa_mmheight(aa_context *a); Parameters ========== `aa_context *a' Specifies the AA-lib context to operate on. Description =========== Returns height of the output screen in millimeters.  File: aalib.info, Node: aa_mmwidth, Next: aa_mousedrivers, Prev: aa_mmheight, Up: Reference aa_mmwidth ========== #include int aa_mmwidth(aa_context *a); Parameters ========== `aa_context *a' Specifies the AA-lib context to operate on. Description =========== Returns width of the output screen in millimeters.  File: aalib.info, Node: aa_mousedrivers, Next: aa_mouserecommended, Prev: aa_mmwidth, Up: Reference aa_mousedrivers =============== #include extern const struct aa_mousedriver *const aa_mousedrivers[]; Description =========== NULL terminated array of mouse drivers supported by AA-lib.  File: aalib.info, Node: aa_mouserecommended, Next: aa_parseoptions, Prev: aa_mousedrivers, Up: Reference aa_mouserecommended =================== #include extern aa_linkedlist *aa_mouserecommended; Description =========== List of recommended drivers is used by aa_autoinit familly of functions and altered by aa_recommend familly of functions.  File: aalib.info, Node: aa_parseoptions, Next: aa_printf, Prev: aa_mouserecommended, Up: Reference aa_parseoptions =============== #include int aa_parseoptions ( struct aa_hardware_params *p, aa_renderparams *r, int *argc, char **argv ); Parameters ========== `struct aa_hardware_params *p' Hardware parameters structure to alter. It is expected that this structure only with necessary modifications will be later used to initialize the AA-lib context. `aa_renderparams *r' Rendering prameters structure to alter. It is expected that this structure only with necessary modifications will be later used to render images. `int *argc' Pointer to argc parameter passed to function "main". `char **argv' Pointer to argv parameter passed to function "main". Description =========== Use this function to parse the standard command line options used by AA-lib. Every AA-lib program ought to call this function to let user specify some extra parameters. The function alters the aa_hardware_params and aa_renderparams structures and removes known options from the argc/argv lists. It also parse the AAOPTS environment variable. When called with NULL for the argc/argv parameters, it parses AAOPTS only. At least this call ought to be in every AA-lib program. Return value ============ 1 when sucesfull and 0 on failure. The program then can print the help text available in aa_help variable.  File: aalib.info, Node: aa_printf, Next: aa_putpixel, Prev: aa_parseoptions, Up: Reference aa_printf ========= #include int aa_printf ( aa_context *c, int x, int y, enum aa_attribute attr, const char *fmt, ... ); Parameters ========== `aa_context *c' Specifies the AA-lib context to operate on. `int x' X coordinate of the first character. `int y' Y coordinate of the first character. `enum aa_attribute attr' Attribute to use. Possible values for an `enum aa_attribute' are as follows: `AA_NORMAL' Normal characters. `AA_DIM' Dark characters. `AA_BOLD' Bright characters. `AA_BOLDFONT' Characters rendered in bold font. `AA_REVERSE' Reversed (black on whilte) characters. `AA_SPECIAL' Render characters in a way easilly visible on the screen. The exact rendering is driver dependent, but this mode ought to be used to output texts you want to make easilly visible in the image. `const char *fmt' Text to output in standard printf format. `...' Not Documented. Description =========== Print given text to AA-lib output buffers. To see the effect you need to call aa_flush too.  File: aalib.info, Node: aa_putpixel, Next: aa_puts, Prev: aa_printf, Up: Reference aa_putpixel =========== #include void aa_putpixel ( aa_context *c, int x, int y, int color ); Parameters ========== `aa_context *c' Specifies the AA-lib context to operate on. `int x' X coordinate. `int y' Y coordinate. `int color' Palette index or brightness value (0..255). Description =========== Put pixel to emulated framebuffer.  File: aalib.info, Node: aa_puts, Next: aa_recommendhidisplay, Prev: aa_putpixel, Up: Reference aa_puts ======= #include void aa_puts ( aa_context *c, int x, int y, enum aa_attribute attr, const char *s ); Parameters ========== `aa_context *c' Specifies the AA-lib context to operate on. `int x' X coordinate of the first character. `int y' Y coordinate of the first character. `enum aa_attribute attr' Attribute to use. Possible values for an `enum aa_attribute' are as follows: `AA_NORMAL' Normal characters. `AA_DIM' Dark characters. `AA_BOLD' Bright characters. `AA_BOLDFONT' Characters rendered in bold font. `AA_REVERSE' Reversed (black on whilte) characters. `AA_SPECIAL' Render characters in a way easilly visible on the screen. The exact rendering is driver dependent, but this mode ought to be used to output texts you want to make easilly visible in the image. `const char *s' String to output. Description =========== Output given string to AA-lib output buffers. To see the effect you need to call aa_flush too.  File: aalib.info, Node: aa_recommendhidisplay, Next: aa_recommendhikbd, Prev: aa_puts, Up: Reference aa_recommendhidisplay ===================== #include void aa_recommendhidisplay(const char *name); Parameters ========== `const char *name' Name of the driver (ought to match the "shortname" field of the driver definition structure). Description =========== Insert the given driver on beggining of the list of recommended display drivers.  File: aalib.info, Node: aa_recommendhikbd, Next: aa_recommendhimouse, Prev: aa_recommendhidisplay, Up: Reference aa_recommendhikbd ================= #include void aa_recommendhikbd(const char *name); Parameters ========== `const char *name' Name of the driver (ought to match the "shortname" field of the driver definition structure). Description =========== Insert the given driver on beggining of the list of recommended keyboard drivers.  File: aalib.info, Node: aa_recommendhimouse, Next: aa_recommendhi, Prev: aa_recommendhikbd, Up: Reference aa_recommendhimouse =================== #include void aa_recommendhimouse(const char *name); Parameters ========== `const char *name' Name of the driver (ought to match the "shortname" field of the driver definition structure). Description =========== Insert the given driver on beggining of the list of recommended mouse drivers.  File: aalib.info, Node: aa_recommendhi, Next: aa_recommendlowdisplay, Prev: aa_recommendhimouse, Up: Reference aa_recommendhi ============== #include void aa_recommendhi ( aa_linkedlist **l, const char *name ); Parameters ========== `aa_linkedlist **l' List to operate on (aa_displayrecommended, aa_kbdrecommended or aa_mouserecommended). `const char *name' Name of the driver (ought to match the "shortname" field of the driver definition structure). Description =========== Insert the given driver on beggining of the list of recommended drivers.  File: aalib.info, Node: aa_recommendlowdisplay, Next: aa_recommendlowkbd, Prev: aa_recommendhi, Up: Reference aa_recommendlowdisplay ====================== #include void aa_recommendlowdisplay(const char *name); Parameters ========== `const char *name' Name of the driver (ought to match the "shortname" field of the driver definition structure). Description =========== Add the given driver to the end of list of display recommended drivers.  File: aalib.info, Node: aa_recommendlowkbd, Next: aa_recommendlowmouse, Prev: aa_recommendlowdisplay, Up: Reference aa_recommendlowkbd ================== #include void aa_recommendlowkbd(const char *name); Parameters ========== `const char *name' Name of the driver (ought to match the "shortname" field of the driver definition structure). Description =========== Add the given driver to the end of list of keyboard recommended drivers.  File: aalib.info, Node: aa_recommendlowmouse, Next: aa_recommendlow, Prev: aa_recommendlowkbd, Up: Reference aa_recommendlowmouse ==================== #include void aa_recommendlowmouse(const char *name); Parameters ========== `const char *name' Name of the driver (ought to match the "shortname" field of the driver definition structure). Description =========== Add the given driver to the end of list of mouse recommended drivers.  File: aalib.info, Node: aa_recommendlow, Next: aa_registerfont, Prev: aa_recommendlowmouse, Up: Reference aa_recommendlow =============== #include void aa_recommendlow ( aa_linkedlist **l, const char *name ); Parameters ========== `aa_linkedlist **l' List to operate on (aa_displayrecommended, aa_kbdrecommended or aa_mouserecommended). `const char *name' Name of the driver (ought to match the "shortname" field of the driver definition structure). Description =========== Add the given driver to the end of list of recommended drivers.  File: aalib.info, Node: aa_registerfont, Next: aa_render, Prev: aa_recommendlow, Up: Reference aa_registerfont =============== #include int aa_registerfont(const struct aa_font *f); Parameters ========== `const struct aa_font *f' Font specification structure. Description =========== Add new font specification to aa_fonts array. Return value ============ 1 when succesfull or 0 on failure.  File: aalib.info, Node: aa_render, Next: aa_resizehandler, Prev: aa_registerfont, Up: Reference aa_render ========= #include void aa_render ( aa_context *c, const aa_renderparams *p, int x1, int y1, int x2, int y2 ); Parameters ========== `aa_context *c' Specifies the AA-lib context to operate on. `const aa_renderparams *p' Rendering parametters used to specify brightness, gamma correction and other usefull stuff. Use aa_defrenderparams for default values. `int x1' Column of top left coner of rendered area (in characters!). `int y1' Row of top left coner of rendered area. `int x2' Column of bottom right coner of rendered area. `int y2' Row of bottom right coner of rendered area. Description =========== This function does the trick of converting the emulated framebuffer into high quality ASCII-art. If you want to be really fast, you might use aa_fastrender. If you want to emulate palette, use aa_renderpalette. Note that to see the effect you need to call aa_flush too. First call to this function may take a while, because the rendering tables are produced.  File: aalib.info, Node: aa_resizehandler, Next: aa_resize, Prev: aa_render, Up: Reference aa_resizehandler ================ #include void aa_resizehandler ( aa_context *c, void (*handler)(aa_context *) ); Parameters ========== `aa_context *c' Specifies the AA-lib context to operate on. `void (*handler)(aa_context *)' Function to be called when resize happends. Description =========== Set user handler to be called on resize event.  File: aalib.info, Node: aa_resize, Next: aa_scrheight, Prev: aa_resizehandler, Up: Reference aa_resize ========= #include int aa_resize(aa_context *c); Parameters ========== `aa_context *c' Specifies the AA-lib context to operate on. Description =========== Do resize action. This function ought to be called when application takes into account the AA_RESIZE event. The context is reinitialized and set to new sizes. Return value ============ 0 when no resizing is done and 1 when resizing was succesfull.  File: aalib.info, Node: aa_scrheight, Next: aa_scrwidth, Prev: aa_resize, Up: Reference aa_scrheight ============ #include int aa_scrheight(aa_context *a); Parameters ========== `aa_context *a' Specifies the AA-lib context to operate on. Description =========== Returns height of the output screen in characters.  File: aalib.info, Node: aa_scrwidth, Next: aa_setfont, Prev: aa_scrheight, Up: Reference aa_scrwidth =========== #include int aa_scrwidth(aa_context *a); Parameters ========== `aa_context *a' Specifies the AA-lib context to operate on. Description =========== Returns width of the output screen in characters.  File: aalib.info, Node: aa_setfont, Next: aa_setsupported, Prev: aa_scrwidth, Up: Reference aa_setfont ========== #include void aa_setfont ( aa_context *c, const struct aa_font *font ); Parameters ========== `aa_context *c' Specifies the AA-lib context to operate on. `const struct aa_font *font' Font specification structure. Description =========== Set font specification to be used by rendering functions.  File: aalib.info, Node: aa_setsupported, Next: aa_showcursor, Prev: aa_setfont, Up: Reference aa_setsupported =============== #include void aa_setsupported ( aa_context *c, int supported ); Parameters ========== `aa_context *c' Specifies the AA-lib context to operate on. `int supported' New mask of requested features. Can contain AA_EXTENDED to enable use of all 256 characters and AA_EIGHT to enable use of the character numbered higher than 127. Description =========== This function can be used to alter "supported" field of hardware-params structure used by AA-lib.  File: aalib.info, Node: aa_showcursor, Next: aa_showmouse, Prev: aa_setsupported, Up: Reference aa_showcursor ============= #include void aa_showcursor(aa_context *c); Parameters ========== `aa_context *c' Specifies the AA-lib context to operate on. Description =========== Show the hardware cursor. This function may not be ignored by some drivers.  File: aalib.info, Node: aa_showmouse, Next: aa_text, Prev: aa_showcursor, Up: Reference aa_showmouse ============ #include void aa_showmouse(aa_context *c); Parameters ========== `aa_context *c' Not Documented. Description =========== Show the mouse cursor. This function may be ignored by some drivers.  File: aalib.info, Node: aa_text, Next: aa_uninitkbd, Prev: aa_showmouse, Up: Reference aa_text ======= #include char *aa_text(aa_context *a); Parameters ========== `aa_context *a' Specifies the AA-lib context to operate on. Description =========== The text output buffer is simple array of characters specifying the ascii-value of the characters. The array is organizated in the aa_scrheight (a) rows of aa_scrwidth(a) characters. Return value ============ Pointer the text output buffer used by AA-lib.  File: aalib.info, Node: aa_uninitkbd, Next: aa_uninitmouse, Prev: aa_text, Up: Reference aa_uninitkbd ============ #include void aa_uninitkbd(aa_context *context); Parameters ========== `aa_context *context' Specifies the AA-lib context to operate on. Description =========== Calls "uninitialize" function of the keyboard driver. It ought to undo all actions done by "initialize" function.  File: aalib.info, Node: aa_uninitmouse, Next: mem_d, Prev: aa_uninitkbd, Up: Reference aa_uninitmouse ============== #include void aa_uninitmouse(aa_context *context); Parameters ========== `aa_context *context' Specifies the AA-lib context to operate on. Description =========== Calls "uninitialize" function of the mouse driver. It ought to undo all actions done by "initialize" function.  File: aalib.info, Node: mem_d, Next: save_d, Prev: aa_uninitmouse, Up: Reference mem_d ===== #include extern const struct aa_driver mem_d; Description =========== Used to render ascii-art images into memory. You might use this driver to render images into memory and then use your own routines to handle them in case you want to avoid AA-lib's output mechanizms.  File: aalib.info, Node: save_d, Prev: mem_d, Up: Reference save_d ====== #include extern const struct aa_driver save_d; Description =========== Initialize this driver using aa_init function and specify the driver dependent parameters in aa_savedata structure to save image into file. See the texinfo documentation for details. aalib-1.4.0/doc/aalib.info-30000644000766200001440000002560107272031253011110 This is aalib.info, produced by makeinfo version 4.0 from aalib.texinfo. INFO-DIR-SECTION Libraries START-INFO-DIR-ENTRY * AA-lib: (aalib). An ASCII-art graphics library END-INFO-DIR-ENTRY (C) 1997 Jan Hubicka & Kamil Toman Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies.  File: aalib.info, Node: Index, Prev: Reference, Up: Top Index of functions, variables, types and constants ************************************************** * Menu: * AA_ALL: Specifying hardware parameters. * aa_ansi_format: Initialization for image saving. * aa_attr: Flushing. * aa_attrs: aa_attrs. * aa_autoinit <1>: aa_autoinit. * aa_autoinit: Initialization as a normal graphics library. * aa_autoinitkbd <1>: aa_autoinitkbd. * aa_autoinitkbd: Initialization of keyboard. * aa_autoinitmouse <1>: aa_autoinitmouse. * aa_autoinitmouse: Mouse. * AA_BOLD: Flushing. * AA_BOLD_MASK: Specifying hardware parameters. * AA_BOLDFONT: Flushing. * AA_BOLDFONT_MASK: Specifying hardware parameters. * aa_close <1>: aa_close. * aa_close: Initialization. * aa_context: Initialization. * aa_createedit <1>: aa_createedit. * aa_createedit: Other functions. * aa_currentfont: aa_currentfont. * aa_defparams <1>: aa_defparams. * aa_defparams: Specifying hardware parameters. * aa_defrenderparams <1>: aa_defrenderparams. * aa_defrenderparams: Rendering. * AA_DIM: Flushing. * AA_DIM_MASK: Specifying hardware parameters. * aa_displayrecomended: Recommending drivers. * aa_displayrecommended: aa_displayrecommended. * aa_dithernames: aa_dithernames. * aa_drivers: aa_drivers. * aa_edit <1>: aa_edit. * aa_edit: Other functions. * aa_editkey <1>: aa_editkey. * aa_editkey: Other functions. * AA_EIGHT: Specifying hardware parameters. * AA_EXTENDED: Specifying hardware parameters. * aa_fastrender <1>: aa_fastrender. * aa_fastrender: Rendering. * aa_flush: Flushing. * aa_fonts: aa_fonts. * aa_format: Initialization for image saving. * aa_formats: aa_formats. * aa_getevent <1>: aa_getevent. * aa_getevent: Getting events. * aa_getkey <1>: aa_getkey. * aa_getkey: Getting events. * aa_getmouse <1>: aa_getmouse. * aa_getmouse: Mouse. * aa_getrenderparams: Other functions. * aa_gotoxy <1>: aa_gotoxy. * aa_gotoxy: Flushing. * aa_hardware_params: Specifying hardware parameters. * aa_hardwareparams: Specifying hardware parameters. * aa_help <1>: aa_help. * aa_help: Parsing of command line options. * aa_hidecursor <1>: aa_hidecursor. * aa_hidecursor: Flushing. * aa_hidemouse <1>: aa_hidemouse. * aa_hidemouse: Mouse. * aa_hp2_format: Initialization for image saving. * aa_hp_format: Initialization for image saving. * aa_html_alt_format: Initialization for image saving. * aa_html_format: Initialization for image saving. * aa_image <1>: aa_image. * aa_image: Drawing image. * aa_imgheight <1>: aa_imgheight. * aa_imgheight: Drawing image. * aa_imgwidth <1>: aa_imgwidth. * aa_imgwidth: Drawing image. * aa_init <1>: aa_init. * aa_init: Initialization. * aa_initkbd <1>: aa_initkbd. * aa_initkbd: Initialization of keyboard. * aa_initmouse <1>: aa_initmouse. * aa_initmouse: Mouse. * aa_irc_format: Initialization for image saving. * aa_kbddrivers: aa_kbddrivers. * aa_kbdrecommended: aa_kbdrecommended. * aa_mmheight <1>: aa_mmheight. * aa_mmheight: Drawing image. * aa_mmwidth <1>: aa_mmwidth. * aa_mmwidth: Drawing image. * aa_more_format: Initialization for image saving. * AA_MOUSEALLMASK: Mouse. * aa_mousedrivers: aa_mousedrivers. * AA_MOUSEMOVEMASK: Mouse. * AA_MOUSEPRESSMASK: Mouse. * aa_mouserecommended: aa_mouserecommended. * aa_nhtml_format: Initialization for image saving. * AA_NONE: Getting events. * AA_NORMAL: Flushing. * AA_NORMAL_MASK: Specifying hardware parameters. * aa_palette: Drawing image. * aa_parseoptions <1>: aa_parseoptions. * aa_parseoptions: Parsing of command line options. * AA_PRESSEDMOVEMAKS: Mouse. * aa_printf: aa_printf. * aa_putpixel <1>: aa_putpixel. * aa_putpixel: Drawing image. * aa_puts <1>: aa_puts. * aa_puts: Flushing. * aa_recomendhidisplay: Recommending drivers. * aa_recomendhikbd: Initialization of keyboard. * aa_recomendhimouse: Mouse. * aa_recomendlowdisplay: Recommending drivers. * aa_recomendlowkbd: Initialization of keyboard. * aa_recomendlowmouse: Mouse. * aa_recommendhi: aa_recommendhi. * aa_recommendhidisplay: aa_recommendhidisplay. * aa_recommendhikbd: aa_recommendhikbd. * aa_recommendhimouse: aa_recommendhimouse. * aa_recommendlow: aa_recommendlow. * aa_recommendlowdisplay: aa_recommendlowdisplay. * aa_recommendlowkbd: aa_recommendlowkbd. * aa_recommendlowmouse: aa_recommendlowmouse. * aa_registerfont <1>: aa_registerfont. * aa_registerfont: Other functions. * AA_RELEASE: Getting events. * aa_render <1>: aa_render. * aa_render: Rendering. * aa_renderpalette: Rendering. * aa_renderparams: Rendering. * aa_resize <1>: aa_resize. * aa_resize: Resizing. * AA_RESIZE: Resizing. * aa_resizehandler <1>: aa_resizehandler. * aa_resizehandler: Resizing. * AA_REVERSE: Flushing. * AA_REVERSE_MASK: Specifying hardware parameters. * aa_savedata: Initialization for image saving. * aa_scrheight: aa_scrheight. * aa_scrwidth: aa_scrwidth. * AA_SENDRELEASE: Initialization of keyboard. * aa_setfont <1>: aa_setfont. * aa_setfont: Other functions. * aa_setpalette: Drawing image. * aa_setsupported <1>: aa_setsupported. * aa_setsupported: Other functions. * aa_showcursor <1>: aa_showcursor. * aa_showcursor: Flushing. * aa_showmouse <1>: aa_showmouse. * aa_showmouse: Mouse. * AA_SPECIAL: Flushing. * aa_text <1>: aa_text. * aa_text: Flushing. * aa_text_format: Initialization for image saving. * aa_uninitkbd <1>: aa_uninitkbd. * aa_uninitkbd: Initialization of keyboard. * aa_uninitmouse <1>: aa_uninitmouse. * aa_uninitmouse: Mouse. * aa_zephyr_format: Initialization for image saving. * cursormode: Designing new driver. * flags: Designing new driver. * flush: Designing new driver. * font14: Specifying hardware parameters. * font16: Specifying hardware parameters. * font8: Specifying hardware parameters. * font9: Specifying hardware parameters. * fontgl: Specifying hardware parameters. * fontlinux: Specifying hardware parameters. * fontX13: Specifying hardware parameters. * fontX13B: Specifying hardware parameters. * fontX16: Specifying hardware parameters. * getkey: Designing new driver. * getmouse: Designing new driver. * getsize: Designing new driver. * gotoxy: Designing new driver. * init: Designing new driver. * mem_d <1>: mem_d. * mem_d: Initialization as an ascii art renderer. * name: Designing new driver. * print: Designing new driver. * save_d <1>: save_d. * save_d: Initialization for image saving. * setattr: Designing new driver. * shortname: Designing new driver. * uninit: Designing new driver.