Import Upstream version 1.2

This commit is contained in:
Alexander Ponyatykh committed 2019-11-19 01:49:54 +03:00
commit 5fa3459ecc
35 files changed
+50369

No files matched your search

+4
View File
@@ -0,0 +1,4 @@
Philip Lawatsch <philip@lawatsch.at>
Alex Ibrado <alex@ibrado.org>
Anthony J. Mirabella <mirabeaj@gmail.com>
Mike Lampard <mlampard@users.sf.net>
+340
View File
@@ -0,0 +1,340 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
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
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.
+13
View File
@@ -0,0 +1,13 @@
1.2
* Add WBMP loading and drawing routines
* Add drawBigNum routine
* Add man page
* Enable right justified TTF printing
1.1
* Lower buffer size from 7k to 1k (recompile programs linked against v1.0)
* Add drawCircle, drawRoundBox, and drawBar routines
* Add FreeType2 support (configure with --enable-ttf)
1.0
* Initial Release
+1228
View File
File diff suppressed because it is too large. Load diff
+236
View File
@@ -0,0 +1,236 @@
Installation Instructions
*************************
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free
Software Foundation, Inc.
This file is free documentation; the Free Software Foundation gives
unlimited permission to copy, distribute and modify it.
Basic Installation
==================
These are generic installation instructions.
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
those values to create a `Makefile' in each directory of the package.
It may also create one or more `.h' files containing system-dependent
definitions. Finally, it creates a shell script `config.status' that
you can run in the future to recreate the current configuration, and a
file `config.log' containing compiler output (useful mainly for
debugging `configure').
It can also use an optional file (typically called `config.cache'
and enabled with `--cache-file=config.cache' or simply `-C') that saves
the results of its tests to speed up reconfiguring. (Caching is
disabled by default to prevent problems with accidental use of stale
cache files.)
If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail
diffs or instructions to the address given in the `README' so they can
be considered for the next release. If you are using the cache, and at
some point `config.cache' contains results you don't want to keep, you
may remove or edit it.
The file `configure.ac' (or `configure.in') is used to create
`configure' by a program called `autoconf'. You only need
`configure.ac' if you want to change it or regenerate `configure' using
a newer version of `autoconf'.
The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system. If you're
using `csh' on an old version of System V, you might need to type
`sh ./configure' instead to prevent `csh' from trying to execute
`configure' itself.
Running `configure' takes awhile. While running, it prints some
messages telling which features it is checking for.
2. Type `make' to compile the package.
3. Optionally, type `make check' to run any self-tests that come with
the package.
4. Type `make install' to install the programs and any data files and
documentation.
5. You can remove the program binaries and object files from the
source code directory by typing `make clean'. To also remove the
files that `configure' created (so you can compile the package for
a different kind of computer), type `make distclean'. There is
also a `make maintainer-clean' target, but that is intended mainly
for the package's developers. If you use it, you may have to get
all sorts of other programs in order to regenerate files that came
with the distribution.
Compilers and Options
=====================
Some systems require unusual options for compilation or linking that the
`configure' script does not know about. Run `./configure --help' for
details on some of the pertinent environment variables.
You can give `configure' initial values for configuration parameters
by setting variables in the command line or in the environment. Here
is an example:
./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
*Note Defining Variables::, for more details.
Compiling For Multiple Architectures
====================================
You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
own directory. To do this, you must use a version of `make' that
supports the `VPATH' variable, such as GNU `make'. `cd' to the
directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'.
If you have to use a `make' that does not support the `VPATH'
variable, you have to compile the package for one architecture at a
time in the source code directory. After you have installed the
package for one architecture, use `make distclean' before reconfiguring
for another architecture.
Installation Names
==================
By default, `make install' installs the package's commands under
`/usr/local/bin', include files under `/usr/local/include', etc. You
can specify an installation prefix other than `/usr/local' by giving
`configure' the option `--prefix=PREFIX'.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
pass the option `--exec-prefix=PREFIX' to `configure', the package uses
PREFIX as the prefix for installing programs and libraries.
Documentation and other data files still use the regular prefix.
In addition, if you use an unusual directory layout you can give
options like `--bindir=DIR' to specify different values for particular
kinds of files. Run `configure --help' for a list of the directories
you can set and what kinds of files go in them.
If the package supports it, you can cause programs to be installed
with an extra prefix or suffix on their names by giving `configure' the
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
Optional Features
=================
Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
is something like `gnu-as' or `x' (for the X Window System). The
`README' should mention any `--enable-' and `--with-' options that the
package recognizes.
For packages that use the X Window System, `configure' can usually
find the X include and library files automatically, but if it doesn't,
you can use the `configure' options `--x-includes=DIR' and
`--x-libraries=DIR' to specify their locations.
Specifying the System Type
==========================
There may be some features `configure' cannot figure out automatically,
but needs to determine by the type of machine the package will run on.
Usually, assuming the package is built to be run on the _same_
architectures, `configure' can figure that out, but if it prints a
message saying it cannot guess the machine type, give it the
`--build=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name which has the form:
CPU-COMPANY-SYSTEM
where SYSTEM can have one of these forms:
OS KERNEL-OS
See the file `config.sub' for the possible values of each field. If
`config.sub' isn't included in this package, then this package doesn't
need to know the machine type.
If you are _building_ compiler tools for cross-compiling, you should
use the option `--target=TYPE' to select the type of system they will
produce code for.
If you want to _use_ a cross compiler, that generates code for a
platform different from the build platform, you should specify the
"host" platform (i.e., that on which the generated programs will
eventually be run) with `--host=TYPE'.
Sharing Defaults
================
If you want to set default values for `configure' scripts to share, you
can create a site shell script called `config.site' that gives default
values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script.
A warning: not all `configure' scripts look for a site script.
Defining Variables
==================
Variables not defined in a site shell script can be set in the
environment passed to `configure'. However, some packages may run
configure again during the build, and the customized values of these
variables may be lost. In order to avoid this problem, you should set
them in the `configure' command line, using `VAR=value'. For example:
./configure CC=/usr/local2/bin/gcc
causes the specified `gcc' to be used as the C compiler (unless it is
overridden in the site shell script). Here is a another example:
/bin/bash ./configure CONFIG_SHELL=/bin/bash
Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent
configuration-related scripts to be executed by `/bin/bash'.
`configure' Invocation
======================
`configure' recognizes the following options to control how it operates.
`--help'
`-h'
Print a summary of the options to `configure', and exit.
`--version'
`-V'
Print the version of Autoconf used to generate the `configure'
script, and exit.
`--cache-file=FILE'
Enable the cache: use and save the results of the tests in FILE,
traditionally `config.cache'. FILE defaults to `/dev/null' to
disable caching.
`--config-cache'
`-C'
Alias for `--cache-file=config.cache'.
`--quiet'
`--silent'
`-q'
Do not print messages saying which checks are being made. To
suppress all normal output, redirect it to `/dev/null' (any error
messages will still be shown).
`--srcdir=DIR'
Look for the package's source code in directory DIR. Usually
`configure' can determine that directory automatically.
`configure' also accepts some other, not widely useful, options. Run
`configure --help' for more details.
+14
View File
@@ -0,0 +1,14 @@
LLIBDIR=@LIBDIR@
AM_CFLAGS=@CFLAGS@
lib_LTLIBRARIES = libg15render.la
libg15render_la_SOURCES = libg15render.h text.c pixel.c screen.c font_6x4.c font_7x5.c font_8x8.c
libg15render_la_LIBADD = @FTLIB@
libg15render_la_LDFLAGS = -version-info 2:0:1
include_HEADERS= libg15render.h
EXTRA_DIST = debian Doxyfile libg15render.3
man3_MANS = $(top_srcdir)/libg15render.3
docdir = $(prefix)/share/doc/$(PACKAGE)-$(VERSION)
doc_DATA = AUTHORS ChangeLog COPYING NEWS README
dist-hook:
rm -rf `find $(distdir)/debian -name .svn`
+713
View File
@@ -0,0 +1,713 @@
# Makefile.in generated by automake 1.9.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 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.
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = .
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
DIST_COMMON = README $(am__configure_deps) $(include_HEADERS) \
$(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(srcdir)/config.h.in $(top_srcdir)/configure AUTHORS COPYING \
ChangeLog INSTALL NEWS config/config.guess config/config.sub \
config/depcomp config/install-sh config/ltmain.sh \
config/missing
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno configure.status.lineno
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(man3dir)" \
"$(DESTDIR)$(docdir)" "$(DESTDIR)$(includedir)"
libLTLIBRARIES_INSTALL = $(INSTALL)
LTLIBRARIES = $(lib_LTLIBRARIES)
libg15render_la_DEPENDENCIES =
am_libg15render_la_OBJECTS = text.lo pixel.lo screen.lo font_6x4.lo \
font_7x5.lo font_8x8.lo
libg15render_la_OBJECTS = $(am_libg15render_la_OBJECTS)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I.
depcomp = $(SHELL) $(top_srcdir)/config/depcomp
am__depfiles_maybe = depfiles
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
SOURCES = $(libg15render_la_SOURCES)
DIST_SOURCES = $(libg15render_la_SOURCES)
man3dir = $(mandir)/man3
NROFF = nroff
MANS = $(man3_MANS)
docDATA_INSTALL = $(INSTALL_DATA)
DATA = $(doc_DATA)
includeHEADERS_INSTALL = $(INSTALL_HEADER)
HEADERS = $(include_HEADERS)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
am__remove_distdir = \
{ test ! -d $(distdir) \
|| { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
&& rm -fr $(distdir); }; }
DIST_ARCHIVES = $(distdir).tar.gz
GZIP_ENV = --best
distuninstallcheck_listfiles = find . -type f -print
distcleancheck_listfiles = find . -type f -print
ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
FTLIB = @FTLIB@
GREP = @GREP@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = $(prefix)/share/doc/$(PACKAGE)-$(VERSION)
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
LLIBDIR = @LIBDIR@
AM_CFLAGS = @CFLAGS@
lib_LTLIBRARIES = libg15render.la
libg15render_la_SOURCES = libg15render.h text.c pixel.c screen.c font_6x4.c font_7x5.c font_8x8.c
libg15render_la_LIBADD = @FTLIB@
libg15render_la_LDFLAGS = -version-info 2:0:1
include_HEADERS = libg15render.h
EXTRA_DIST = debian Doxyfile libg15render.3
man3_MANS = $(top_srcdir)/libg15render.3
doc_DATA = AUTHORS ChangeLog COPYING NEWS README
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-am
.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
am--refresh:
@:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \
cd $(srcdir) && $(AUTOMAKE) --gnu \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
echo ' $(SHELL) ./config.status'; \
$(SHELL) ./config.status;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
$(top_srcdir)/configure: $(am__configure_deps)
cd $(srcdir) && $(AUTOCONF)
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
config.h: stamp-h1
@if test ! -f $@; then \
rm -f stamp-h1; \
$(MAKE) stamp-h1; \
else :; fi
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
@rm -f stamp-h1
cd $(top_builddir) && $(SHELL) ./config.status config.h
$(srcdir)/config.h.in: $(am__configure_deps)
cd $(top_srcdir) && $(AUTOHEADER)
rm -f stamp-h1
touch $@
distclean-hdr:
-rm -f config.h stamp-h1
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
@$(NORMAL_INSTALL)
test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
if test -f $$p; then \
f=$(am__strip_dir) \
echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
$(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
else :; fi; \
done
uninstall-libLTLIBRARIES:
@$(NORMAL_UNINSTALL)
@set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \
p=$(am__strip_dir) \
echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
$(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
done
clean-libLTLIBRARIES:
-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
test "$$dir" != "$$p" || dir=.; \
echo "rm -f \"$${dir}/so_locations\""; \
rm -f "$${dir}/so_locations"; \
done
libg15render.la: $(libg15render_la_OBJECTS) $(libg15render_la_DEPENDENCIES)
$(LINK) -rpath $(libdir) $(libg15render_la_LDFLAGS) $(libg15render_la_OBJECTS) $(libg15render_la_LIBADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/font_6x4.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/font_7x5.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/font_8x8.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pixel.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/screen.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/text.Plo@am__quote@
.c.o:
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
install-man3: $(man3_MANS) $(man_MANS)
@$(NORMAL_INSTALL)
test -z "$(man3dir)" || $(mkdir_p) "$(DESTDIR)$(man3dir)"
@list='$(man3_MANS) $(dist_man3_MANS) $(nodist_man3_MANS)'; \
l2='$(man_MANS) $(dist_man_MANS) $(nodist_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/^.*\\.//'`; \
case "$$ext" in \
3*) ;; \
*) ext='3' ;; \
esac; \
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
inst=`echo $$inst | sed -e 's/^.*\///'`; \
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man3dir)/$$inst'"; \
$(INSTALL_DATA) "$$file" "$(DESTDIR)$(man3dir)/$$inst"; \
done
uninstall-man3:
@$(NORMAL_UNINSTALL)
@list='$(man3_MANS) $(dist_man3_MANS) $(nodist_man3_MANS)'; \
l2='$(man_MANS) $(dist_man_MANS) $(nodist_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/^.*\\.//'`; \
case "$$ext" in \
3*) ;; \
*) ext='3' ;; \
esac; \
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
inst=`echo $$inst | sed -e 's/^.*\///'`; \
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
echo " rm -f '$(DESTDIR)$(man3dir)/$$inst'"; \
rm -f "$(DESTDIR)$(man3dir)/$$inst"; \
done
install-docDATA: $(doc_DATA)
@$(NORMAL_INSTALL)
test -z "$(docdir)" || $(mkdir_p) "$(DESTDIR)$(docdir)"
@list='$(doc_DATA)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f=$(am__strip_dir) \
echo " $(docDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(docdir)/$$f'"; \
$(docDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(docdir)/$$f"; \
done
uninstall-docDATA:
@$(NORMAL_UNINSTALL)
@list='$(doc_DATA)'; for p in $$list; do \
f=$(am__strip_dir) \
echo " rm -f '$(DESTDIR)$(docdir)/$$f'"; \
rm -f "$(DESTDIR)$(docdir)/$$f"; \
done
install-includeHEADERS: $(include_HEADERS)
@$(NORMAL_INSTALL)
test -z "$(includedir)" || $(mkdir_p) "$(DESTDIR)$(includedir)"
@list='$(include_HEADERS)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f=$(am__strip_dir) \
echo " $(includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \
$(includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \
done
uninstall-includeHEADERS:
@$(NORMAL_UNINSTALL)
@list='$(include_HEADERS)'; for p in $$list; do \
f=$(am__strip_dir) \
echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \
rm -f "$(DESTDIR)$(includedir)/$$f"; \
done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
$(am__remove_distdir)
mkdir $(distdir)
$(mkdir_p) $(distdir)/config
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$(top_distdir)" distdir="$(distdir)" \
dist-hook
-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r $(distdir)
dist-gzip: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__remove_distdir)
dist-bzip2: distdir
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
$(am__remove_distdir)
dist-tarZ: distdir
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
$(am__remove_distdir)
dist-shar: distdir
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
$(am__remove_distdir)
dist-zip: distdir
-rm -f $(distdir).zip
zip -rq $(distdir).zip $(distdir)
$(am__remove_distdir)
dist dist-all: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__remove_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
case '$(DIST_ARCHIVES)' in \
*.tar.gz*) \
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \
bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.Z*) \
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \
GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
*.zip*) \
unzip $(distdir).zip ;;\
esac
chmod -R a-w $(distdir); chmod a+w $(distdir)
mkdir $(distdir)/_build
mkdir $(distdir)/_inst
chmod a-w $(distdir)
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
&& cd $(distdir)/_build \
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
$(DISTCHECK_CONFIGURE_FLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) check \
&& $(MAKE) $(AM_MAKEFLAGS) install \
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
distuninstallcheck \
&& chmod -R a-w "$$dc_install_base" \
&& ({ \
(cd ../.. && umask 077 && mkdir "$$dc_destdir") \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
} || { rm -rf "$$dc_destdir"; exit 1; }) \
&& rm -rf "$$dc_destdir" \
&& $(MAKE) $(AM_MAKEFLAGS) dist \
&& rm -rf $(DIST_ARCHIVES) \
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck
$(am__remove_distdir)
@(echo "$(distdir) archives ready for distribution: "; \
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
distuninstallcheck:
@cd $(distuninstallcheck_dir) \
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
|| { echo "ERROR: files left after uninstall:" ; \
if test -n "$(DESTDIR)"; then \
echo " (check DESTDIR support)"; \
fi ; \
$(distuninstallcheck_listfiles) ; \
exit 1; } >&2
distcleancheck: distclean
@if test '$(srcdir)' = . ; then \
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
exit 1 ; \
fi
@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|| { echo "ERROR: files left in build directory after distclean:" ; \
$(distcleancheck_listfiles) ; \
exit 1; } >&2
check-am: all-am
check: check-am
all-am: Makefile $(LTLIBRARIES) $(MANS) $(DATA) $(HEADERS) config.h
installdirs:
for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(docdir)" "$(DESTDIR)$(includedir)"; do \
test -z "$$dir" || $(mkdir_p) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
mostlyclean-am
distclean: distclean-am
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-hdr distclean-libtool distclean-tags
dvi: dvi-am
dvi-am:
html: html-am
info: info-am
info-am:
install-data-am: install-docDATA install-includeHEADERS install-man
install-exec-am: install-libLTLIBRARIES
install-info: install-info-am
install-man: install-man3
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -rf $(top_srcdir)/autom4te.cache
-rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-docDATA uninstall-includeHEADERS \
uninstall-info-am uninstall-libLTLIBRARIES uninstall-man
uninstall-man: uninstall-man3
.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
clean-generic clean-libLTLIBRARIES clean-libtool ctags dist \
dist-all dist-bzip2 dist-gzip dist-hook dist-shar dist-tarZ \
dist-zip distcheck distclean distclean-compile \
distclean-generic distclean-hdr distclean-libtool \
distclean-tags distcleancheck distdir distuninstallcheck dvi \
dvi-am html html-am info info-am install install-am \
install-data install-data-am install-docDATA install-exec \
install-exec-am install-includeHEADERS install-info \
install-info-am install-libLTLIBRARIES install-man \
install-man3 install-strip installcheck installcheck-am \
installdirs maintainer-clean maintainer-clean-generic \
mostlyclean mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
uninstall-am uninstall-docDATA uninstall-includeHEADERS \
uninstall-info-am uninstall-libLTLIBRARIES uninstall-man \
uninstall-man3
dist-hook:
rm -rf `find $(distdir)/debian -name .svn`
# 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:
+5
View File
@@ -0,0 +1,5 @@
This is the second release of libg15render. I separated most of this code from
g15composer so that I could reuse it in a lcdproc driver for the g15 that I was
trying to develop. Now that this library is out, the lcdproc driver should soon
follow. G15composer, a simple, scriptable command interface to libg15render
should also soon be released.
+8
View File
@@ -0,0 +1,8 @@
This is a library to render text and shapes into a buffer usable by the
Logitech G15 Gaming Keyboard.
This library probably isn't very useful without libg15 and/or g15daemon.
Font support is now provided by FreeType2. If you want font support, provide
the --enable-ttf option to configure. For font support in applications, you
must #define TTF_SUPPORT 1 before including libg15render.h and add
`freetype-config --cflags` to your $CFLAGS.
Vendored
+7307
View File
File diff suppressed because it is too large. Load diff
+73
View File
@@ -0,0 +1,73 @@
/* config.h.in. Generated from configure.in by autoheader. */
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
/* Define to 1 if you have the <ft2build.h> header file. */
#undef HAVE_FT2BUILD_H
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the `g15' library (-lg15). */
#undef HAVE_LIBG15
/* Define to 1 if you have the `m' library (-lm). */
#undef HAVE_LIBM
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the `memset' function. */
#undef HAVE_MEMSET
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Name of package */
#undef PACKAGE
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Define to 1 to enable FreeType2 support */
#undef TTF_SUPPORT
/* Version number of package */
#undef VERSION
/* Define to empty if `const' does not conform to ANSI C. */
#undef const
Vendored Executable
+1519
View File
File diff suppressed because it is too large. Load diff
Vendored Executable
+1626
View File
File diff suppressed because it is too large. Load diff
Executable
+530
View File
@@ -0,0 +1,530 @@
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
scriptversion=2005-07-09.11
# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, 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.
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
case $1 in
'')
echo "$0: No command. Try \`$0 --help' for more information." 1>&2
exit 1;
;;
-h | --h*)
cat <<\EOF
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
Run PROGRAMS ARGS to compile a file, generating dependencies
as side-effects.
Environment variables:
depmode Dependency tracking mode.
source Source file read by `PROGRAMS ARGS'.
object Object file output by `PROGRAMS ARGS'.
DEPDIR directory where to store dependencies.
depfile Dependency file to output.
tmpdepfile Temporary file to use when outputing dependencies.
libtool Whether libtool is used (yes/no).
Report bugs to <bug-automake@gnu.org>.
EOF
exit $?
;;
-v | --v*)
echo "depcomp $scriptversion"
exit $?
;;
esac
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
echo "depcomp: Variables source, object and depmode must be set" 1>&2
exit 1
fi
# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
depfile=${depfile-`echo "$object" |
sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
rm -f "$tmpdepfile"
# Some modes work just like other modes, but use different flags. We
# parameterize here, but still list the modes in the big case below,
# to make depend.m4 easier to write. Note that we *cannot* use a case
# here, because this file can only contain one case statement.
if test "$depmode" = hp; then
# HP compiler uses -M and no extra arg.
gccflag=-M
depmode=gcc
fi
if test "$depmode" = dashXmstdout; then
# This is just like dashmstdout with a different argument.
dashmflag=-xM
depmode=dashmstdout
fi
case "$depmode" in
gcc3)
## gcc 3 implements dependency tracking that does exactly what
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
## it if -MD -MP comes after the -MF stuff. Hmm.
"$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
mv "$tmpdepfile" "$depfile"
;;
gcc)
## There are various ways to get dependency output from gcc. Here's
## why we pick this rather obscure method:
## - Don't want to use -MD because we'd like the dependencies to end
## up in a subdir. Having to rename by hand is ugly.
## (We might end up doing this anyway to support other compilers.)
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
## -MM, not -M (despite what the docs say).
## - Using -M directly means running the compiler twice (even worse
## than renaming).
if test -z "$gccflag"; then
gccflag=-MD,
fi
"$@" -Wp,"$gccflag$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
echo "$object : \\" > "$depfile"
alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
## The second -e expression handles DOS-style file names with drive letters.
sed -e 's/^[^:]*: / /' \
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
## This next piece of magic avoids the `deleted header file' problem.
## The problem is that when a header file which appears in a .P file
## is deleted, the dependency causes make to die (because there is
## typically no way to rebuild the header). We avoid this by adding
## dummy dependencies for each header file. Too bad gcc doesn't do
## this for us directly.
tr ' ' '
' < "$tmpdepfile" |
## Some versions of gcc put a space before the `:'. On the theory
## that the space means something, we add a space to the output as
## well.
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
hp)
# This case exists only to let depend.m4 do its work. It works by
# looking at the text of this script. This case will never be run,
# since it is checked for above.
exit 1
;;
sgi)
if test "$libtool" = yes; then
"$@" "-Wp,-MDupdate,$tmpdepfile"
else
"$@" -MDupdate "$tmpdepfile"
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
echo "$object : \\" > "$depfile"
# Clip off the initial element (the dependent). Don't try to be
# clever and replace this with sed code, as IRIX sed won't handle
# lines with more than a fixed number of characters (4096 in
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
# the IRIX cc adds comments like `#:fec' to the end of the
# dependency line.
tr ' ' '
' < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
tr '
' ' ' >> $depfile
echo >> $depfile
# The second pass generates a dummy entry for each header file.
tr ' ' '
' < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
>> $depfile
else
# The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile
# "include basename.Plo" scheme.
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
aix)
# The C for AIX Compiler uses -M and outputs the dependencies
# in a .u file. In older versions, this file always lives in the
# current directory. Also, the AIX compiler puts `$object:' at the
# start of each line; $object doesn't have directory information.
# Version 6 uses the directory in both cases.
stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
tmpdepfile="$stripped.u"
if test "$libtool" = yes; then
"$@" -Wc,-M
else
"$@" -M
fi
stat=$?
if test -f "$tmpdepfile"; then :
else
stripped=`echo "$stripped" | sed 's,^.*/,,'`
tmpdepfile="$stripped.u"
fi
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
if test -f "$tmpdepfile"; then
outname="$stripped.o"
# Each line is of the form `foo.o: dependent.h'.
# Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'.
sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
else
# The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile
# "include basename.Plo" scheme.
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
icc)
# Intel's C compiler understands `-MD -MF file'. However on
# icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
# ICC 7.0 will fill foo.d with something like
# foo.o: sub/foo.c
# foo.o: sub/foo.h
# which is wrong. We want:
# sub/foo.o: sub/foo.c
# sub/foo.o: sub/foo.h
# sub/foo.c:
# sub/foo.h:
# ICC 7.1 will output
# foo.o: sub/foo.c sub/foo.h
# and will wrap long lines using \ :
# foo.o: sub/foo.c ... \
# sub/foo.h ... \
# ...
"$@" -MD -MF "$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
# Each line is of the form `foo.o: dependent.h',
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
# Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'.
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
# Some versions of the HPUX 10.20 sed can't process this invocation
# correctly. Breaking it into two sed invocations is a workaround.
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
tru64)
# The Tru64 compiler uses -MD to generate dependencies as a side
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
# dependencies in `foo.d' instead, so we check for that too.
# Subdirectories are respected.
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
test "x$dir" = "x$object" && dir=
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
if test "$libtool" = yes; then
# With Tru64 cc, shared objects can also be used to make a
# static library. This mecanism is used in libtool 1.4 series to
# handle both shared and static libraries in a single compilation.
# With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
#
# With libtool 1.5 this exception was removed, and libtool now
# generates 2 separate objects for the 2 libraries. These two
# compilations output dependencies in in $dir.libs/$base.o.d and
# in $dir$base.o.d. We have to check for both files, because
# one of the two compilations can be disabled. We should prefer
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
# automatically cleaned when .libs/ is deleted, while ignoring
# the former would cause a distcleancheck panic.
tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
tmpdepfile2=$dir$base.o.d # libtool 1.5
tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
"$@" -Wc,-MD
else
tmpdepfile1=$dir$base.o.d
tmpdepfile2=$dir$base.d
tmpdepfile3=$dir$base.d
tmpdepfile4=$dir$base.d
"$@" -MD
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
exit $stat
fi
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
do
test -f "$tmpdepfile" && break
done
if test -f "$tmpdepfile"; then
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
# That's a tab and a space in the [].
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
else
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
#nosideeffect)
# This comment above is used by automake to tell side-effect
# dependency tracking mechanisms from slower ones.
dashmstdout)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout, regardless of -o.
"$@" || exit $?
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test $1 != '--mode=compile'; do
shift
done
shift
fi
# Remove `-o $object'.
IFS=" "
for arg
do
case $arg in
-o)
shift
;;
$object)
shift
;;
*)
set fnord "$@" "$arg"
shift # fnord
shift # $arg
;;
esac
done
test -z "$dashmflag" && dashmflag=-M
# Require at least two characters before searching for `:'
# in the target name. This is to cope with DOS-style filenames:
# a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
"$@" $dashmflag |
sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
tr ' ' '
' < "$tmpdepfile" | \
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
dashXmstdout)
# This case only exists to satisfy depend.m4. It is never actually
# run, as this mode is specially recognized in the preamble.
exit 1
;;
makedepend)
"$@" || exit $?
# Remove any Libtool call
if test "$libtool" = yes; then
while test $1 != '--mode=compile'; do
shift
done
shift
fi
# X makedepend
shift
cleared=no
for arg in "$@"; do
case $cleared in
no)
set ""; shift
cleared=yes ;;
esac
case "$arg" in
-D*|-I*)
set fnord "$@" "$arg"; shift ;;
# Strip any option that makedepend may not understand. Remove
# the object too, otherwise makedepend will parse it as a source file.
-*|$object)
;;
*)
set fnord "$@" "$arg"; shift ;;
esac
done
obj_suffix="`echo $object | sed 's/^.*\././'`"
touch "$tmpdepfile"
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
sed '1,2d' "$tmpdepfile" | tr ' ' '
' | \
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile" "$tmpdepfile".bak
;;
cpp)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout.
"$@" || exit $?
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test $1 != '--mode=compile'; do
shift
done
shift
fi
# Remove `-o $object'.
IFS=" "
for arg
do
case $arg in
-o)
shift
;;
$object)
shift
;;
*)
set fnord "$@" "$arg"
shift # fnord
shift # $arg
;;
esac
done
"$@" -E |
sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
-e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
sed '$ s: \\$::' > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
cat < "$tmpdepfile" >> "$depfile"
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
msvisualcpp)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout, regardless of -o,
# because we must use -o when running libtool.
"$@" || exit $?
IFS=" "
for arg
do
case "$arg" in
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
set fnord "$@"
shift
shift
;;
*)
set fnord "$@" "$arg"
shift
shift
;;
esac
done
"$@" -E |
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
echo " " >> "$depfile"
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
rm -f "$tmpdepfile"
;;
none)
exec "$@"
;;
*)
echo "Unknown depmode $depmode" 1>&2
exit 1
;;
esac
exit 0
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:
+323
View File
@@ -0,0 +1,323 @@
#!/bin/sh
# install - install a program, script, or datafile
scriptversion=2005-05-14.22
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
# following copyright and license.
#
# Copyright (C) 1994 X Consortium
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
# Except as contained in this notice, the name of the X Consortium shall not
# be used in advertising or otherwise to promote the sale, use or other deal-
# ings in this Software without prior written authorization from the X Consor-
# tium.
#
#
# FSF changes to this file are in the public domain.
#
# 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}"
chmodcmd="$chmodprog 0755"
chowncmd=
chgrpcmd=
stripcmd=
rmcmd="$rmprog -f"
mvcmd="$mvprog"
src=
dst=
dir_arg=
dstarg=
no_target_directory=
usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
or: $0 [OPTION]... SRCFILES... DIRECTORY
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
or: $0 [OPTION]... -d DIRECTORIES...
In the 1st form, copy SRCFILE to DSTFILE.
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
In the 4th, create DIRECTORIES.
Options:
-c (ignored)
-d create directories instead of installing files.
-g GROUP $chgrpprog installed files to GROUP.
-m MODE $chmodprog installed files to MODE.
-o USER $chownprog installed files to USER.
-s $stripprog installed files.
-t DIRECTORY install into DIRECTORY.
-T report an error if DSTFILE is a directory.
--help display this help and exit.
--version display version info and exit.
Environment variables override the default commands:
CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
"
while test -n "$1"; do
case $1 in
-c) shift
continue;;
-d) dir_arg=true
shift
continue;;
-g) chgrpcmd="$chgrpprog $2"
shift
shift
continue;;
--help) echo "$usage"; exit $?;;
-m) chmodcmd="$chmodprog $2"
shift
shift
continue;;
-o) chowncmd="$chownprog $2"
shift
shift
continue;;
-s) stripcmd=$stripprog
shift
continue;;
-t) dstarg=$2
shift
shift
continue;;
-T) no_target_directory=true
shift
continue;;
--version) echo "$0 $scriptversion"; exit $?;;
*) # When -d is used, all remaining arguments are directories to create.
# When -t is used, the destination is already specified.
test -n "$dir_arg$dstarg" && break
# Otherwise, the last argument is the destination. Remove it from $@.
for arg
do
if test -n "$dstarg"; then
# $@ is not empty: it contains at least $arg.
set fnord "$@" "$dstarg"
shift # fnord
fi
shift # arg
dstarg=$arg
done
break;;
esac
done
if test -z "$1"; then
if test -z "$dir_arg"; then
echo "$0: no input file specified." >&2
exit 1
fi
# It's OK to call `install-sh -d' without argument.
# This can happen when creating conditional directories.
exit 0
fi
for src
do
# Protect names starting with `-'.
case $src in
-*) src=./$src ;;
esac
if test -n "$dir_arg"; then
dst=$src
src=
if test -d "$dst"; then
mkdircmd=:
chmodcmd=
else
mkdircmd=$mkdirprog
fi
else
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if test ! -f "$src" && test ! -d "$src"; then
echo "$0: $src does not exist." >&2
exit 1
fi
if test -z "$dstarg"; then
echo "$0: no destination specified." >&2
exit 1
fi
dst=$dstarg
# Protect names starting with `-'.
case $dst in
-*) dst=./$dst ;;
esac
# If destination is a directory, append the input filename; won't work
# if double slashes aren't ignored.
if test -d "$dst"; then
if test -n "$no_target_directory"; then
echo "$0: $dstarg: Is a directory" >&2
exit 1
fi
dst=$dst/`basename "$src"`
fi
fi
# This sed command emulates the dirname command.
dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'`
# Make sure that the destination directory exists.
# Skip lots of stat calls in the usual case.
if test ! -d "$dstdir"; then
defaultIFS='
'
IFS="${IFS-$defaultIFS}"
oIFS=$IFS
# Some sh's can't handle IFS=/ for some reason.
IFS='%'
set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
shift
IFS=$oIFS
pathcomp=
while test $# -ne 0 ; do
pathcomp=$pathcomp$1
shift
if test ! -d "$pathcomp"; then
$mkdirprog "$pathcomp"
# mkdir can fail with a `File exist' error in case several
# install-sh are creating the directory concurrently. This
# is OK.
test -d "$pathcomp" || exit
fi
pathcomp=$pathcomp/
done
fi
if test -n "$dir_arg"; then
$doit $mkdircmd "$dst" \
&& { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
&& { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
&& { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
&& { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
else
dstfile=`basename "$dst"`
# Make a couple of temp file names in the proper directory.
dsttmp=$dstdir/_inst.$$_
rmtmp=$dstdir/_rm.$$_
# Trap to clean up those temp files at exit.
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
trap '(exit $?); exit' 1 2 13 15
# Copy the file name to the temp name.
$doit $cpprog "$src" "$dsttmp" &&
# 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 $cpprog $src $dsttmp" command.
#
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
&& { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
&& { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
&& { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } &&
# Now rename the file to the real destination.
{ $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \
|| {
# The rename failed, perhaps because mv can't rename something else
# to itself, or perhaps because mv is so ancient that it does not
# support -f.
# Now remove or move aside any old file at destination location.
# We try this two ways since rm can't unlink itself on some
# systems and the destination file might be busy for other
# reasons. In this case, the final cleanup might fail but the new
# file should still install successfully.
{
if test -f "$dstdir/$dstfile"; then
$doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \
|| $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
|| {
echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
(exit 1); exit 1
}
else
:
fi
} &&
# Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
}
}
fi || { (exit 1); exit 1; }
done
# The final little trick to "correctly" pass the exit status to the exit trap.
{
(exit 0); exit 0
}
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:
+6971
View File
File diff suppressed because it is too large. Load diff
Executable
+360
View File
@@ -0,0 +1,360 @@
#! /bin/sh
# Common stub for a few missing GNU programs while installing.
scriptversion=2005-06-08.21
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005
# Free Software Foundation, Inc.
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 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., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, 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.
if test $# -eq 0; then
echo 1>&2 "Try \`$0 --help' for more information"
exit 1
fi
run=:
# In the cases where this matters, `missing' is being run in the
# srcdir already.
if test -f configure.ac; then
configure_ac=configure.ac
else
configure_ac=configure.in
fi
msg="missing on your system"
case "$1" in
--run)
# Try to run requested program, and just exit if it succeeds.
run=
shift
"$@" && exit 0
# Exit code 63 means version mismatch. This often happens
# when the user try to use an ancient version of a tool on
# a file that requires a minimum version. In this case we
# we should proceed has if the program had been absent, or
# if --run hadn't been passed.
if test $? = 63; then
run=:
msg="probably too old"
fi
;;
-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
--run try to run the given command, and emulate it if it fails
Supported PROGRAM values:
aclocal touch file \`aclocal.m4'
autoconf touch file \`configure'
autoheader touch file \`config.h.in'
automake touch all \`Makefile.in' files
bison create \`y.tab.[ch]', if possible, from existing .[ch]
flex create \`lex.yy.c', if possible, from existing .c
help2man touch the output file
lex create \`lex.yy.c', if possible, from existing .c
makeinfo touch the output file
tar try tar, gnutar, gtar, then tar without non-portable flags
yacc create \`y.tab.[ch]', if possible, from existing .[ch]
Send bug reports to <bug-automake@gnu.org>."
exit $?
;;
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
echo "missing $scriptversion (GNU Automake)"
exit $?
;;
-*)
echo 1>&2 "$0: Unknown \`$1' option"
echo 1>&2 "Try \`$0 --help' for more information"
exit 1
;;
esac
# Now exit if we have it, but it failed. Also exit now if we
# don't have it and --version was passed (most likely to detect
# the program).
case "$1" in
lex|yacc)
# Not GNU programs, they don't have --version.
;;
tar)
if test -n "$run"; then
echo 1>&2 "ERROR: \`tar' requires --run"
exit 1
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
exit 1
fi
;;
*)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
# Could not run --version or --help. This is probably someone
# running `$TOOL --version' or `$TOOL --help' to check whether
# $TOOL exists and not knowing $TOOL uses missing.
exit 1
fi
;;
esac
# If it does not exist, or fails to run (possibly an outdated version),
# try to emulate it.
case "$1" in
aclocal*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`acinclude.m4' or \`${configure_ac}'. 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 $msg. You should only need it if
you modified \`${configure_ac}'. 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 $msg. You should only need it if
you modified \`acconfig.h' or \`${configure_ac}'. You might want
to install the \`Autoconf' and \`GNU m4' packages. Grab them
from any GNU archive site."
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
test -z "$files" && files="config.h"
touch_files=
for f in $files; do
case "$f" in
*:*) touch_files="$touch_files "`echo "$f" |
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
*) touch_files="$touch_files $f.in";;
esac
done
touch $touch_files
;;
automake*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
You might want to install the \`Automake' and \`Perl' packages.
Grab them from any GNU archive site."
find . -type f -name Makefile.am -print |
sed 's/\.am$/.in/' |
while read f; do touch "$f"; done
;;
autom4te)
echo 1>&2 "\
WARNING: \`$1' is needed, but is $msg.
You might have modified some files without having the
proper tools for further handling them.
You can get \`$1' as part of \`Autoconf' from any GNU
archive site."
file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
if test -f "$file"; then
touch $file
else
test -z "$file" || exec >$file
echo "#! /bin/sh"
echo "# Created by GNU Automake missing as a replacement of"
echo "# $ $@"
echo "exit 0"
chmod +x $file
exit 1
fi
;;
bison|yacc)
echo 1>&2 "\
WARNING: \`$1' $msg. You should only need it if
you modified a \`.y' file. You may need the \`Bison' package
in order for those modifications to take effect. You can get
\`Bison' from any GNU archive site."
rm -f y.tab.c y.tab.h
if [ $# -ne 1 ]; then
eval LASTARG="\${$#}"
case "$LASTARG" in
*.y)
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" y.tab.c
fi
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" y.tab.h
fi
;;
esac
fi
if [ ! -f y.tab.h ]; then
echo >y.tab.h
fi
if [ ! -f y.tab.c ]; then
echo 'main() { return 0; }' >y.tab.c
fi
;;
lex|flex)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified a \`.l' file. You may need the \`Flex' package
in order for those modifications to take effect. You can get
\`Flex' from any GNU archive site."
rm -f lex.yy.c
if [ $# -ne 1 ]; then
eval LASTARG="\${$#}"
case "$LASTARG" in
*.l)
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" lex.yy.c
fi
;;
esac
fi
if [ ! -f lex.yy.c ]; then
echo 'main() { return 0; }' >lex.yy.c
fi
;;
help2man)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified a dependency of a manual page. You may need the
\`Help2man' package in order for those modifications to take
effect. You can get \`Help2man' from any GNU archive site."
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
if test -z "$file"; then
file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
fi
if [ -f "$file" ]; then
touch $file
else
test -z "$file" || exec >$file
echo ".ab help2man is required to generate this page"
exit 1
fi
;;
makeinfo)
echo 1>&2 "\
WARNING: \`$1' is $msg. 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."
# The file to touch is that specified with -o ...
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
if test -z "$file"; then
# ... or it is the one specified with @setfilename ...
infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile`
# ... or it is derived from the source name (dir/f.texi becomes f.info)
test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
fi
# If the file does not exist, the user really needs makeinfo;
# let's fail without touching anything.
test -f $file || exit 1
touch $file
;;
tar)
shift
# We have already tried tar in the generic part.
# Look for gnutar/gtar before invocation to avoid ugly error
# messages.
if (gnutar --version > /dev/null 2>&1); then
gnutar "$@" && exit 0
fi
if (gtar --version > /dev/null 2>&1); then
gtar "$@" && exit 0
fi
firstarg="$1"
if shift; then
case "$firstarg" in
*o*)
firstarg=`echo "$firstarg" | sed s/o//`
tar "$firstarg" "$@" && exit 0
;;
esac
case "$firstarg" in
*h*)
firstarg=`echo "$firstarg" | sed s/h//`
tar "$firstarg" "$@" && exit 0
;;
esac
fi
echo 1>&2 "\
WARNING: I can't seem to be able to run \`tar' with the given arguments.
You may want to install GNU tar or Free paxutils, or check the
command line arguments."
exit 1
;;
*)
echo 1>&2 "\
WARNING: \`$1' is needed, and is $msg.
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 prerequisites 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
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:
Vendored Executable
+22268
View File
File diff suppressed because it is too large. Load diff
+47
View File
@@ -0,0 +1,47 @@
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
AC_INIT(libg15render, 1.2, mirabeaj@gmail.com)
AC_CONFIG_AUX_DIR(config)
AM_INIT_AUTOMAKE()
AC_CONFIG_SRCDIR([libg15render.h])
AC_CONFIG_HEADER([config.h])
# Checks for programs.
AC_PROG_CC
AC_PROG_LIBTOOL
# Checks for --enable args
AC_MSG_CHECKING(whether to enable FreeType2 support)
AC_ARG_ENABLE(ttf, [ --enable-ttf enable FreeType2 support],
if [[[ "$enableval" = "yes" ]]]; then
AC_DEFINE(TTF_SUPPORT, [1], [Define to 1 to enable FreeType2 support])
CFLAGS="$CFLAGS `freetype-config --cflags`"
FTLIB="-lfreetype"
ttf_support="yes"
else
ttf_support="no"
fi,
ttf_support="no"
)
AC_MSG_RESULT($ttf_support)
# Checks for libraries.
AC_CHECK_LIB([g15], [writePixmapToLCD], ,AC_MSG_ERROR(["libg15 not found. please install it"]))
AC_CHECK_LIB([m], [ceil], ,AC_MSG_ERROR(["libm not found. Please install it"]))
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([string.h ft2build.h])
# Checks for library functions.
AC_HEADER_STDC
AC_CHECK_FUNCS([memset])
AC_SUBST(FTLIB)
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
+15
View File
@@ -0,0 +1,15 @@
libg15render (1.2-1) edgy; urgency=low
* Add WBMP loading and drawing routines
* Add drawBigNum routine
* Add man page
* Enable right justified TTF printing
-- Anthony J. Mirabella <mirabeaj@gmail.com> Mon, 01 Jan 2007 17:11:31 -0500
libg15render (1.1-1) breezy; urgency=low
* Initial release
-- Anthony J. Mirabella <mirabeaj@gmail.com> Sun, 24 Sep 2006 22:57:06 -0400
+1
View File
@@ -0,0 +1 @@
4
+21
View File
@@ -0,0 +1,21 @@
Source: libg15render
Priority: optional
Maintainer: Anthony J. Mirabella <mirabeaj@gmail.com>
Build-Depends: debhelper (>= 4.0.0), autotools-dev, libg15-dev, libfreetype6-dev
Standards-Version: 3.6.2
Section: libs
Package: libg15render-dev
Section: libdevel
Architecture: any
Depends: libg15render (= ${Source-Version})
Description: Development packages for libg15render
Includes the files needed for developing software that uses libg15render.
Package: libg15render
Section: libs
Architecture: any
Depends: ${shlibs:Depends}
Description: Library for rendering displays for the Logitech G15 Keyboard
Provides simple graphics primitives and text services for the display on the
Logitech G15 keyboard.
+12
View File
@@ -0,0 +1,12 @@
This package was debianized by Anthony J. Mirabella <mirabeaj@gmail.com> on
Sun, 24 Sep 2006 22:57:06 -0400.
It was downloaded from sourceforge.net
Copyright Holders: Philip Lawatsch <philip@lawatsch.at>
Alex Ibrado <alex@ibrado.org>
Autotools support added by Anthony J. Mirabella <mirabeaj@gmail.com>
License:
GPL
Vendored
+2
View File
@@ -0,0 +1,2 @@
NEWS
README
+6
View File
@@ -0,0 +1,6 @@
usr/include/*
usr/lib/lib*.a
usr/lib/lib*.so
usr/lib/pkgconfig/*
usr/lib/*.la
usr/share/pkgconfig/*
+1
View File
@@ -0,0 +1 @@
usr/lib/libg15*.so.*
Vendored Executable
+115
View File
@@ -0,0 +1,115 @@
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# These are used for cross-compiling and for saving the configure script
# from having to guess our platform (since we know it already)
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
CFLAGS = -Wall -g
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
# shared library versions, option 1
version=1.1.0
major=1
# option 2, assuming the library is created as src/.libs/libfoo.so.2.0.5 or so
#version=`ls src/.libs/lib*.so.* | \
# awk '{if (match($$0,/[0-9]+\.[0-9]+\.[0-9]+$$/)) print substr($$0,RSTART)}'`
#major=`ls src/.libs/lib*.so.* | \
# awk '{if (match($$0,/\.so\.[0-9]+$$/)) print substr($$0,RSTART+4)}'`
config.status: configure
dh_testdir
# Add here commands to configure the package.
CFLAGS="$(CFLAGS) -Wl,-z,defs" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --enable-ttf
build: build-stamp
build-stamp: config.status
dh_testdir
# Add here commands to compile the package.
$(MAKE)
touch build-stamp
clean:
dh_testdir
dh_testroot
rm -f build-stamp
# Add here commands to clean up after the build process.
-$(MAKE) distclean
ifneq "$(wildcard /usr/share/misc/config.sub)" ""
cp -f /usr/share/misc/config.sub config.sub
endif
ifneq "$(wildcard /usr/share/misc/config.guess)" ""
cp -f /usr/share/misc/config.guess config.guess
endif
dh_clean
install: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs -plibg15
dh_installdirs -plibg15-dev
# Add here commands to install the package into debian/tmp
$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.
# Build architecture-dependent files here.
binary-arch: build install
dh_testdir -a
dh_testroot -a
dh_installchangelogs ChangeLog -a
dh_installdocs -a
dh_installexamples -a
dh_install -a --sourcedir=debian/tmp
dh_installmenu -a
dh_installdebconf -a
dh_installlogrotate -a
dh_installemacsen -a
dh_installpam -a
dh_installmime -a
dh_installinit -a
dh_installcron -a
dh_installinfo -a
dh_installman -a
dh_link -a
dh_strip -a
dh_compress -a
dh_fixperms -a
# dh_perl -a
# dh_python -a
dh_makeshlibs -a
dh_installdeb -a
dh_shlibdeps -a
dh_gencontrol -a
dh_md5sums -a
dh_builddeb -a
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install
+20
View File
@@ -0,0 +1,20 @@
/*
This file is part of g15lcd.
g15lcd 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.
g15lcd 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 g15lcd; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
/* This font was provided by Sebastian XXX (sorry bastl, i still cant spell your last name ) */
unsigned char fontdata_6x4[] = {0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x01, 0x01, 0x00, 0x01, 0x00, 0x01, 0x01, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,Line truncated
+2066
View File
File diff suppressed because it is too large. Load diff
+2591
View File
File diff suppressed because it is too large. Load diff
+780
View File
@@ -0,0 +1,780 @@
.TH "libg15render" 3 "16 Nov 2006" "libg15render" \" -*- nroff -*-
.ad l
.nh
.SH NAME
libg15render \- Render text and graphics to a buffer usable by
.BR libg15 (3)
or
.BR g15daemon (1).
.SH SYNOPSIS
.br
.PP
\fC#include <libg15render.h>\fP
.br
.SS "Data Structures"
.in +1c
.ti -1c
.RI "struct \fBg15canvas\fP"
.br
.RI "\fIThis structure holds the data need to render objects to the LCD screen. \fP"
.in -1c
.SS "Defines"
.in +1c
.ti -1c
.RI "#define \fBBYTE_SIZE\fP 8"
.br
.ti -1c
.RI "#define \fBG15_BUFFER_LEN\fP 1048"
.br
.ti -1c
.RI "#define \fBG15_COLOR_BLACK\fP 1"
.br
.ti -1c
.RI "#define \fBG15_COLOR_WHITE\fP 0"
.br
.ti -1c
.RI "#define \fBG15_LCD_HEIGHT\fP 43"
.br
.ti -1c
.RI "#define \fBG15_LCD_OFFSET\fP 32"
.br
.ti -1c
.RI "#define \fBG15_LCD_WIDTH\fP 160"
.br
.ti -1c
.RI "#define \fBG15_MAX_FACE\fP 5"
.br
.ti -1c
.RI "#define \fBG15_PIXEL_FILL\fP 1"
.br
.ti -1c
.RI "#define \fBG15_PIXEL_NOFILL\fP 0"
.br
.ti -1c
.RI "#define \fBG15_TEXT_LARGE\fP 2"
.br
.ti -1c
.RI "#define \fBG15_TEXT_MED\fP 1"
.br
.ti -1c
.RI "#define \fBG15_TEXT_SMALL\fP 0"
.br
.in -1c
.SS "Functions"
.in +1c
.ti -1c
.RI "void \fBg15r_clearScreen\fP (\fBg15canvas\fP *canvas, int color)"
.br
.RI "\fIFills the screen with pixels of color. \fP"
.ti -1c
.RI "void \fBg15r_drawBar\fP (\fBg15canvas\fP *canvas, int x1, int y1, int x2, int y2, int color, int num, int max, int type)"
.br
.RI "\fIDraws a completion bar. \fP"
.ti -1c
.RI "void \fBg15r_drawBigNum\fP (\fBg15canvas\fP *canvas, unsigned int x1, unsigned int y1, unsigned int x2, unsigned int y2, int num)"
.br
.RI "\fIDraw a large number. \fP"
.ti -1c
.RI "void \fBg15r_drawCircle\fP (\fBg15canvas\fP *canvas, int x, int y, int r, int fill, int color)"
.br
.RI "\fIDraws a circle centered at (x, y) with a radius of r. \fP"
.ti -1c
.RI "void \fBg15r_drawIcon\fP (\fBg15canvas\fP *canvas, char *buf, int my_x, int my_y, int width, int height)"
.br
.RI "\fIDraw an icon to the screen from a wbmp buffer. \fP"
.ti -1c
.RI "void \fBg15r_drawLine\fP (\fBg15canvas\fP *canvas, int px1, int py1, int px2, int py2, const int color)"
.br
.RI "\fIDraws a line from (px1, py1) to (px2, py2). \fP"
.ti -1c
.RI "void \fBg15r_drawRoundBox\fP (\fBg15canvas\fP *canvas, int x1, int y1, int x2, int y2, int fill, int color)"
.br
.RI "\fIDraws a box with rounded corners bounded by (x1, y1) and (x2, y2). \fP"
.ti -1c
.RI "void \fBg15r_drawSprite\fP (\fBg15canvas\fP *canvas, char *buf, int my_x, int my_y, int width, int height, int start_x, int start_y, int total_width)"
.br
.RI "\fIDraw a sprite to the screen from a wbmp buffer. \fP"
.ti -1c
.RI "int \fBg15r_getPixel\fP (\fBg15canvas\fP *canvas, unsigned int x, unsigned int y)"
.br
.RI "\fIGets the value of the pixel at (x, y). \fP"
.ti -1c
.RI "void \fBg15r_initCanvas\fP (\fBg15canvas\fP *canvas)"
.br
.RI "\fIClears the canvas and resets the mode switches. \fP"
.ti -1c
.RI "int \fBg15r_loadWbmpSplash\fP (\fBg15canvas\fP *canvas, char *filename)"
.br
.RI "\fIDraw a splash screen from 160x43 wbmp file. \fP"
.ti -1c
.RI "int \fBg15r_loadWbmpToBuf\fP (char *buf, char *filename, int *img_width, int *img_height, int maxlen)"
.br
.RI "\fILoad a wbmp file into a buffer. \fP"
.ti -1c
.RI "void \fBg15r_pixelBox\fP (\fBg15canvas\fP *canvas, int x1, int y1, int x2, int y2, int color, int thick, int fill)"
.br
.RI "\fIDraws a box bounded by (x1, y1) and (x2, y2). \fP"
.ti -1c
.RI "void \fBg15r_pixelOverlay\fP (\fBg15canvas\fP *canvas, int x1, int y1, int width, int height, short colormap[])"
.br
.RI "\fIOverlays a bitmap of size width x height starting at (x1, y1). \fP"
.ti -1c
.RI "void \fBg15r_pixelReverseFill\fP (\fBg15canvas\fP *canvas, int x1, int y1, int x2, int y2, int fill, int color)"
.br
.RI "\fIFills an area bounded by (x1, y1) and (x2, y2). \fP"
.ti -1c
.RI "void \fBg15r_renderCharacterLarge\fP (\fBg15canvas\fP *canvas, int x, int y, unsigned char character, unsigned int sx, unsigned int sy)"
.br
.RI "\fIRenders a character in the large font at (x, y). \fP"
.ti -1c
.RI "void \fBg15r_renderCharacterMedium\fP (\fBg15canvas\fP *canvas, int x, int y, unsigned char character, unsigned int sx, unsigned int sy)"
.br
.RI "\fIRenders a character in the meduim font at (x, y). \fP"
.ti -1c
.RI "void \fBg15r_renderCharacterSmall\fP (\fBg15canvas\fP *canvas, int x, int y, unsigned char character, unsigned int sx, unsigned int sy)"
.br
.RI "\fIRenders a character in the small font at (x, y). \fP"
.ti -1c
.RI "void \fBg15r_renderString\fP (\fBg15canvas\fP *canvas, unsigned char stringOut[], int row, int size, unsigned int sx, unsigned int sy)"
.br
.RI "\fIRenders a string with font size in row. \fP"
.ti -1c
.RI "void \fBg15r_setPixel\fP (\fBg15canvas\fP *canvas, unsigned int x, unsigned int y, int val)"
.br
.RI "\fISets the value of the pixel at (x, y). \fP"
.ti -1c
.RI "void \fBg15r_ttfLoad\fP (\fBg15canvas\fP *canvas, char *fontname, int fontsize, int face_num)"
.br
.RI "\fILoads a font through the FreeType2 library. \fP"
.ti -1c
.RI "void \fBg15r_ttfPrint\fP (\fBg15canvas\fP *canvas, int x, int y, int fontsize, int face_num, int color, int center, char *print_string)"
.br
.RI "\fIPrints a string in a given font. \fP"
.in -1c
.SS "Variables"
.in +1c
.ti -1c
.RI "unsigned char \fBfontdata_6x4\fP []"
.br
.RI "\fIFont data for the small (6x4) font. \fP"
.ti -1c
.RI "unsigned char \fBfontdata_7x5\fP []"
.br
.RI "\fIFont data for the medium (7x5) font. \fP"
.ti -1c
.RI "unsigned char \fBfontdata_8x8\fP []"
.br
.RI "\fIFont data for the large (8x8) font. \fP"
.in -1c
.SH "Define Documentation"
.PP
.SS "#define BYTE_SIZE 8"
.PP
Definition at line 21 of file libg15render.h.
.PP
Referenced by g15r_drawIcon(), g15r_drawSprite(), g15r_getPixel(), g15r_loadWbmpToBuf(), and g15r_setPixel().
.SS "#define G15_BUFFER_LEN 1048"
.PP
Definition at line 22 of file libg15render.h.
.PP
Referenced by g15r_clearScreen(), g15r_initCanvas(), and g15r_loadWbmpSplash().
.SS "#define G15_COLOR_BLACK 1"
.PP
Definition at line 27 of file libg15render.h.
.PP
Referenced by g15r_drawBigNum(), g15r_drawRoundBox(), g15r_pixelOverlay(), g15r_renderCharacterLarge(), g15r_renderCharacterMedium(), and g15r_renderCharacterSmall().
.SS "#define G15_COLOR_WHITE 0"
.PP
Definition at line 26 of file libg15render.h.
.PP
Referenced by g15r_drawBigNum(), g15r_drawRoundBox(), g15r_pixelOverlay(), g15r_renderCharacterLarge(), g15r_renderCharacterMedium(), and g15r_renderCharacterSmall().
.SS "#define G15_LCD_HEIGHT 43"
.PP
Definition at line 24 of file libg15render.h.
.PP
Referenced by g15r_getPixel(), and g15r_setPixel().
.SS "#define G15_LCD_OFFSET 32"
.PP
Definition at line 23 of file libg15render.h.
.SS "#define G15_LCD_WIDTH 160"
.PP
Definition at line 25 of file libg15render.h.
.PP
Referenced by g15r_getPixel(), and g15r_setPixel().
.SS "#define G15_MAX_FACE 5"
.PP
Definition at line 33 of file libg15render.h.
.PP
Referenced by g15r_ttfLoad().
.SS "#define G15_PIXEL_FILL 1"
.PP
Definition at line 32 of file libg15render.h.
.SS "#define G15_PIXEL_NOFILL 0"
.PP
Definition at line 31 of file libg15render.h.
.SS "#define G15_TEXT_LARGE 2"
.PP
Definition at line 30 of file libg15render.h.
.PP
Referenced by g15r_renderString().
.SS "#define G15_TEXT_MED 1"
.PP
Definition at line 29 of file libg15render.h.
.PP
Referenced by g15r_renderString().
.SS "#define G15_TEXT_SMALL 0"
.PP
Definition at line 28 of file libg15render.h.
.PP
Referenced by g15r_renderString().
.SH "Function Documentation"
.PP
.SS "void g15r_clearScreen (\fBg15canvas\fP * canvas, int color)"
.PP
Fills the screen with pixels of color.
.PP
Clears the screen and fills it with pixels of color
.PP
\fBParameters:\fP
.RS 4
\fIcanvas\fP A pointer to a \fBg15canvas\fP struct in which the buffer to be operated on is found.
.br
\fIcolor\fP Screen will be filled with this color.
.RE
.PP
.PP
Definition at line 80 of file screen.c.
.PP
References g15canvas::buffer, and G15_BUFFER_LEN.
.PP
.SS "void g15r_drawBar (\fBg15canvas\fP * canvas, int x1, int y1, int x2, int y2, int color, int num, int max, int type)"
.PP
Draws a completion bar.
.PP
Given a maximum value, and a value between 0 and that maximum value, calculate and draw a bar showing that percentage.
.PP
\fBParameters:\fP
.RS 4
\fIcanvas\fP A pointer to a \fBg15canvas\fP struct in which the buffer to be operated on is found.
.br
\fIx1\fP Defines leftmost bound of the bar.
.br
\fIy1\fP Defines uppermost bound of the bar.
.br
\fIx2\fP Defines rightmost bound of the bar.
.br
\fIy2\fP Defines bottommost bound of the bar.
.br
\fIcolor\fP The bar will be drawn this color.
.br
\fInum\fP Number of units relative to max filled.
.br
\fImax\fP Number of units equal to 100% filled.
.br
\fItype\fP Type of bar. 1=solid bar, 2=solid bar with border, 3 = solid bar with I-frame.
.RE
.PP
.PP
Definition at line 337 of file pixel.c.
.PP
References g15r_drawLine(), and g15r_pixelBox().
.PP
.SS "void g15r_drawBigNum (\fBg15canvas\fP * canvas, unsigned int x1, unsigned int y1, unsigned int x2, unsigned int y2, int num)"
.PP
Draw a large number.
.PP
Draw a large number to a canvas
.PP
\fBParameters:\fP
.RS 4
\fIcanvas\fP A pointer to a \fBg15canvas\fP struct in which the buffer to be operated on is found.
.br
\fIx1\fP Defines leftmost bound of the number.
.br
\fIy1\fP Defines uppermost bound of the number.
.br
\fIx2\fP Defines rightmost bound of the number.
.br
\fIy2\fP Defines bottommost bound of the number.
.br
\fInum\fP The number to be drawn.
.RE
.PP
.PP
Definition at line 542 of file pixel.c.
.PP
References G15_COLOR_BLACK, G15_COLOR_WHITE, and g15r_pixelBox().
.PP
.SS "void g15r_drawCircle (\fBg15canvas\fP * canvas, int x, int y, int r, int fill, int color)"
.PP
Draws a circle centered at (x, y) with a radius of r.
.PP
Draws a circle centered at (x, y) with a radius of r.
.PP
The circle will be filled if fill != 0.
.PP
\fBParameters:\fP
.RS 4
\fIcanvas\fP A pointer to a \fBg15canvas\fP struct in which the buffer to be operated on is found.
.br
\fIx\fP Defines horizontal center of the circle.
.br
\fIy\fP Defines vertical center of circle.
.br
\fIr\fP Defines radius of circle.
.br
\fIfill\fP The circle will be filled with color if fill != 0.
.br
\fIcolor\fP Lines defining the circle will be drawn this color.
.RE
.PP
.PP
Definition at line 203 of file pixel.c.
.PP
References g15r_drawLine(), and g15r_setPixel().
.PP
.SS "void g15r_drawIcon (\fBg15canvas\fP * canvas, char * buf, int my_x, int my_y, int width, int height)"
.PP
Draw an icon to the screen from a wbmp buffer.
.PP
Draw an icon to a canvas
.PP
\fBParameters:\fP
.RS 4
\fIcanvas\fP A pointer to a \fBg15canvas\fP struct in which the buffer to be operated in is found.
.br
\fIbuf\fP A pointer to the buffer holding the icon to be displayed.
.br
\fImy_x\fP Leftmost boundary of image.
.br
\fImy_y\fP Topmost boundary of image.
.br
\fIwidth\fP Width of the image in buf.
.br
\fIheight\fP Height of the image in buf.
.RE
.PP
.PP
Definition at line 408 of file pixel.c.
.PP
References BYTE_SIZE, and g15r_setPixel().
.PP
.SS "void g15r_drawLine (\fBg15canvas\fP * canvas, int px1, int py1, int px2, int py2, const int color)"
.PP
Draws a line from (px1, py1) to (px2, py2).
.PP
A line of color is drawn from (px1, py1) to (px2, py2).
.PP
\fBParameters:\fP
.RS 4
\fIcanvas\fP A pointer to a \fBg15canvas\fP struct in which the buffer to be operated on is found.
.br
\fIpx1\fP X component of point 1.
.br
\fIpy1\fP Y component of point 1.
.br
\fIpx2\fP X component of point 2.
.br
\fIpy2\fP Y component of point 2.
.br
\fIcolor\fP Line will be drawn this color.
.RE
.PP
.PP
Definition at line 99 of file pixel.c.
.PP
References g15r_setPixel(), and swap().
.PP
Referenced by g15r_drawBar(), g15r_drawCircle(), g15r_drawRoundBox(), and g15r_pixelBox().
.PP
.SS "void g15r_drawRoundBox (\fBg15canvas\fP * canvas, int x1, int y1, int x2, int y2, int fill, int color)"
.PP
Draws a box with rounded corners bounded by (x1, y1) and (x2, y2).
.PP
Draws a rounded box around the area bounded by (x1, y1) and (x2, y2).
.PP
The box will be filled if fill != 0.
.PP
\fBParameters:\fP
.RS 4
\fIcanvas\fP A pointer to a \fBg15canvas\fP struct in which the buffer to be operated on is found.
.br
\fIx1\fP Defines leftmost bound of the box.
.br
\fIy1\fP Defines uppermost bound of the box.
.br
\fIx2\fP Defines rightmost bound of the box.
.br
\fIy2\fP Defines bottommost bound of the box.
.br
\fIfill\fP The box will be filled with color if fill != 0.
.br
\fIcolor\fP Lines defining the box will be drawn this color.
.RE
.PP
.PP
Definition at line 252 of file pixel.c.
.PP
References G15_COLOR_BLACK, G15_COLOR_WHITE, g15r_drawLine(), and g15r_setPixel().
.PP
.SS "void g15r_drawSprite (\fBg15canvas\fP * canvas, char * buf, int my_x, int my_y, int width, int height, int start_x, int start_y, int total_width)"
.PP
Draw a sprite to the screen from a wbmp buffer.
.PP
Draw a sprite to a canvas
.PP
\fBParameters:\fP
.RS 4
\fIcanvas\fP A pointer to a \fBg15canvas\fP struct in which the buffer to be operated in is found.
.br
\fIbuf\fP A pointer to the buffer holding a set of sprites.
.br
\fImy_x\fP Leftmost boundary of image.
.br
\fImy_y\fP Topmost boundary of image.
.br
\fIwidth\fP Width of the sprite.
.br
\fIheight\fP Height of the sprite.
.br
\fIstart_x\fP X offset for reading sprite from buf.
.br
\fIstart_y\fP Y offset for reading sprite from buf.
.br
\fItotal_width\fP Width of the set of sprites held in buf.
.RE
.PP
.PP
Definition at line 440 of file pixel.c.
.PP
References BYTE_SIZE, and g15r_setPixel().
.PP
.SS "int g15r_getPixel (\fBg15canvas\fP * canvas, unsigned int x, unsigned int y)"
.PP
Gets the value of the pixel at (x, y).
.PP
Retrieves the value of the pixel at (x, y)
.PP
\fBParameters:\fP
.RS 4
\fIcanvas\fP A pointer to a \fBg15canvas\fP struct in which the buffer to be operated on is found.
.br
\fIx\fP X offset for pixel to be retrieved.
.br
\fIy\fP Y offset for pixel to be retrieved.
.RE
.PP
.PP
Definition at line 29 of file screen.c.
.PP
References g15canvas::buffer, BYTE_SIZE, G15_LCD_HEIGHT, and G15_LCD_WIDTH.
.PP
Referenced by g15r_pixelReverseFill(), and g15r_setPixel().
.PP
.SS "void g15r_initCanvas (\fBg15canvas\fP * canvas)"
.PP
Clears the canvas and resets the mode switches.
.PP
Clears the screen and resets the mode values for a canvas
.PP
\fBParameters:\fP
.RS 4
\fIcanvas\fP A pointer to a \fBg15canvas\fP struct
.RE
.PP
.PP
Definition at line 91 of file screen.c.
.PP
References g15canvas::buffer, g15canvas::ftLib, G15_BUFFER_LEN, g15canvas::mode_cache, g15canvas::mode_reverse, and g15canvas::mode_xor.
.PP
.SS "int g15r_loadWbmpSplash (\fBg15canvas\fP * canvas, char * filename)"
.PP
Draw a splash screen from 160x43 wbmp file.
.PP
wbmp splash screen loader - assumes image is 160x43
.PP
\fBParameters:\fP
.RS 4
\fIcanvas\fP A pointer to a \fBg15canvas\fP struct in which the buffer to be operated on is found.
.br
\fIfilename\fP A string holding the path to the wbmp to be displayed.
.RE
.PP
.PP
Definition at line 385 of file pixel.c.
.PP
References g15canvas::buffer, G15_BUFFER_LEN, and g15r_loadWbmpToBuf().
.PP
.SS "int g15r_loadWbmpToBuf (char * buf, char * filename, int * img_width, int * img_height, int maxlen)"
.PP
Load a wbmp file into a buffer.
.PP
basic wbmp loader - loads wbmp into pre-prepared buf.
.PP
\fBParameters:\fP
.RS 4
\fIbuf\fP A pointer to the buffer into which the wbmp will be loaded.
.br
\fIfilename\fP A string holding the path to the wbmp to be loaded.
.br
\fIimg_width\fP A pointer to an int that will hold the image width on return.
.br
\fIimg_height\fP A pointer to an int that will hold the image height on return.
.br
\fImaxlen\fP The maximum number of bytes that should be read from filename.
.RE
.PP
.PP
Definition at line 468 of file pixel.c.
.PP
References BYTE_SIZE.
.PP
Referenced by g15r_loadWbmpSplash().
.PP
.SS "void g15r_pixelBox (\fBg15canvas\fP * canvas, int x1, int y1, int x2, int y2, int color, int thick, int fill)"
.PP
Draws a box bounded by (x1, y1) and (x2, y2).
.PP
Draws a box around the area bounded by (x1, y1) and (x2, y2).
.PP
The box will be filled if fill != 0 and the sides will be thick pixels wide.
.PP
\fBParameters:\fP
.RS 4
\fIcanvas\fP A pointer to a \fBg15canvas\fP struct in which the buffer to be operated on is found.
.br
\fIx1\fP Defines leftmost bound of the box.
.br
\fIy1\fP Defines uppermost bound of the box.
.br
\fIx2\fP Defines rightmost bound of the box.
.br
\fIy2\fP Defines bottommost bound of the box.
.br
\fIcolor\fP Lines defining the box will be drawn this color.
.br
\fIthick\fP Lines defining the box will be this many pixels thick.
.br
\fIfill\fP The box will be filled with color if fill != 0.
.RE
.PP
.PP
Definition at line 163 of file pixel.c.
.PP
References g15r_drawLine(), and g15r_setPixel().
.PP
Referenced by g15r_drawBar(), and g15r_drawBigNum().
.PP
.SS "void g15r_pixelOverlay (\fBg15canvas\fP * canvas, int x1, int y1, int width, int height, short colormap[])"
.PP
Overlays a bitmap of size width x height starting at (x1, y1).
.PP
A 1-bit bitmap defined in colormap[] is drawn to the canvas with an upper left corner at (x1, y1) and a lower right corner at (x1+width, y1+height).
.PP
\fBParameters:\fP
.RS 4
\fIcanvas\fP A pointer to a \fBg15canvas\fP struct in which the buffer to be operated on is found.
.br
\fIx1\fP Defines the leftmost bound of the area to be drawn.
.br
\fIy1\fP Defines the uppermost bound of the area to be drawn.
.br
\fIwidth\fP Defines the width of the bitmap to be drawn.
.br
\fIheight\fP Defines the height of the bitmap to be drawn.
.br
\fIcolormap\fP An array containing width*height entries of value 0 for pixel off or != 0 for pixel on.
.RE
.PP
.PP
Definition at line 74 of file pixel.c.
.PP
References G15_COLOR_BLACK, G15_COLOR_WHITE, and g15r_setPixel().
.PP
.SS "void g15r_pixelReverseFill (\fBg15canvas\fP * canvas, int x1, int y1, int x2, int y2, int fill, int color)"
.PP
Fills an area bounded by (x1, y1) and (x2, y2).
.PP
The area with an upper left corner at (x1, y1) and lower right corner at (x2, y2) will be filled with color if fill>0 or the current contents of the area will be reversed if fill==0.
.PP
\fBParameters:\fP
.RS 4
\fIcanvas\fP A pointer to a \fBg15canvas\fP struct in which the buffer to be operated on is found.
.br
\fIx1\fP Defines leftmost bound of area to be filled.
.br
\fIy1\fP Defines uppermost bound of area to be filled.
.br
\fIx2\fP Defines rightmost bound of area to be filled.
.br
\fIy2\fP Defines bottommost bound of area to be filled.
.br
\fIfill\fP Area will be filled with color if fill != 0, else contents of area will have color values reversed.
.br
\fIcolor\fP If fill != 0, then area will be filled if color == 1 and emptied if color == 0.
.RE
.PP
.PP
Definition at line 45 of file pixel.c.
.PP
References g15r_getPixel(), and g15r_setPixel().
.PP
.SS "void g15r_renderCharacterLarge (\fBg15canvas\fP * canvas, int x, int y, unsigned char character, unsigned int sx, unsigned int sy)"
.PP
Renders a character in the large font at (x, y).
.PP
Definition at line 22 of file text.c.
.PP
References fontdata_8x8, G15_COLOR_BLACK, G15_COLOR_WHITE, and g15r_setPixel().
.PP
Referenced by g15r_renderString().
.PP
.SS "void g15r_renderCharacterMedium (\fBg15canvas\fP * canvas, int x, int y, unsigned char character, unsigned int sx, unsigned int sy)"
.PP
Renders a character in the meduim font at (x, y).
.PP
Definition at line 50 of file text.c.
.PP
References fontdata_7x5, G15_COLOR_BLACK, G15_COLOR_WHITE, and g15r_setPixel().
.PP
Referenced by g15r_renderString().
.PP
.SS "void g15r_renderCharacterSmall (\fBg15canvas\fP * canvas, int x, int y, unsigned char character, unsigned int sx, unsigned int sy)"
.PP
Renders a character in the small font at (x, y).
.PP
Definition at line 77 of file text.c.
.PP
References fontdata_6x4, G15_COLOR_BLACK, G15_COLOR_WHITE, and g15r_setPixel().
.PP
Referenced by g15r_renderString().
.PP
.SS "void g15r_renderString (\fBg15canvas\fP * canvas, unsigned char stringOut[], int row, int size, unsigned int sx, unsigned int sy)"
.PP
Renders a string with font size in row.
.PP
Definition at line 104 of file text.c.
.PP
References G15_TEXT_LARGE, G15_TEXT_MED, G15_TEXT_SMALL, g15r_renderCharacterLarge(), g15r_renderCharacterMedium(), and g15r_renderCharacterSmall().
.PP
.SS "void g15r_setPixel (\fBg15canvas\fP * canvas, unsigned int x, unsigned int y, int val)"
.PP
Sets the value of the pixel at (x, y).
.PP
Sets the value of the pixel at (x, y)
.PP
\fBParameters:\fP
.RS 4
\fIcanvas\fP A pointer to a \fBg15canvas\fP struct in which the buffer to be operated on is found.
.br
\fIx\fP X offset for pixel to be set.
.br
\fIy\fP Y offset for pixel to be set.
.br
\fIval\fP Value to which pixel should be set.
.RE
.PP
.PP
Definition at line 50 of file screen.c.
.PP
References g15canvas::buffer, BYTE_SIZE, G15_LCD_HEIGHT, G15_LCD_WIDTH, g15r_getPixel(), g15canvas::mode_reverse, and g15canvas::mode_xor.
.PP
Referenced by draw_ttf_char(), g15r_drawCircle(), g15r_drawIcon(), g15r_drawLine(), g15r_drawRoundBox(), g15r_drawSprite(), g15r_pixelBox(), g15r_pixelOverlay(), g15r_pixelReverseFill(), g15r_renderCharacterLarge(), g15r_renderCharacterMedium(), and g15r_renderCharacterSmall().
.PP
.SS "void g15r_ttfLoad (\fBg15canvas\fP * canvas, char * fontname, int fontsize, int face_num)"
.PP
Loads a font through the FreeType2 library.
.PP
Load a font for use with FreeType2 font support
.PP
\fBParameters:\fP
.RS 4
\fIcanvas\fP A pointer to a \fBg15canvas\fP struct in which the buffer to be operated on is found.
.br
\fIfontname\fP Absolute pathname to font file to be loaded.
.br
\fIfontsize\fP Size in points for font to be loaded.
.br
\fIface_num\fP Slot into which font face will be loaded.
.RE
.PP
.PP
Definition at line 145 of file text.c.
.PP
References g15canvas::ftLib, G15_MAX_FACE, g15canvas::ttf_face, and g15canvas::ttf_fontsize.
.PP
.SS "void g15r_ttfPrint (\fBg15canvas\fP * canvas, int x, int y, int fontsize, int face_num, int color, int center, char * print_string)"
.PP
Prints a string in a given font.
.PP
Render a string with a FreeType2 font
.PP
\fBParameters:\fP
.RS 4
\fIcanvas\fP A pointer to a \fBg15canvas\fP struct in which the buffer to be operated on is found.
.br
\fIx\fP initial x position for string.
.br
\fIy\fP initial y position for string.
.br
\fIfontsize\fP Size of string in points.
.br
\fIface_num\fP Font to be used is loaded in this slot.
.br
\fIcolor\fP Text will be drawn this color.
.br
\fIcenter\fP Text will be centered if center == 1 and right justified if center == 2.
.br
\fIprint_string\fP Pointer to the string to be printed.
.RE
.PP
.PP
Definition at line 283 of file text.c.
.PP
References calc_ttf_centering(), calc_ttf_right_justify(), calc_ttf_true_ypos(), draw_ttf_str(), g15canvas::ttf_face, and g15canvas::ttf_fontsize.
.PP
.SH "Variable Documentation"
.PP
.SS "unsigned char \fBfontdata_6x4\fP[]"
.PP
Font data for the small (6x4) font.
.PP
Referenced by g15r_renderCharacterSmall().
.SS "unsigned char \fBfontdata_7x5\fP[]"
.PP
Font data for the medium (7x5) font.
.PP
Referenced by g15r_renderCharacterMedium().
.SS "unsigned char \fBfontdata_8x8\fP[]"
.PP
Font data for the large (8x8) font.
.PP
Referenced by g15r_renderCharacterLarge().
.SH "Author"
.PP
Anthony J. Mirabella <mirabeaj@gmail.com>
.PP
Generated automatically by Doxygen for libg15render from the source code.
+133
View File
@@ -0,0 +1,133 @@
#ifndef LIBG15RENDER_H_
#define LIBG15RENDER_H_
#ifdef __cplusplus
extern "C"
{
#endif
#include <string.h>
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#ifdef TTF_SUPPORT
#include <ft2build.h>
#include FT_FREETYPE_H
#include FT_BITMAP_H
#endif
#define BYTE_SIZE 8
#define G15_BUFFER_LEN 1048
#define G15_LCD_OFFSET 32
#define G15_LCD_HEIGHT 43
#define G15_LCD_WIDTH 160
#define G15_COLOR_WHITE 0
#define G15_COLOR_BLACK 1
#define G15_TEXT_SMALL 0
#define G15_TEXT_MED 1
#define G15_TEXT_LARGE 2
#define G15_PIXEL_NOFILL 0
#define G15_PIXEL_FILL 1
#define G15_MAX_FACE 5
/** \brief This structure holds the data need to render objects to the LCD screen.*/
typedef struct g15canvas
{
/** g15canvas::buffer[] is a buffer holding the pixel data to be sent to the LCD.*/
unsigned char buffer[G15_BUFFER_LEN];
/** g15canvas::mode_xor determines whether xor processing is used in g15r_setPixel.*/
int mode_xor;
/** g15canvas::mode_cache can be used to determine whether caching should be used in an application.*/
int mode_cache;
/** g15canvas::mode_reverse determines whether color values passed to g15r_setPixel are reversed.*/
int mode_reverse;
#ifdef TTF_SUPPORT
FT_Library ftLib;
FT_Face ttf_face[G15_MAX_FACE][sizeof (FT_Face)];
int ttf_fontsize[G15_MAX_FACE];
#endif
} g15canvas;
/** \brief Fills an area bounded by (x1, y1) and (x2, y2)*/
void g15r_pixelReverseFill (g15canvas * canvas, int x1, int y1, int x2,
int y2, int fill, int color);
/** \brief Overlays a bitmap of size width x height starting at (x1, y1)*/
void g15r_pixelOverlay (g15canvas * canvas, int x1, int y1, int width,
int height, short colormap[]);
/** \brief Draws a line from (px1, py1) to (px2, py2)*/
void g15r_drawLine (g15canvas * canvas, int px1, int py1, int px2, int py2,
const int color);
/** \brief Draws a box bounded by (x1, y1) and (x2, y2)*/
void g15r_pixelBox (g15canvas * canvas, int x1, int y1, int x2, int y2,
int color, int thick, int fill);
/** \brief Draws a circle centered at (x, y) with a radius of r*/
void g15r_drawCircle (g15canvas * canvas, int x, int y, int r, int fill,
int color);
/** \brief Draws a box with rounded corners bounded by (x1, y1) and (x2, y2)*/
void g15r_drawRoundBox (g15canvas * canvas, int x1, int y1, int x2, int y2,
int fill, int color);
/** \brief Draws a completion bar*/
void g15r_drawBar (g15canvas * canvas, int x1, int y1, int x2, int y2,
int color, int num, int max, int type);
/** \brief Draw a splash screen from 160x43 wbmp file*/
int g15r_loadWbmpSplash(g15canvas *canvas, char *filename);
/** \brief Draw an icon to the screen from a wbmp buffer*/
void g15r_drawIcon(g15canvas *canvas, char *buf, int my_x, int my_y, int width, int height);
/** \brief Draw a sprite to the screen from a wbmp buffer*/
void g15r_drawSprite(g15canvas *canvas, char *buf, int my_x, int my_y, int width, int height, int start_x, int start_y, int total_width);
/** \brief Load a wbmp file into a buffer*/
char *g15r_loadWbmpToBuf(char *filename, int *img_width, int *img_height);
/** \brief Draw a large number*/
void g15r_drawBigNum (g15canvas * canvas, unsigned int x1, unsigned int y1, unsigned int x2, unsigned int y2, int color, int num);
/** \brief Gets the value of the pixel at (x, y)*/
int g15r_getPixel (g15canvas * canvas, unsigned int x, unsigned int y);
/** \brief Sets the value of the pixel at (x, y)*/
void g15r_setPixel (g15canvas * canvas, unsigned int x, unsigned int y,
int val);
/** \brief Fills the screen with pixels of color*/
void g15r_clearScreen (g15canvas * canvas, int color);
/** \brief Clears the canvas and resets the mode switches*/
void g15r_initCanvas (g15canvas * canvas);
/** \brief Font data for the large (8x8) font*/
extern unsigned char fontdata_8x8[];
/** \brief Font data for the medium (7x5) font*/
extern unsigned char fontdata_7x5[];
/** \brief Font data for the small (6x4) font*/
extern unsigned char fontdata_6x4[];
/** \brief Renders a character in the large font at (x, y)*/
void g15r_renderCharacterLarge (g15canvas * canvas, int x, int y,
unsigned char character, unsigned int sx,
unsigned int sy);
/** \brief Renders a character in the meduim font at (x, y)*/
void g15r_renderCharacterMedium (g15canvas * canvas, int x, int y,
unsigned char character, unsigned int sx,
unsigned int sy);
/** \brief Renders a character in the small font at (x, y)*/
void g15r_renderCharacterSmall (g15canvas * canvas, int x, int y,
unsigned char character, unsigned int sx,
unsigned int sy);
/** \brief Renders a string with font size in row*/
void g15r_renderString (g15canvas * canvas, unsigned char stringOut[],
int row, int size, unsigned int sx,
unsigned int sy);
#ifdef TTF_SUPPORT
/** \brief Loads a font through the FreeType2 library*/
void g15r_ttfLoad (g15canvas * canvas, char *fontname, int fontsize,
int face_num);
/** \brief Prints a string in a given font*/
void g15r_ttfPrint (g15canvas * canvas, int x, int y, int fontsize,
int face_num, int color, int center,
char *print_string);
#endif
#ifdef __cplusplus
}
#endif
#endif /*LIBG15RENDER_H_ */
+610
View File
@@ -0,0 +1,610 @@
/*
This file is part of g15tools.
g15tools 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.
g15tools 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 g15lcd; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <fcntl.h>
#include "libg15render.h"
void
swap (int *x, int *y)
{
int tmp;
tmp = *x;
*x = *y;
*y = tmp;
}
/**
* The area with an upper left corner at (x1, y1) and lower right corner at (x2, y2) will be
* filled with color if fill>0 or the current contents of the area will be reversed if fill==0.
*
* \param canvas A pointer to a g15canvas struct in which the buffer to be operated on is found.
* \param x1 Defines leftmost bound of area to be filled.
* \param y1 Defines uppermost bound of area to be filled.
* \param x2 Defines rightmost bound of area to be filled.
* \param y2 Defines bottommost bound of area to be filled.
* \param fill Area will be filled with color if fill != 0, else contents of area will have color values reversed.
* \param color If fill != 0, then area will be filled if color == 1 and emptied if color == 0.
*/
void
g15r_pixelReverseFill (g15canvas * canvas, int x1, int y1, int x2, int y2,
int fill, int color)
{
int x = 0;
int y = 0;
for (x = x1; x <= x2; ++x)
{
for (y = y1; y <= y2; ++y)
{
if (!fill)
color = !g15r_getPixel (canvas, x, y);
g15r_setPixel (canvas, x, y, color);
}
}
}
/**
* A 1-bit bitmap defined in colormap[] is drawn to the canvas with an upper left corner at (x1, y1)
* and a lower right corner at (x1+width, y1+height).
*
* \param canvas A pointer to a g15canvas struct in which the buffer to be operated on is found.
* \param x1 Defines the leftmost bound of the area to be drawn.
* \param y1 Defines the uppermost bound of the area to be drawn.
* \param width Defines the width of the bitmap to be drawn.
* \param height Defines the height of the bitmap to be drawn.
* \param colormap An array containing width*height entries of value 0 for pixel off or != 0 for pixel on.
*/
void
g15r_pixelOverlay (g15canvas * canvas, int x1, int y1, int width, int height,
short colormap[])
{
int i = 0;
for (i = 0; i < (width * height); ++i)
{
int color = (colormap[i] ? G15_COLOR_BLACK : G15_COLOR_WHITE);
int x = x1 + i % width;
int y = y1 + i / width;
g15r_setPixel (canvas, x, y, color);
}
}
/**
* A line of color is drawn from (px1, py1) to (px2, py2).
*
* \param canvas A pointer to a g15canvas struct in which the buffer to be operated on is found.
* \param px1 X component of point 1.
* \param py1 Y component of point 1.
* \param px2 X component of point 2.
* \param py2 Y component of point 2.
* \param color Line will be drawn this color.
*/
void
g15r_drawLine (g15canvas * canvas, int px1, int py1, int px2, int py2,
const int color)
{
/*
* Bresenham's Line Algorithm
* http://en.wikipedia.org/wiki/Bresenham's_algorithm
*/
int steep = 0;
if (abs (py2 - py1) > abs (px2 - px1))
steep = 1;
if (steep)
{
swap (&px1, &py1);
swap (&px2, &py2);
}
if (px1 > px2)
{
swap (&px1, &px2);
swap (&py1, &py2);
}
int dx = px2 - px1;
int dy = abs (py2 - py1);
int error = 0;
int y = py1;
int ystep = (py1 < py2) ? 1 : -1;
int x = 0;
for (x = px1; x <= px2; ++x)
{
if (steep)
g15r_setPixel (canvas, y, x, color);
else
g15r_setPixel (canvas, x, y, color);
error += dy;
if (2 * error >= dx)
{
y += ystep;
error -= dx;
}
}
}
/**
* Draws a box around the area bounded by (x1, y1) and (x2, y2).
*
* The box will be filled if fill != 0 and the sides will be thick pixels wide.
*
* \param canvas A pointer to a g15canvas struct in which the buffer to be operated on is found.
* \param x1 Defines leftmost bound of the box.
* \param y1 Defines uppermost bound of the box.
* \param x2 Defines rightmost bound of the box.
* \param y2 Defines bottommost bound of the box.
* \param color Lines defining the box will be drawn this color.
* \param thick Lines defining the box will be this many pixels thick.
* \param fill The box will be filled with color if fill != 0.
*/
void
g15r_pixelBox (g15canvas * canvas, int x1, int y1, int x2, int y2, int color,
int thick, int fill)
{
int i = 0;
for (i = 0; i < thick; ++i)
{
g15r_drawLine (canvas, x1, y1, x2, y1, color); /* Top */
g15r_drawLine (canvas, x1, y1, x1, y2, color); /* Left */
g15r_drawLine (canvas, x2, y1, x2, y2, color); /* Right */
g15r_drawLine (canvas, x1, y2, x2, y2, color); /* Bottom */
x1++;
y1++;
x2--;
y2--;
}
int x = 0, y = 0;
if (fill)
{
for (x = x1; x <= x2; ++x)
for (y = y1; y <= y2; ++y)
g15r_setPixel (canvas, x, y, color);
}
}
/**
* Draws a circle centered at (x, y) with a radius of r.
*
* The circle will be filled if fill != 0.
*
* \param canvas A pointer to a g15canvas struct in which the buffer to be operated on is found.
* \param x Defines horizontal center of the circle.
* \param y Defines vertical center of circle.
* \param r Defines radius of circle.
* \param fill The circle will be filled with color if fill != 0.
* \param color Lines defining the circle will be drawn this color.
*/
void
g15r_drawCircle (g15canvas * canvas, int x, int y, int r, int fill, int color)
{
int xx, yy, dd;
xx = 0;
yy = r;
dd = 2 * (1 - r);
while (yy >= 0)
{
if (!fill)
{
g15r_setPixel (canvas, x + xx, y - yy, color);
g15r_setPixel (canvas, x + xx, y + yy, color);
g15r_setPixel (canvas, x - xx, y - yy, color);
g15r_setPixel (canvas, x - xx, y + yy, color);
}
else
{
g15r_drawLine (canvas, x - xx, y - yy, x + xx, y - yy, color);
g15r_drawLine (canvas, x - xx, y + yy, x + xx, y + yy, color);
}
if (dd + yy > 0)
{
yy--;
dd = dd - (2 * yy + 1);
}
if (xx > dd)
{
xx++;
dd = dd + (2 * xx + 1);
}
}
}
/**
* Draws a rounded box around the area bounded by (x1, y1) and (x2, y2).
*
* The box will be filled if fill != 0.
*
* \param canvas A pointer to a g15canvas struct in which the buffer to be operated on is found.
* \param x1 Defines leftmost bound of the box.
* \param y1 Defines uppermost bound of the box.
* \param x2 Defines rightmost bound of the box.
* \param y2 Defines bottommost bound of the box.
* \param fill The box will be filled with color if fill != 0.
* \param color Lines defining the box will be drawn this color.
*/
void
g15r_drawRoundBox (g15canvas * canvas, int x1, int y1, int x2, int y2,
int fill, int color)
{
int y, shave = 3;
if (shave > (x2 - x1) / 2)
shave = (x2 - x1) / 2;
if (shave > (y2 - y1) / 2)
shave = (y2 - y1) / 2;
if ((x1 != x2) && (y1 != y2))
{
if (fill)
{
g15r_drawLine (canvas, x1 + shave, y1, x2 - shave, y1, color);
for (y = y1 + 1; y < y1 + shave; y++)
g15r_drawLine (canvas, x1 + 1, y, x2 - 1, y, color);
for (y = y1 + shave; y <= y2 - shave; y++)
g15r_drawLine (canvas, x1, y, x2, y, color);
for (y = y2 - shave + 1; y < y2; y++)
g15r_drawLine (canvas, x1 + 1, y, x2 - 1, y, color);
g15r_drawLine (canvas, x1 + shave, y2, x2 - shave, y2, color);
if (shave == 4)
{
g15r_setPixel (canvas, x1 + 1, y1 + 1,
color ==
G15_COLOR_WHITE ? G15_COLOR_BLACK :
G15_COLOR_WHITE);
g15r_setPixel (canvas, x1 + 1, y2 - 1,
color ==
G15_COLOR_WHITE ? G15_COLOR_BLACK :
G15_COLOR_WHITE);
g15r_setPixel (canvas, x2 - 1, y1 + 1,
color ==
G15_COLOR_WHITE ? G15_COLOR_BLACK :
G15_COLOR_WHITE);
g15r_setPixel (canvas, x2 - 1, y2 - 1,
color ==
G15_COLOR_WHITE ? G15_COLOR_BLACK :
G15_COLOR_WHITE);
}
}
else
{
g15r_drawLine (canvas, x1 + shave, y1, x2 - shave, y1, color);
g15r_drawLine (canvas, x1, y1 + shave, x1, y2 - shave, color);
g15r_drawLine (canvas, x2, y1 + shave, x2, y2 - shave, color);
g15r_drawLine (canvas, x1 + shave, y2, x2 - shave, y2, color);
if (shave > 1)
{
g15r_drawLine (canvas, x1 + 1, y1 + 1, x1 + shave - 1, y1 + 1,
color);
g15r_drawLine (canvas, x2 - shave + 1, y1 + 1, x2 - 1, y1 + 1,
color);
g15r_drawLine (canvas, x1 + 1, y2 - 1, x1 + shave - 1, y2 - 1,
color);
g15r_drawLine (canvas, x2 - shave + 1, y2 - 1, x2 - 1, y2 - 1,
color);
g15r_drawLine (canvas, x1 + 1, y1 + 1, x1 + 1, y1 + shave - 1,
color);
g15r_drawLine (canvas, x1 + 1, y2 - 1, x1 + 1, y2 - shave + 1,
color);
g15r_drawLine (canvas, x2 - 1, y1 + 1, x2 - 1, y1 + shave - 1,
color);
g15r_drawLine (canvas, x2 - 1, y2 - 1, x2 - 1, y2 - shave + 1,
color);
}
}
}
}
/**
* Given a maximum value, and a value between 0 and that maximum value, calculate and draw a bar showing that percentage.
*
* \param canvas A pointer to a g15canvas struct in which the buffer to be operated on is found.
* \param x1 Defines leftmost bound of the bar.
* \param y1 Defines uppermost bound of the bar.
* \param x2 Defines rightmost bound of the bar.
* \param y2 Defines bottommost bound of the bar.
* \param color The bar will be drawn this color.
* \param num Number of units relative to max filled.
* \param max Number of units equal to 100% filled.
* \param type Type of bar. 1=solid bar, 2=solid bar with border, 3 = solid bar with I-frame.
*/
void
g15r_drawBar (g15canvas * canvas, int x1, int y1, int x2, int y2, int color,
int num, int max, int type)
{
float len, length;
int x;
if (max == 0)
return;
if (num > max)
num = max;
if (type == 2)
{
y1 += 2;
y2 -= 2;
x1 += 2;
x2 -= 2;
}
len = ((float) max / (float) num);
length = (x2 - x1) / len;
if (type == 1)
{
g15r_pixelBox (canvas, x1, y1 - type, x2, y2 + type, color ^ 1, 1, 1);
g15r_pixelBox (canvas, x1, y1 - type, x2, y2 + type, color, 1, 0);
}
else if (type == 2)
{
g15r_pixelBox (canvas, x1 - 2, y1 - type, x2 + 2, y2 + type, color ^ 1,
1, 1);
g15r_pixelBox (canvas, x1 - 2, y1 - type, x2 + 2, y2 + type, color, 1,
0);
}
else if (type == 3)
{
g15r_drawLine (canvas, x1, y1 - type, x1, y2 + type, color);
g15r_drawLine (canvas, x2, y1 - type, x2, y2 + type, color);
g15r_drawLine (canvas, x1, y1 + ((y2 - y1) / 2), x2,
y1 + ((y2 - y1) / 2), color);
}
g15r_pixelBox (canvas, x1, y1, (int) ceil (x1 + length), y2, color, 1, 1);
}
/**
* wbmp splash screen loader - assumes image is 160x43
*
* \param canvas A pointer to a g15canvas struct in which the buffer to be operated on is found.
* \param filename A string holding the path to the wbmp to be displayed.
*/
int
g15r_loadWbmpSplash(g15canvas *canvas, char *filename)
{
int width=0, height=0;
char *buf;
buf = g15r_loadWbmpToBuf(filename,
&width,
&height);
memcpy (canvas->buffer, buf, G15_BUFFER_LEN);
return 0;
}
/**
* Draw an icon to a canvas
*
* \param canvas A pointer to a g15canvas struct in which the buffer to be operated in is found.
* \param buf A pointer to the buffer holding the icon to be displayed.
* \param my_x Leftmost boundary of image.
* \param my_y Topmost boundary of image.
* \param width Width of the image in buf.
* \param height Height of the image in buf.
*/
void
g15r_drawIcon(g15canvas *canvas, char *buf, int my_x, int my_y, int width, int height)
{
int y,x,val;
unsigned int pixel_offset = 0;
unsigned int byte_offset, bit_offset;
for (y=0; y < height - 1; y++)
for (x=0; x < width - 1; x++)
{
pixel_offset = y * width + x;
byte_offset = pixel_offset / BYTE_SIZE;
bit_offset = 7 - (pixel_offset % BYTE_SIZE);
val = (buf[byte_offset] & (1 << bit_offset)) >> bit_offset;
g15r_setPixel (canvas, x + my_x, y + my_y, val);
}
}
/**
* Draw a sprite to a canvas
*
* \param canvas A pointer to a g15canvas struct in which the buffer to be operated in is found.
* \param buf A pointer to the buffer holding a set of sprites.
* \param my_x Leftmost boundary of image.
* \param my_y Topmost boundary of image.
* \param width Width of the sprite.
* \param height Height of the sprite.
* \param start_x X offset for reading sprite from buf.
* \param start_y Y offset for reading sprite from buf.
* \param total_width Width of the set of sprites held in buf.
*/
void
g15r_drawSprite(g15canvas *canvas, char *buf, int my_x, int my_y, int width, int height, int start_x, int start_y, int total_width)
{
int y,x,val;
unsigned int pixel_offset = 0;
unsigned int byte_offset, bit_offset;
for (y=0; y < height - 1; y++)
for (x=0; x < width - 1; x++)
{
pixel_offset = (y + start_y) * total_width + (x + start_x);
byte_offset = pixel_offset / BYTE_SIZE;
bit_offset = 7 - (pixel_offset % BYTE_SIZE);
val = (buf[byte_offset] & (1 << bit_offset)) >> bit_offset;
g15r_setPixel (canvas, x + my_x, y + my_y, val);
}
}
/**
* basic wbmp loader - loads a wbmp image into a buffer.
*
* \param filename A string holding the path to the wbmp to be loaded.
* \param img_width A pointer to an int that will hold the image width on return.
* \param img_height A pointer to an int that will hold the image height on return.
*/
char *
g15r_loadWbmpToBuf(char *filename, int *img_width, int *img_height)
{
int wbmp_fd;
int retval;
int x,y,val;
char *buf;
unsigned int buflen,header=4;
unsigned char headerbytes[5];
unsigned int pixel_offset = 0;
unsigned int byte_offset, bit_offset;
wbmp_fd=open(filename,O_RDONLY);
if(!wbmp_fd){
return NULL;
}
retval=read(wbmp_fd,headerbytes,5);
if(retval){
if (headerbytes[2] & 1) {
*img_width = ((unsigned char)headerbytes[2] ^ 1) | (unsigned char)headerbytes[3];
*img_height = headerbytes[4];
header = 5;
} else {
*img_width = headerbytes[2];
*img_height = headerbytes[3];
}
int byte_width = *img_width / 8;
if (*img_width %8)
byte_width++;
buflen = byte_width * (*img_height);
buf = (char *)malloc (buflen);
if (buf == NULL)
return NULL;
if (header == 4)
buf[0]=headerbytes[4];
retval=read(wbmp_fd,buf+(5-header),buflen);
close(wbmp_fd);
}
/* now invert the image */
for (y = 0; y < *img_height; y++)
for (x = 0; x < *img_width; x++)
{
pixel_offset = y * (*img_width) + x;
byte_offset = pixel_offset / BYTE_SIZE;
bit_offset = 7 - (pixel_offset % BYTE_SIZE);
val = (buf[byte_offset] & (1 << bit_offset)) >> bit_offset;
if (!val)
buf[byte_offset] = buf[byte_offset] | 1 << bit_offset;
else
buf[byte_offset] = buf[byte_offset] & ~(1 << bit_offset);
}
return buf;
}
/**
* Draw a large number to a canvas
*
* \param canvas A pointer to a g15canvas struct in which the buffer to be operated on is found.
* \param x1 Defines leftmost bound of the number.
* \param y1 Defines uppermost bound of the number.
* \param x2 Defines rightmost bound of the number.
* \param y2 Defines bottommost bound of the number.
* \param num The number to be drawn.
*/
void
g15r_drawBigNum (g15canvas * canvas, unsigned int x1, unsigned int y1, unsigned int x2, unsigned int y2, int color, int num)
{
x1 += 2;
x2 -= 2;
switch(num){
case 0:
g15r_pixelBox (canvas, x1, y1, x2, y2 , color, 1, 1);
g15r_pixelBox (canvas, x1 +5, y1 +5, x2 -5, y2 - 6, 1 - color, 1, 1);
break;
case 1:
g15r_pixelBox (canvas, x2-5, y1, x2, y2 , color, 1, 1);
g15r_pixelBox (canvas, x1, y1, x2 -5, y2, 1 - color, 1, 1);
break;
case 2:
g15r_pixelBox (canvas, x1, y1, x2, y2 , color, 1, 1);
g15r_pixelBox (canvas, x1, y1+5, x2 -5, y1+((y2/2)-3), 1 - color, 1, 1);
g15r_pixelBox (canvas, x1+5, y1+((y2/2)+3), x2 , y2-6, 1 - color, 1, 1);
break;
case 3:
g15r_pixelBox (canvas, x1, y1, x2, y2 , color, 1, 1);
g15r_pixelBox (canvas, x1, y1+5, x2 -5, y1+((y2/2)-3), 1 - color, 1, 1);
g15r_pixelBox (canvas, x1, y1+((y2/2)+3), x2-5 , y2-6, 1 - color, 1, 1);
break;
case 4:
g15r_pixelBox (canvas, x1, y1, x2, y2 , color, 1, 1);
g15r_pixelBox (canvas, x1, y1+((y2/2)+3), x2 -5, y2, 1 - color, 1, 1);
g15r_pixelBox (canvas, x1+5, y1, x2-5 , y1+((y2/2)-3), 1 - color, 1, 1);
break;
case 5:
g15r_pixelBox (canvas, x1, y1, x2, y2 , color, 1, 1);
g15r_pixelBox (canvas, x1+5, y1+5, x2 , y1+((y2/2)-3), 1 - color, 1, 1);
g15r_pixelBox (canvas, x1, y1+((y2/2)+3), x2-5 , y2-6, 1 - color, 1, 1);
break;
case 6:
g15r_pixelBox (canvas, x1, y1, x2, y2 , color, 1, 1);
g15r_pixelBox (canvas, x1+5, y1+5, x2 , y1+((y2/2)-3), 1 - color, 1, 1);
g15r_pixelBox (canvas, x1+5, y1+((y2/2)+3), x2-5 , y2-6, 1 - color, 1, 1);
break;
case 7:
g15r_pixelBox (canvas, x1, y1, x2, y2 , color, 1, 1);
g15r_pixelBox (canvas, x1, y1+5, x2 -5, y2, 1 - color, 1, 1);
break;
case 8:
g15r_pixelBox (canvas, x1, y1, x2, y2 , color, 1, 1);
g15r_pixelBox (canvas, x1+5, y1+5, x2-5 , y1+((y2/2)-3), 1 - color, 1, 1);
g15r_pixelBox (canvas, x1+5, y1+((y2/2)+3), x2-5 , y2-6, 1 - color, 1, 1);
break;
case 9:
g15r_pixelBox (canvas, x1, y1, x2, y2 , color, 1, 1);
g15r_pixelBox (canvas, x1+5, y1+5, x2-5 , y1+((y2/2)-3), 1 - color, 1, 1);
g15r_pixelBox (canvas, x1, y1+((y2/2)+3), x2-5 , y2, 1 - color, 1, 1);
break;
case 10:
g15r_pixelBox (canvas, x2-5, y1+5, x2, y1+10 , color, 1, 1);
g15r_pixelBox (canvas, x2-5, y2-10, x2, y2-5 , color, 1, 1);
break;
case 11:
g15r_pixelBox (canvas, x1, y1+((y2/2)-2), x2, y1+((y2/2)+2), color, 1, 1);
break;
case 12:
g15r_pixelBox (canvas, x2-5, y2-5, x2, y2 , color, 1, 1);
break;
}
}
+101
View File
@@ -0,0 +1,101 @@
/*
This file is part of g15tools.
g15tools 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.
g15tools 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 g15lcd; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "libg15render.h"
/**
* Retrieves the value of the pixel at (x, y)
*
* \param canvas A pointer to a g15canvas struct in which the buffer to be operated on is found.
* \param x X offset for pixel to be retrieved.
* \param y Y offset for pixel to be retrieved.
*/
int
g15r_getPixel (g15canvas * canvas, unsigned int x, unsigned int y)
{
if (x >= G15_LCD_WIDTH || y >= G15_LCD_HEIGHT)
return 0;
unsigned int pixel_offset = y * G15_LCD_WIDTH + x;
unsigned int byte_offset = pixel_offset / BYTE_SIZE;
unsigned int bit_offset = 7 - (pixel_offset % BYTE_SIZE);
return (canvas->buffer[byte_offset] & (1 << bit_offset)) >> bit_offset;
}
/**
* Sets the value of the pixel at (x, y)
*
* \param canvas A pointer to a g15canvas struct in which the buffer to be operated on is found.
* \param x X offset for pixel to be set.
* \param y Y offset for pixel to be set.
* \param val Value to which pixel should be set.
*/
void
g15r_setPixel (g15canvas * canvas, unsigned int x, unsigned int y, int val)
{
if (x >= G15_LCD_WIDTH || y >= G15_LCD_HEIGHT)
return;
unsigned int pixel_offset = y * G15_LCD_WIDTH + x;
unsigned int byte_offset = pixel_offset / BYTE_SIZE;
unsigned int bit_offset = 7 - (pixel_offset % BYTE_SIZE);
if (canvas->mode_xor)
val ^= g15r_getPixel (canvas, x, y);
if (canvas->mode_reverse)
val = !val;
if (val)
canvas->buffer[byte_offset] =
canvas->buffer[byte_offset] | 1 << bit_offset;
else
canvas->buffer[byte_offset] =
canvas->buffer[byte_offset] & ~(1 << bit_offset);
}
/**
* Clears the screen and fills it with pixels of color
*
* \param canvas A pointer to a g15canvas struct in which the buffer to be operated on is found.
* \param color Screen will be filled with this color.
*/
void
g15r_clearScreen (g15canvas * canvas, int color)
{
memset (canvas->buffer, (color ? 0xFF : 0), G15_BUFFER_LEN);
}
/**
* Clears the screen and resets the mode values for a canvas
*
* \param canvas A pointer to a g15canvas struct
*/
void
g15r_initCanvas (g15canvas * canvas)
{
memset (canvas->buffer, 0, G15_BUFFER_LEN);
canvas->mode_cache = 0;
canvas->mode_reverse = 0;
canvas->mode_xor = 0;
#ifdef TTF_SUPPORT
if (FT_Init_FreeType (&canvas->ftLib))
printf ("Freetype couldnt initialise\n");
#endif
}
+310
View File
@@ -0,0 +1,310 @@
/*
This file is part of g15tools.
g15tools 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.
g15tools 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 g15lcd; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "libg15render.h"
void
g15r_renderCharacterLarge (g15canvas * canvas, int col, int row,
unsigned char character, unsigned int sx,
unsigned int sy)
{
int helper = character * 8; /* for our font which is 8x8 */
int top_left_pixel_x = sx + col * (8); /* 1 pixel spacing */
int top_left_pixel_y = sy + row * (8); /* once again 1 pixel spacing */
int x, y;
for (y = 0; y < 8; ++y)
{
for (x = 0; x < 8; ++x)
{
char font_entry = fontdata_8x8[helper + y];
if (font_entry & 1 << (7 - x))
g15r_setPixel (canvas, top_left_pixel_x + x, top_left_pixel_y + y,
G15_COLOR_BLACK);
else
g15r_setPixel (canvas, top_left_pixel_x + x, top_left_pixel_y + y,
G15_COLOR_WHITE);
}
}
}
void
g15r_renderCharacterMedium (g15canvas * canvas, int col, int row,
unsigned char character, unsigned int sx,
unsigned int sy)
{
int helper = character * 7 * 5; /* for our font which is 6x4 */
int top_left_pixel_x = sx + col * (5); /* 1 pixel spacing */
int top_left_pixel_y = sy + row * (7); /* once again 1 pixel spacing */
int x, y;
for (y = 0; y < 7; ++y)
{
for (x = 0; x < 5; ++x)
{
char font_entry = fontdata_7x5[helper + y * 5 + x];
if (font_entry)
g15r_setPixel (canvas, top_left_pixel_x + x, top_left_pixel_y + y,
G15_COLOR_BLACK);
else
g15r_setPixel (canvas, top_left_pixel_x + x, top_left_pixel_y + y,
G15_COLOR_WHITE);
}
}
}
void
g15r_renderCharacterSmall (g15canvas * canvas, int col, int row,
unsigned char character, unsigned int sx,
unsigned int sy)
{
int helper = character * 6 * 4; /* for our font which is 6x4 */
int top_left_pixel_x = sx + col * (4); /* 1 pixel spacing */
int top_left_pixel_y = sy + row * (6); /* once again 1 pixel spacing */
int x, y;
for (y = 0; y < 6; ++y)
{
for (x = 0; x < 4; ++x)
{
char font_entry = fontdata_6x4[helper + y * 4 + x];
if (font_entry)
g15r_setPixel (canvas, top_left_pixel_x + x, top_left_pixel_y + y,
G15_COLOR_BLACK);
else
g15r_setPixel (canvas, top_left_pixel_x + x, top_left_pixel_y + y,
G15_COLOR_WHITE);
}
}
}
void
g15r_renderString (g15canvas * canvas, unsigned char stringOut[], int row,
int size, unsigned int sx, unsigned int sy)
{
int i = 0;
for (i; stringOut[i] != NULL; ++i)
{
switch (size)
{
case G15_TEXT_SMALL:
{
g15r_renderCharacterSmall (canvas, i, row, stringOut[i], sx, sy);
break;
}
case G15_TEXT_MED:
{
g15r_renderCharacterMedium (canvas, i, row, stringOut[i], sx, sy);
break;
}
case G15_TEXT_LARGE:
{
g15r_renderCharacterLarge (canvas, i, row, stringOut[i], sx, sy);
break;
}
default:
break;
}
}
}
#ifdef TTF_SUPPORT
/**
* Load a font for use with FreeType2 font support
*
* \param canvas A pointer to a g15canvas struct in which the buffer to be operated on is found.
* \param fontname Absolute pathname to font file to be loaded.
* \param fontsize Size in points for font to be loaded.
* \param face_num Slot into which font face will be loaded.
*/
void
g15r_ttfLoad (g15canvas * canvas, char *fontname, int fontsize, int face_num)
{
int errcode = 0;
if (face_num < 0)
face_num = 0;
if (face_num > G15_MAX_FACE)
face_num = G15_MAX_FACE;
if (canvas->ttf_fontsize[face_num])
FT_Done_Face (canvas->ttf_face[face_num][0]); /* destroy the last face */
if (!canvas->ttf_fontsize[face_num] && !fontsize)
canvas->ttf_fontsize[face_num] = 10;
else
canvas->ttf_fontsize[face_num] = fontsize;
errcode =
FT_New_Face (canvas->ftLib, fontname, 0, &canvas->ttf_face[face_num][0]);
if (errcode)
{
canvas->ttf_fontsize[face_num] = 0;
}
else
{
if (canvas->ttf_fontsize[face_num]
&& FT_IS_SCALABLE (canvas->ttf_face[face_num][0]))
errcode =
FT_Set_Char_Size (canvas->ttf_face[face_num][0], 0,
canvas->ttf_fontsize[face_num] * 64, 90, 0);
}
}
int
calc_ttf_true_ypos (FT_Face face, int y, int ttf_fontsize)
{
if (!FT_IS_SCALABLE (face))
ttf_fontsize = face->available_sizes->height;
y += ttf_fontsize * .75;
return y;
}
int
calc_ttf_totalstringwidth (FT_Face face, char *str)
{
FT_GlyphSlot slot = face->glyph;
FT_UInt glyph_index;
int i, errcode;
unsigned int len = strlen (str);
int width = 0;
for (i = 0; i < len; i++)
{
glyph_index = FT_Get_Char_Index (face, str[i]);
errcode = FT_Load_Glyph (face, glyph_index, 0);
width += slot->advance.x >> 6;
}
return width;
}
int
calc_ttf_centering (FT_Face face, char *str)
{
int leftpos;
leftpos = 80 - (calc_ttf_totalstringwidth (face, str) / 2);
if (leftpos < 1)
leftpos = 1;
return leftpos;
}
int
calc_ttf_right_justify (FT_Face face, char *str)
{
int leftpos;
leftpos = 160 - calc_ttf_totalstringwidth (face, str);
if (leftpos < 1)
leftpos = 1;
return leftpos;
}
void
draw_ttf_char (g15canvas * canvas, FT_Bitmap charbitmap,
unsigned char character, int x, int y, int color)
{
FT_Int char_x, char_y, p, q;
FT_Int x_max = x + charbitmap.width;
FT_Int y_max = y + charbitmap.rows;
static FT_Bitmap tmpbuffer;
/* convert to 8bit format.. */
FT_Bitmap_Convert (canvas->ftLib, &charbitmap, &tmpbuffer, 1);
for (char_y = y, q = 0; char_y < y_max; char_y++, q++)
for (char_x = x, p = 0; char_x < x_max; char_x++, p++)
if (tmpbuffer.buffer[q * tmpbuffer.width + p])
g15r_setPixel (canvas, char_x, char_y, color);
}
void
draw_ttf_str (g15canvas * canvas, char *str, int x, int y, int color,
FT_Face face)
{
FT_GlyphSlot slot = face->glyph;
int i, errcode;
unsigned int len = strlen (str);
for (i = 0; i < len; i++)
{
errcode =
FT_Load_Char (face, str[i],
FT_LOAD_RENDER | FT_LOAD_MONOCHROME |
FT_LOAD_TARGET_MONO);
draw_ttf_char (canvas, slot->bitmap, str[i], x + slot->bitmap_left,
y - slot->bitmap_top, color);
x += slot->advance.x >> 6;
}
}
/**
* Render a string with a FreeType2 font
*
* \param canvas A pointer to a g15canvas struct in which the buffer to be operated on is found.
* \param x initial x position for string.
* \param y initial y position for string.
* \param fontsize Size of string in points.
* \param face_num Font to be used is loaded in this slot.
* \param color Text will be drawn this color.
* \param center Text will be centered if center == 1 and right justified if center == 2.
* \param print_string Pointer to the string to be printed.
*/
void
g15r_ttfPrint (g15canvas * canvas, int x, int y, int fontsize, int face_num,
int color, int center, char *print_string)
{
int errcode = 0;
if (canvas->ttf_fontsize[face_num])
{
if (fontsize > 0 && FT_IS_SCALABLE (canvas->ttf_face[face_num][0]))
{
canvas->ttf_fontsize[face_num] = fontsize;
int errcode =
FT_Set_Pixel_Sizes (canvas->ttf_face[face_num][0], 0,
canvas->ttf_fontsize[face_num]);
if (errcode)
printf ("Trouble setting the Glyph size!\n");
}
y =
calc_ttf_true_ypos (canvas->ttf_face[face_num][0], y,
canvas->ttf_fontsize[face_num]);
if (center == 1)
x = calc_ttf_centering (canvas->ttf_face[face_num][0], print_string);
else if (center == 2)
x = calc_ttf_right_justify (canvas->ttf_face[face_num][0], print_string);
draw_ttf_str (canvas, print_string, x, y, color,
canvas->ttf_face[face_num][0]);
}
}
#endif /* TTF_SUPPORT */