logstalgia-1.0.3/ 0000755 0002031 0002031 00000000000 11526610646 013462 5 ustar andrewc andrewc logstalgia-1.0.3/ChangeLog 0000644 0002031 0002031 00000004500 11526610646 015233 0 ustar andrewc andrewc 1.0.3:
* Added automatic skipping of empty periods (--disable-auto-skip to turn off).
* Updated docs to reflect support for NCSA log formats, not just 'Apache'.
* Support log entry dates with a valid numeric month in place of MMM.
1.0.2:
* Performance improvements.
* Stopped frame-rate being a bottle neck for the number of requests shown.
* Improved STDIN input reliability on windows.
* Handle log entry timezone offsets.
* Added --paddle-position option (to allow more space for URLs).
* Added --font-size option.
1.0.1:
* Made STDIN non-blocking on Windows using PeekNamedPipe (thanks Rui Lopes).
* Added --hide-url-prefix option to remove protocol and hostname from requests.
* Removed arbitrary 1024 maximum length limit for log entries.
* Fixed custom log format not working when optional fields are omitted.
1.0.0:
* Every 60 minutes fade static text out and back in over a period of a minute.
0.9.9:
* Support for more common Apache access log formats.
* Added --paddle-mode (vhost,pid,single) which spawns separate paddles.
* Fixed PPM exporter producing blank images on some video cards.
0.9.8:
* Added --background option to control the background colour.
* Filter hostnames from URLs before displaying them.
* Fixed command line option documentation.
0.9.7:
* Added --sync option (start from the next entry received on STDIN).
0.9.6:
* Defer to homepage for video recording instructions.
0.9.5:
* Adjust time scale with <> keys.
0.9.4:
* Fixed STDIN stopping working after the first lot of records.
0.9.3:
* Added seekbar for log files (not available from STDIN).
* Added glow on impact with paddle (turn off using --disable-glow).
* PPM output for videos using --output-ppm-stream option.
* Custom log file format support.
* Changed font library to FTGL.
* --stop-position and --start-position options.
* Open a file selector if no log file supplied (on Windows).
0.9.2:
* Fixed issue with resource.h.
* Makefile patch for OPTFLAGS from terjeros.
* Fixed apache.log hostname parsing issue.
0.9.1:
* Added example.log.
0.9.0c:
* Changed Makefile to use configure libs.
0.9.0b:
* Incorporated manual page fixes from Francois Marier.
* Fixed bug in URL summarizer that caused it to leave out some URLs
when pressed for space.
0.9.0a:
* Fixed manual description of -x flag.
0.9.0:
* First release.
logstalgia-1.0.3/depcomp 0000755 0002031 0002031 00000044267 11526610646 015054 0 ustar andrewc andrewc #! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
scriptversion=2009-04-28.21; # UTC
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 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, see .
# 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 .
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 .
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
cygpath_u="cygpath -u -f -"
if test "$depmode" = msvcmsys; then
# This is just like msvisualcpp but w/o cygpath translation.
# Just convert the backslash-escaped backslashes to single forward
# slashes to satisfy depend.m4
cygpath_u="sed s,\\\\\\\\,/,g"
depmode=msvisualcpp
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.
## Unfortunately, FreeBSD c89 acceptance of flags depends upon
## the command line argument order; so add the flags where they
## appear in depend2.am. Note that the slowdown incurred here
## affects only configure: in makefiles, %FASTDEP% shortcuts this.
for arg
do
case $arg in
-c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
*) set fnord "$@" "$arg" ;;
esac
shift # fnord
shift # $arg
done
"$@"
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.
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
tmpdepfile1=$dir$base.u
tmpdepfile2=$base.u
tmpdepfile3=$dir.libs/$base.u
"$@" -Wc,-M
else
tmpdepfile1=$dir$base.u
tmpdepfile2=$dir$base.u
tmpdepfile3=$dir$base.u
"$@" -M
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
exit $stat
fi
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
do
test -f "$tmpdepfile" && break
done
if test -f "$tmpdepfile"; then
# 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,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
# That's a tab and a space in the [].
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$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"
;;
hp2)
# The "hp" stanza above does not work with aCC (C++) and HP's ia64
# compilers, which have integrated preprocessors. The correct option
# to use with these is +Maked; it writes dependencies to a file named
# 'foo.d', which lands next to the object file, wherever that
# happens to be.
# Much of this is similar to the tru64 case; see comments there.
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
tmpdepfile1=$dir$base.d
tmpdepfile2=$dir.libs/$base.d
"$@" -Wc,+Maked
else
tmpdepfile1=$dir$base.d
tmpdepfile2=$dir$base.d
"$@" +Maked
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile1" "$tmpdepfile2"
exit $stat
fi
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
do
test -f "$tmpdepfile" && break
done
if test -f "$tmpdepfile"; then
sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
# Add `dependent.h:' lines.
sed -ne '2,${
s/^ *//
s/ \\*$//
s/$/:/
p
}' "$tmpdepfile" >> "$depfile"
else
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile" "$tmpdepfile2"
;;
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 mechanism 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 $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 "X$1" != 'X--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 "X$1" != 'X--mode=compile'; do
shift
done
shift
fi
# X makedepend
shift
cleared=no eat=no
for arg
do
case $cleared in
no)
set ""; shift
cleared=yes ;;
esac
if test $eat = yes; then
eat=no
continue
fi
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.
-arch)
eat=yes ;;
-*|$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 "X$1" != 'X--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.
"$@" || exit $?
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test "X$1" != 'X--mode=compile'; do
shift
done
shift
fi
IFS=" "
for arg
do
case "$arg" in
-o)
shift
;;
$object)
shift
;;
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
set fnord "$@"
shift
shift
;;
*)
set fnord "$@" "$arg"
shift
shift
;;
esac
done
"$@" -E 2>/dev/null |
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
echo " " >> "$depfile"
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
rm -f "$tmpdepfile"
;;
msvcmsys)
# 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
;;
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-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End:
logstalgia-1.0.3/logstalgia.win32.cbp 0000644 0002031 0002031 00000005740 11526610646 017245 0 ustar andrewc andrewc
logstalgia-1.0.3/COPYING 0000644 0002031 0002031 00000104513 11526610646 014521 0 ustar andrewc andrewc GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc.
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. 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
them 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 prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. 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.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey 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;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If 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 convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU 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 that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
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.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
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.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
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
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
Copyright (C)
This 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 3 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, see .
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
Copyright (C)
This program 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, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
.
The GNU 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 Lesser General
Public License instead of this License. But first, please read
.
logstalgia-1.0.3/Makefile.in 0000644 0002031 0002031 00000075533 11526610646 015544 0 ustar andrewc andrewc # Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
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@
bin_PROGRAMS = logstalgia$(EXEEXT)
@FONTDIR_TRUE@am__append_1 = -DSDLAPP_FONT_DIR=\"$(sdlappfontdir)\"
subdir = .
DIST_COMMON = README $(am__configure_deps) $(am__dist_fonts_DATA_DIST) \
$(dist_pkgdata_DATA) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(top_srcdir)/configure COPYING \
ChangeLog INSTALL THANKS config.guess config.sub depcomp \
install-sh missing
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_gl.m4 \
$(top_srcdir)/m4/ax_check_glu.m4 \
$(top_srcdir)/m4/ax_lang_compiler_ms.m4 \
$(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/freetype2.m4 \
$(top_srcdir)/m4/pkg.m4 $(top_srcdir)/m4/sdl.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno config.status.lineno
mkinstalldirs = $(install_sh) -d
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(fontsdir)" \
"$(DESTDIR)$(pkgdatadir)"
PROGRAMS = $(bin_PROGRAMS)
am__dirstamp = $(am__leading_dot)dirstamp
am_logstalgia_OBJECTS = src/ncsa.$(OBJEXT) src/ball.$(OBJEXT) \
src/core/camera.$(OBJEXT) src/core/display.$(OBJEXT) \
src/core/extensions.$(OBJEXT) src/core/frustum.$(OBJEXT) \
src/core/fxfont.$(OBJEXT) src/core/logger.$(OBJEXT) \
src/core/plane.$(OBJEXT) src/core/quadtree.$(OBJEXT) \
src/core/regex.$(OBJEXT) src/core/resource.$(OBJEXT) \
src/core/sdlapp.$(OBJEXT) src/core/seeklog.$(OBJEXT) \
src/core/stringhash.$(OBJEXT) src/core/texture.$(OBJEXT) \
src/custom.$(OBJEXT) src/logentry.$(OBJEXT) \
src/logstalgia.$(OBJEXT) src/main.$(OBJEXT) \
src/paddle.$(OBJEXT) src/ppm.$(OBJEXT) \
src/requestball.$(OBJEXT) src/slider.$(OBJEXT) \
src/summarizer.$(OBJEXT) src/textarea.$(OBJEXT)
logstalgia_OBJECTS = $(am_logstalgia_OBJECTS)
logstalgia_LDADD = $(LDADD)
DEFAULT_INCLUDES = -I.@am__isrc@
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
CXXLD = $(CXX)
CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
-o $@
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
SOURCES = $(logstalgia_SOURCES)
DIST_SOURCES = $(logstalgia_SOURCES)
am__dist_fonts_DATA_DIST = data/fonts/README \
data/fonts/FreeMonoBold.ttf data/fonts/FreeSerif.ttf
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 = f=`echo $$p | sed -e 's|^.*/||'`;
am__install_max = 40
am__nobase_strip_setup = \
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
am__nobase_strip = \
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
am__nobase_list = $(am__nobase_strip_setup); \
for p in $$list; do echo "$$p $$p"; done | \
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
if (++n[$$2] == $(am__install_max)) \
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
END { for (dir in files) print dir, files[dir] }'
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
DATA = $(dist_fonts_DATA) $(dist_pkgdata_DATA)
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 $(distdir).tar.bz2
GZIP_ENV = --best
distuninstallcheck_listfiles = find . -type f -print
distcleancheck_listfiles = find . -type f -print
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = -DSDLAPP_RESOURCE_DIR=\"$(pkgdatadir)\" $(am__append_1)
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FT2_CFLAGS = @FT2_CFLAGS@
FT2_CONFIG = @FT2_CONFIG@
FT2_LIBS = @FT2_LIBS@
FTGL_CFLAGS = @FTGL_CFLAGS@
FTGL_LIBS = @FTGL_LIBS@
GLU_CFLAGS = @GLU_CFLAGS@
GLU_LIBS = @GLU_LIBS@
GL_CFLAGS = @GL_CFLAGS@
GL_LIBS = @GL_LIBS@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PTHREAD_CC = @PTHREAD_CC@
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
PTHREAD_LIBS = @PTHREAD_LIBS@
SDL_CFLAGS = @SDL_CFLAGS@
SDL_CONFIG = @SDL_CONFIG@
SDL_LIBS = @SDL_LIBS@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
XMKMF = @XMKMF@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
ax_pthread_config = @ax_pthread_config@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
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@
sdlappfontdir = @sdlappfontdir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
ACLOCAL_AMFLAGS = -I m4
logstalgia_SOURCES = \
src/ncsa.cpp src/ncsa.h \
src/ball.cpp src/ball.h \
src/core/bounds.h \
src/core/camera.cpp src/core/camera.h \
src/core/display.cpp src/core/display.h \
src/core/extensions.cpp src/core/extensions.h \
src/core/frustum.cpp src/core/frustum.h \
src/core/fxfont.cpp src/core/fxfont.h \
src/core/logger.cpp src/core/logger.h \
src/core/pi.h \
src/core/plane.cpp src/core/plane.h \
src/core/quadtree.cpp src/core/quadtree.h \
src/core/regex.cpp src/core/regex.h \
src/core/resource.cpp src/core/resource.h \
src/core/sdlapp.cpp src/core/sdlapp.h \
src/core/seeklog.cpp src/core/seeklog.h \
src/core/stringhash.cpp src/core/stringhash.h \
src/core/texture.cpp src/core/texture.h \
src/core/vectors.h \
src/custom.cpp src/custom.h \
src/logentry.cpp src/logentry.h \
src/logstalgia.cpp src/logstalgia.h \
src/main.cpp src/main.h \
src/paddle.cpp src/paddle.h \
src/ppm.cpp src/ppm.h \
src/requestball.cpp src/requestball.h \
src/slider.cpp src/slider.h \
src/summarizer.cpp src/summarizer.h \
src/textarea.cpp src/textarea.h
dist_pkgdata_DATA = data/ball.tga data/example.log data/glow.tga
@FONTDIR_FALSE@fontsdir = $(pkgdatadir)/fonts
@FONTDIR_FALSE@dist_fonts_DATA = data/fonts/README data/fonts/FreeMonoBold.ttf data/fonts/FreeSerif.ttf
all: all-am
.SUFFIXES:
.SUFFIXES: .cpp .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) --foreign'; \
$(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign 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)
$(am__cd) $(srcdir) && $(AUTOCONF)
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
$(am__aclocal_m4_deps):
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
for p in $$list; do echo "$$p $$p"; done | \
sed 's/$(EXEEXT)$$//' | \
while read p p1; do if test -f $$p; \
then echo "$$p"; echo "$$p"; else :; fi; \
done | \
sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
-e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
sed 'N;N;N;s,\n, ,g' | \
$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
{ d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
if ($$2 == $$4) files[d] = files[d] " " $$1; \
else { print "f", $$3 "/" $$4, $$1; } } \
END { for (d in files) print "f", d, files[d] }' | \
while read type dir files; do \
if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
test -z "$$files" || { \
echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
$(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
} \
; done
uninstall-binPROGRAMS:
@$(NORMAL_UNINSTALL)
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
files=`for p in $$list; do echo "$$p"; done | \
sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
-e 's/$$/$(EXEEXT)/' `; \
test -n "$$list" || exit 0; \
echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(bindir)" && rm -f $$files
clean-binPROGRAMS:
-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
src/$(am__dirstamp):
@$(MKDIR_P) src
@: > src/$(am__dirstamp)
src/$(DEPDIR)/$(am__dirstamp):
@$(MKDIR_P) src/$(DEPDIR)
@: > src/$(DEPDIR)/$(am__dirstamp)
src/ncsa.$(OBJEXT): src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp)
src/ball.$(OBJEXT): src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp)
src/core/$(am__dirstamp):
@$(MKDIR_P) src/core
@: > src/core/$(am__dirstamp)
src/core/$(DEPDIR)/$(am__dirstamp):
@$(MKDIR_P) src/core/$(DEPDIR)
@: > src/core/$(DEPDIR)/$(am__dirstamp)
src/core/camera.$(OBJEXT): src/core/$(am__dirstamp) \
src/core/$(DEPDIR)/$(am__dirstamp)
src/core/display.$(OBJEXT): src/core/$(am__dirstamp) \
src/core/$(DEPDIR)/$(am__dirstamp)
src/core/extensions.$(OBJEXT): src/core/$(am__dirstamp) \
src/core/$(DEPDIR)/$(am__dirstamp)
src/core/frustum.$(OBJEXT): src/core/$(am__dirstamp) \
src/core/$(DEPDIR)/$(am__dirstamp)
src/core/fxfont.$(OBJEXT): src/core/$(am__dirstamp) \
src/core/$(DEPDIR)/$(am__dirstamp)
src/core/logger.$(OBJEXT): src/core/$(am__dirstamp) \
src/core/$(DEPDIR)/$(am__dirstamp)
src/core/plane.$(OBJEXT): src/core/$(am__dirstamp) \
src/core/$(DEPDIR)/$(am__dirstamp)
src/core/quadtree.$(OBJEXT): src/core/$(am__dirstamp) \
src/core/$(DEPDIR)/$(am__dirstamp)
src/core/regex.$(OBJEXT): src/core/$(am__dirstamp) \
src/core/$(DEPDIR)/$(am__dirstamp)
src/core/resource.$(OBJEXT): src/core/$(am__dirstamp) \
src/core/$(DEPDIR)/$(am__dirstamp)
src/core/sdlapp.$(OBJEXT): src/core/$(am__dirstamp) \
src/core/$(DEPDIR)/$(am__dirstamp)
src/core/seeklog.$(OBJEXT): src/core/$(am__dirstamp) \
src/core/$(DEPDIR)/$(am__dirstamp)
src/core/stringhash.$(OBJEXT): src/core/$(am__dirstamp) \
src/core/$(DEPDIR)/$(am__dirstamp)
src/core/texture.$(OBJEXT): src/core/$(am__dirstamp) \
src/core/$(DEPDIR)/$(am__dirstamp)
src/custom.$(OBJEXT): src/$(am__dirstamp) \
src/$(DEPDIR)/$(am__dirstamp)
src/logentry.$(OBJEXT): src/$(am__dirstamp) \
src/$(DEPDIR)/$(am__dirstamp)
src/logstalgia.$(OBJEXT): src/$(am__dirstamp) \
src/$(DEPDIR)/$(am__dirstamp)
src/main.$(OBJEXT): src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp)
src/paddle.$(OBJEXT): src/$(am__dirstamp) \
src/$(DEPDIR)/$(am__dirstamp)
src/ppm.$(OBJEXT): src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp)
src/requestball.$(OBJEXT): src/$(am__dirstamp) \
src/$(DEPDIR)/$(am__dirstamp)
src/slider.$(OBJEXT): src/$(am__dirstamp) \
src/$(DEPDIR)/$(am__dirstamp)
src/summarizer.$(OBJEXT): src/$(am__dirstamp) \
src/$(DEPDIR)/$(am__dirstamp)
src/textarea.$(OBJEXT): src/$(am__dirstamp) \
src/$(DEPDIR)/$(am__dirstamp)
logstalgia$(EXEEXT): $(logstalgia_OBJECTS) $(logstalgia_DEPENDENCIES)
@rm -f logstalgia$(EXEEXT)
$(CXXLINK) $(logstalgia_OBJECTS) $(logstalgia_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
-rm -f src/ball.$(OBJEXT)
-rm -f src/core/camera.$(OBJEXT)
-rm -f src/core/display.$(OBJEXT)
-rm -f src/core/extensions.$(OBJEXT)
-rm -f src/core/frustum.$(OBJEXT)
-rm -f src/core/fxfont.$(OBJEXT)
-rm -f src/core/logger.$(OBJEXT)
-rm -f src/core/plane.$(OBJEXT)
-rm -f src/core/quadtree.$(OBJEXT)
-rm -f src/core/regex.$(OBJEXT)
-rm -f src/core/resource.$(OBJEXT)
-rm -f src/core/sdlapp.$(OBJEXT)
-rm -f src/core/seeklog.$(OBJEXT)
-rm -f src/core/stringhash.$(OBJEXT)
-rm -f src/core/texture.$(OBJEXT)
-rm -f src/custom.$(OBJEXT)
-rm -f src/logentry.$(OBJEXT)
-rm -f src/logstalgia.$(OBJEXT)
-rm -f src/main.$(OBJEXT)
-rm -f src/ncsa.$(OBJEXT)
-rm -f src/paddle.$(OBJEXT)
-rm -f src/ppm.$(OBJEXT)
-rm -f src/requestball.$(OBJEXT)
-rm -f src/slider.$(OBJEXT)
-rm -f src/summarizer.$(OBJEXT)
-rm -f src/textarea.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/ball.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/custom.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/logentry.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/logstalgia.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/main.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/ncsa.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/paddle.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/ppm.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/requestball.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/slider.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/summarizer.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/textarea.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/core/$(DEPDIR)/camera.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/core/$(DEPDIR)/display.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/core/$(DEPDIR)/extensions.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/core/$(DEPDIR)/frustum.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/core/$(DEPDIR)/fxfont.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/core/$(DEPDIR)/logger.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/core/$(DEPDIR)/plane.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/core/$(DEPDIR)/quadtree.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/core/$(DEPDIR)/regex.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/core/$(DEPDIR)/resource.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/core/$(DEPDIR)/sdlapp.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/core/$(DEPDIR)/seeklog.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/core/$(DEPDIR)/stringhash.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/core/$(DEPDIR)/texture.Po@am__quote@
.cpp.o:
@am__fastdepCXX_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
.cpp.obj:
@am__fastdepCXX_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
install-dist_fontsDATA: $(dist_fonts_DATA)
@$(NORMAL_INSTALL)
test -z "$(fontsdir)" || $(MKDIR_P) "$(DESTDIR)$(fontsdir)"
@list='$(dist_fonts_DATA)'; test -n "$(fontsdir)" || list=; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
done | $(am__base_list) | \
while read files; do \
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(fontsdir)'"; \
$(INSTALL_DATA) $$files "$(DESTDIR)$(fontsdir)" || exit $$?; \
done
uninstall-dist_fontsDATA:
@$(NORMAL_UNINSTALL)
@list='$(dist_fonts_DATA)'; test -n "$(fontsdir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
test -n "$$files" || exit 0; \
echo " ( cd '$(DESTDIR)$(fontsdir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(fontsdir)" && rm -f $$files
install-dist_pkgdataDATA: $(dist_pkgdata_DATA)
@$(NORMAL_INSTALL)
test -z "$(pkgdatadir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdatadir)"
@list='$(dist_pkgdata_DATA)'; test -n "$(pkgdatadir)" || list=; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
done | $(am__base_list) | \
while read files; do \
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgdatadir)'"; \
$(INSTALL_DATA) $$files "$(DESTDIR)$(pkgdatadir)" || exit $$?; \
done
uninstall-dist_pkgdataDATA:
@$(NORMAL_UNINSTALL)
@list='$(dist_pkgdata_DATA)'; test -n "$(pkgdatadir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
test -n "$$files" || exit 0; \
echo " ( cd '$(DESTDIR)$(pkgdatadir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(pkgdatadir)" && rm -f $$files
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; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
set x; \
here=`pwd`; \
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; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
if test $$# -gt 0; then \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
"$$@" $$unique; \
else \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$unique; \
fi; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
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; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
$(am__remove_distdir)
test -d "$(distdir)" || mkdir "$(distdir)"
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
-test -n "$(am__skip_mode_fix)" \
|| find "$(distdir)" -type d ! -perm -755 \
-exec chmod u+rwx,go+rx {} \; -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 $(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-lzma: distdir
tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
$(am__remove_distdir)
dist-xz: distdir
tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
$(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
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
$(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) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.lzma*) \
lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
*.tar.xz*) \
xz -dc $(distdir).tar.xz | $(am__untar) ;;\
*.tar.Z*) \
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \
GZIP=$(GZIP_ENV) gzip -dc $(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)
test -d $(distdir)/_build || exit 0; \
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
&& am__cwd=`pwd` \
&& $(am__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 \
&& cd "$$am__cwd" \
|| exit 1
$(am__remove_distdir)
@(echo "$(distdir) archives ready for distribution: "; \
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
distuninstallcheck:
@$(am__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 $(PROGRAMS) $(DATA)
installdirs:
for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(fontsdir)" "$(DESTDIR)$(pkgdatadir)"; 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)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-rm -f src/$(DEPDIR)/$(am__dirstamp)
-rm -f src/$(am__dirstamp)
-rm -f src/core/$(DEPDIR)/$(am__dirstamp)
-rm -f src/core/$(am__dirstamp)
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-binPROGRAMS clean-generic mostlyclean-am
distclean: distclean-am
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -rf src/$(DEPDIR) src/core/$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
dvi: dvi-am
dvi-am:
html: html-am
html-am:
info: info-am
info-am:
install-data-am: install-dist_fontsDATA install-dist_pkgdataDATA
@$(NORMAL_INSTALL)
$(MAKE) $(AM_MAKEFLAGS) install-data-hook
install-dvi: install-dvi-am
install-dvi-am:
install-exec-am: install-binPROGRAMS
install-html: install-html-am
install-html-am:
install-info: install-info-am
install-info-am:
install-man:
install-pdf: install-pdf-am
install-pdf-am:
install-ps: install-ps-am
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -rf $(top_srcdir)/autom4te.cache
-rm -rf src/$(DEPDIR) src/core/$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-binPROGRAMS uninstall-dist_fontsDATA \
uninstall-dist_pkgdataDATA
@$(NORMAL_INSTALL)
$(MAKE) $(AM_MAKEFLAGS) uninstall-hook
.MAKE: install-am install-data-am install-strip uninstall-am
.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
clean-binPROGRAMS clean-generic ctags dist dist-all dist-bzip2 \
dist-gzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \
distcheck distclean distclean-compile distclean-generic \
distclean-tags distcleancheck distdir distuninstallcheck dvi \
dvi-am html html-am info info-am install install-am \
install-binPROGRAMS install-data install-data-am \
install-data-hook install-dist_fontsDATA \
install-dist_pkgdataDATA install-dvi install-dvi-am \
install-exec install-exec-am install-html install-html-am \
install-info install-info-am install-man install-pdf \
install-pdf-am install-ps install-ps-am install-strip \
installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
uninstall-am uninstall-binPROGRAMS uninstall-dist_fontsDATA \
uninstall-dist_pkgdataDATA uninstall-hook
install-data-hook:
mkdir -p -m 755 ${DESTDIR}/$(mandir)/man1
$(SED) 's|SDLAPP_RESOURCE_DIR|$(pkgdatadir)|g' data/logstalgia.1 | gzip -f9 > $(DESTDIR)$(mandir)/man1/logstalgia.1.gz
uninstall-hook:
-rm -f $(DESTDIR)$(mandir)/man1/logstalgia.1.gz
# 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:
logstalgia-1.0.3/configure.ac 0000644 0002031 0002031 00000004572 11526610646 015760 0 ustar andrewc andrewc # -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.61)
AC_INIT(Logstalgia, 1.0.3, [acaudwell@gmail.com])
AC_CONFIG_SRCDIR([src/main.h])
AM_INIT_AUTOMAKE([dist-bzip2 foreign subdir-objects])
AC_CANONICAL_HOST
# Checks for programs.
AC_PROG_CXX
AC_LANG(C++)
#Disable X11 on Macs unless required
AS_IF([test "$with_x" != yes], [
case "$host_os" in
darwin*)
with_x="no"
;;
esac
], [])
#GL
AX_CHECK_GL
AX_CHECK_GLU
CXXFLAGS="$CXXFLAGS $GL_CFLAGS $GLU_CFLAGS"
CPPFLAGS="$CPPFLAGS $GL_CFLAGS $GLU_CFLAGS"
LIBS="$LIBS $GL_LIBS $GLU_LIBS"
#SDL
SDL_VERSION=1.2.10
AM_PATH_SDL($SDL_VERSION,
:,
AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
)
CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
CPPFLAGS="$CPPFLAGS $SDL_CFLAGS"
LIBS="$LIBS $SDL_LIBS"
#Freetype2
AC_CHECK_FT2([9.0.3],[],[AC_MSG_ERROR([FreeType2 is required by FTGL. Please see INSTALL])])
CXXFLAGS="$CXXFLAGS $FT2_CFLAGS"
CPPFLAGS="$CPPFLAGS $FT2_CFLAGS"
#FTGL
PKG_CHECK_MODULES(FTGL, ftgl >= 2.1.3, [], AC_MSG_ERROR(FTGL 2.1.3 or greater is required. Please see INSTALL))
CXXFLAGS="$CXXFLAGS $FTGL_CFLAGS"
CPPFLAGS="$CPPFLAGS $FTGL_CFLAGS"
LIBS="$LIBS $FTGL_LIBS"
#PNG library
AC_CHECK_LIB(png, png_read_info, , AC_MSG_ERROR([PNG library required. Please see INSTALL]))
#JPEG library
AC_CHECK_LIB(jpeg, jpeg_read_header, , AC_MSG_ERROR([JPEG library required. Please see INSTALL]))
#SDL_image library with PNG support
AC_CHECK_LIB(SDL_image, IMG_LoadPNG_RW, LIBS="$LIBS -lSDL_image", AC_MSG_ERROR([SDL_image required. Please see INSTALL]))
#PCRE
AC_CHECK_LIB([pcre], [pcre_compile],, AC_MSG_ERROR(PCRE is required. Please see INSTALL))
#Check for required headers
AC_CHECK_HEADER([SDL.h],, AC_MSG_ERROR(SDL.h is required. Please see INSTALL))
AC_CHECK_HEADER([SDL_image.h],, AC_MSG_ERROR(SDL_image.h is required. Please see INSTALL))
AC_CHECK_HEADER([ftgl.h],, AC_MSG_ERROR(ftgl.h is required. Please see INSTALL))
AC_CHECK_HEADER([pcre.h],, AC_MSG_ERROR(pcre.h is required. Please see INSTALL))
#see if ttf-font-dir option is enabled
AC_ARG_ENABLE(ttf-font-dir,[AS_HELP_STRING([--enable-ttf-font-dir=DIR],[directory containing GNU FreeFont TTF fonts])],[sdlappfontdir="$enableval"],[sdlappfontdir=""])
AM_CONDITIONAL([FONTDIR], [test "x$sdlappfontdir" != "x"])
AC_SUBST(sdlappfontdir)
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
logstalgia-1.0.3/README 0000644 0002031 0002031 00000016321 11526610646 014345 0 ustar andrewc andrewc
Logstalgia
a website access log visualisation tool
Copyright (C) 2008 Andrew Caudwell
http://code.google.com/p/logstalgia/
Contents
========
1. Description
2. Requirements
3. Using Logstalgia
4. Copyright
1. Description
==============
Logstalgia is a visualization tool that replays or streams web server access
logs as a retro arcade game simulation.
2. Requirements
===============
Logstalgia's display is rendered using OpenGL and requires a 3D accelerated
video card to run.
Logstalgia supports several standardized access.log formats used by web servers
such as Apache and Nginx (see 'Supported Log Formats' below).
As Logstalgia is designed to playback logs in real time you will need a log from
a fairly busy webserver to achieve interesting results (eg 100s of requests
each minute).
3. Using Logstalgia
===================
logstalgia [options] logfile
options:
-f Fullscreen.
-WxH Set the window size. If -f is also supplied, will attempt to
set the video mode to this also.
-b, --background FFFFFF
Background colour in hex.
-x, --full-hostnames
Show full request ip/hostname.
-s, --speed
Simulation speed. Defaults to 1 (1 second-per-second).
-u, --update-rate
Page Summary update speed. Defaults to 5 (5 seconds).
-g name,regex,percent[,colour]
Urls matching the given regex will appear under a new section
with the given name using the given percentage of the screen.
Colour may optionally be supplied in the common hexadecimal
format (eg FF0000 for red)
If no groups are supplied the default groups are Images
(image files), CSS (.css files) and Scripts (.js files).
If there is enough space remaining a catch-all group of Misc
will appear as the last group.
--paddle-mode MODE
Paddle mode (pid, vhost, single).
vhost - separate paddle for each virtual host in the log file.
pid - separate paddle for each process id in the log file.
single - single paddle (the default).
--paddle-position POSITION
Paddle position as a fraction of the view width (0.25 - 0.75).
--sync Read from STDIN, ignoring entries before the current time.
--start-position POSITION
Begin at some position in the log file (between 0.0 and 1.0).
--stop-position POSITION
Stop at some position.
--no-bounce
No bouncing.
--hide-response-code
Hide response code.
--hide-paddle
Hide paddle.
--hide-url-prefix
Hide URL protocol and hostname prefix of requests.
--disable-auto-skip
Disable automatic skipping of empty time periods.
--disable-progress
Disable the progress bar.
--disable-glow
Disable the glow effect.
--font-size SIZE
Font size (10 - 40).
--glow-duration
Duration of the glow (between 0.0 and 1.0).
--glow-multiplier
Adjust the amount of glow.
--glow-intensity
Intensity of the glow.
--output-ppm-stream FILE
Write frames as PPM to a file (?-? for STDOUT).
--output-framerate FPS
Framerate of output (used with --output-ppm-stream).
logfile
The path to the access log file to read or '-' if you wish to
supply log entries via STDIN.
Examples:
Watch an example access.log file using the default settings:
logstalgia data/example.log
Watch the live access.log, starting from the most recent batch of entries
in the log (requires tail). Note than '-' at the end is required for logstalgia
to know it needs to read from STDIN:
tail -f /var/log/apache2/access.log | logstalgia -
To follow the log in real time, use the --sync option. This will start reading
from the next entry received on STDIN:
tail -f /var/log/apache2/access.log | logstalgia --sync
Watch a remote access.log via ssh:
ssh user@example.com tail -f /var/log/apache2/access.log | logstalgia --sync
Supported Log Formats:
Logstalgia supports the following standardized log formats used by web servers like Apache and Nginx:
NCSA Common Log Format (CLF)
"%h %l %u %t \"%r\" %>s %b"
NCSA Common Log Format with Virtual Host
"%v %h %l %u %t \"%r\" %>s %b"
NCSA extended/combined log format
"%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\""
NCSA extended/combined log format with Virtual Host
"%v %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\""
The process id (%P), or some other identifier, may be included as an additional
field at the end of the entry. This can be used with '--paddle-mode pid' where
a separate paddle will be created for each unique value in this field.
Custom Log Format:
Logstalgia now supports a pipe ('|') delimited custom log file format:
timestamp - unix timestamp of the request date.
hostname - hostname of the request
path - path requested
response_code - the response code from the webserver (eg 200)
response_size - the size of the response in bytes
The following are optional:
success - 1 or 0 to indicate if successful
response_colour - response colour in hexidecial (#FFFFFF) format
referrer url - the referrer url
user agent - the user agent
virtual host - the virtual host (to use with --paddle-mode vhost)
pid - process id or some other identifier (--paddle-mode pid)
If success or response_colour are not provided, they will be derived from the
response_code using the normal HTTP conventions (code < 400 = success).
Recording Videos:
See the guide on the homepage for examples of recording videos with Logstalgia:
http://code.google.com/p/logstalgia/wiki/Videos
Interface:
The time shown in the top left of the screen is set initially from the first log
entry read and is incremented according to the simulation speed (-s).
The counter in the bottom right hand corner shows the number of requests
displayed since the start of the current session.
Pressing space at any time will pause/unpause the simulation. While paused you
may use the mouse to inspect the detail of individual requests.
Interactive keyboard commands:
(C) Displays Logstalgia logo
(N) Jump forward in time to next log entry
(+-) Adjust simulation speed
(<>) Adjust time scale
(ESC) Quit
4. Copyright
============
Logstalgia - web server access log visualization
Copyright (C) 2008 Andrew Caudwell
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 3 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, see .
logstalgia-1.0.3/config.sub 0000755 0002031 0002031 00000103445 11526610646 015454 0 ustar andrewc andrewc #! /bin/sh
# Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
# Free Software Foundation, Inc.
timestamp='2010-01-22'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
# can handle that machine. It does not imply ALL GNU software can.
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 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.
# Please send patches to . Submit a context
# diff and a properly formatted GNU ChangeLog entry.
#
# Configuration subroutine to validate and canonicalize a configuration type.
# Supply the specified configuration type as an argument.
# If it is invalid, we print an error message on stderr and exit with code 1.
# Otherwise, we print the canonical config type on stdout and succeed.
# You can get the latest version of this script from:
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
# This file is supposed to be the same for all GNU packages
# and recognize all the CPU types, system types and aliases
# that are meaningful with *any* GNU software.
# Each package is responsible for reporting which valid configurations
# it does not support. The user should be able to distinguish
# a failure to support a valid configuration from a meaningless
# configuration.
# The goal of this file is to map all the various variations of a given
# machine specification into a single specification in the form:
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
# or in some cases, the newer four-part form:
# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
# It is wrong to echo any other type of specification.
me=`echo "$0" | sed -e 's,.*/,,'`
usage="\
Usage: $0 [OPTION] CPU-MFR-OPSYS
$0 [OPTION] ALIAS
Canonicalize a configuration name.
Operation modes:
-h, --help print this help, then exit
-t, --time-stamp print date of last modification, then exit
-v, --version print version number, then exit
Report bugs and patches to ."
version="\
GNU config.sub ($timestamp)
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
help="
Try \`$me --help' for more information."
# Parse command line
while test $# -gt 0 ; do
case $1 in
--time-stamp | --time* | -t )
echo "$timestamp" ; exit ;;
--version | -v )
echo "$version" ; exit ;;
--help | --h* | -h )
echo "$usage"; exit ;;
-- ) # Stop option processing
shift; break ;;
- ) # Use stdin as input.
break ;;
-* )
echo "$me: invalid option $1$help"
exit 1 ;;
*local*)
# First pass through any local machine types.
echo $1
exit ;;
* )
break ;;
esac
done
case $# in
0) echo "$me: missing argument$help" >&2
exit 1;;
1) ;;
*) echo "$me: too many arguments$help" >&2
exit 1;;
esac
# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
# Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
kopensolaris*-gnu* | \
storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
*)
basic_machine=`echo $1 | sed 's/-[^-]*$//'`
if [ $basic_machine != $1 ]
then os=`echo $1 | sed 's/.*-/-/'`
else os=; fi
;;
esac
### Let's recognize common machines as not being operating systems so
### that things like config.sub decstation-3100 work. We also
### recognize some manufacturers as not being operating systems, so we
### can provide default operating systems below.
case $os in
-sun*os*)
# Prevent following clause from handling this invalid input.
;;
-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-apple | -axis | -knuth | -cray | -microblaze)
os=
basic_machine=$1
;;
-bluegene*)
os=-cnk
;;
-sim | -cisco | -oki | -wec | -winbond)
os=
basic_machine=$1
;;
-scout)
;;
-wrs)
os=-vxworks
basic_machine=$1
;;
-chorusos*)
os=-chorusos
basic_machine=$1
;;
-chorusrdb)
os=-chorusrdb
basic_machine=$1
;;
-hiux*)
os=-hiuxwe2
;;
-sco6)
os=-sco5v6
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco5)
os=-sco3.2v5
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco4)
os=-sco3.2v4
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco3.2.[4-9]*)
os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco3.2v[4-9]*)
# Don't forget version if it is 3.2v4 or newer.
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco5v6*)
# Don't forget version if it is 3.2v4 or newer.
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco*)
os=-sco3.2v2
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-udk*)
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-isc)
os=-isc2.2
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-clix*)
basic_machine=clipper-intergraph
;;
-isc*)
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-lynx*)
os=-lynxos
;;
-ptx*)
basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
;;
-windowsnt*)
os=`echo $os | sed -e 's/windowsnt/winnt/'`
;;
-psos*)
os=-psos
;;
-mint | -mint[0-9]*)
basic_machine=m68k-atari
os=-mint
;;
esac
# Decode aliases for certain CPU-COMPANY combinations.
case $basic_machine in
# Recognize the basic CPU types without company name.
# Some are omitted here because they have special meanings below.
1750a | 580 \
| a29k \
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| am33_2.0 \
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
| bfin \
| c4x | clipper \
| d10v | d30v | dlx | dsp16xx \
| fido | fr30 | frv \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \
| lm32 \
| m32c | m32r | m32rle | m68000 | m68k | m88k \
| maxq | mb | microblaze | mcore | mep | metag \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
| mips64 | mips64el \
| mips64octeon | mips64octeonel \
| mips64orion | mips64orionel \
| mips64r5900 | mips64r5900el \
| mips64vr | mips64vrel \
| mips64vr4100 | mips64vr4100el \
| mips64vr4300 | mips64vr4300el \
| mips64vr5000 | mips64vr5000el \
| mips64vr5900 | mips64vr5900el \
| mipsisa32 | mipsisa32el \
| mipsisa32r2 | mipsisa32r2el \
| mipsisa64 | mipsisa64el \
| mipsisa64r2 | mipsisa64r2el \
| mipsisa64sb1 | mipsisa64sb1el \
| mipsisa64sr71k | mipsisa64sr71kel \
| mipstx39 | mipstx39el \
| mn10200 | mn10300 \
| moxie \
| mt \
| msp430 \
| nios | nios2 \
| ns16k | ns32k \
| or32 \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
| pyramid \
| rx \
| score \
| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
| spu | strongarm \
| tahoe | thumb | tic4x | tic80 | tron \
| ubicom32 \
| v850 | v850e \
| we32k \
| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
| z8k | z80)
basic_machine=$basic_machine-unknown
;;
m6811 | m68hc11 | m6812 | m68hc12 | picochip)
# Motorola 68HC11/12.
basic_machine=$basic_machine-unknown
os=-none
;;
m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
;;
ms1)
basic_machine=mt-unknown
;;
# We use `pc' rather than `unknown'
# because (1) that's what they normally are, and
# (2) the word "unknown" tends to confuse beginning users.
i*86 | x86_64)
basic_machine=$basic_machine-pc
;;
# Object if more than one company name word.
*-*-*)
echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
exit 1
;;
# Recognize the basic CPU types with company name.
580-* \
| a29k-* \
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* | avr32-* \
| bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
| clipper-* | craynv-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
| elxsi-* \
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
| h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* | iq2000-* \
| lm32-* \
| m32c-* | m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
| m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
| mips16-* \
| mips64-* | mips64el-* \
| mips64octeon-* | mips64octeonel-* \
| mips64orion-* | mips64orionel-* \
| mips64r5900-* | mips64r5900el-* \
| mips64vr-* | mips64vrel-* \
| mips64vr4100-* | mips64vr4100el-* \
| mips64vr4300-* | mips64vr4300el-* \
| mips64vr5000-* | mips64vr5000el-* \
| mips64vr5900-* | mips64vr5900el-* \
| mipsisa32-* | mipsisa32el-* \
| mipsisa32r2-* | mipsisa32r2el-* \
| mipsisa64-* | mipsisa64el-* \
| mipsisa64r2-* | mipsisa64r2el-* \
| mipsisa64sb1-* | mipsisa64sb1el-* \
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
| mipstx39-* | mipstx39el-* \
| mmix-* \
| mt-* \
| msp430-* \
| nios-* | nios2-* \
| none-* | np1-* | ns16k-* | ns32k-* \
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
| pyramid-* \
| romp-* | rs6000-* | rx-* \
| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
| sparclite-* \
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
| tahoe-* | thumb-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
| tile-* | tilegx-* \
| tron-* \
| ubicom32-* \
| v850-* | v850e-* | vax-* \
| we32k-* \
| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
| xstormy16-* | xtensa*-* \
| ymp-* \
| z8k-* | z80-*)
;;
# Recognize the basic CPU types without company name, with glob match.
xtensa*)
basic_machine=$basic_machine-unknown
;;
# Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS.
386bsd)
basic_machine=i386-unknown
os=-bsd
;;
3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
basic_machine=m68000-att
;;
3b*)
basic_machine=we32k-att
;;
a29khif)
basic_machine=a29k-amd
os=-udi
;;
abacus)
basic_machine=abacus-unknown
;;
adobe68k)
basic_machine=m68010-adobe
os=-scout
;;
alliant | fx80)
basic_machine=fx80-alliant
;;
altos | altos3068)
basic_machine=m68k-altos
;;
am29k)
basic_machine=a29k-none
os=-bsd
;;
amd64)
basic_machine=x86_64-pc
;;
amd64-*)
basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
amdahl)
basic_machine=580-amdahl
os=-sysv
;;
amiga | amiga-*)
basic_machine=m68k-unknown
;;
amigaos | amigados)
basic_machine=m68k-unknown
os=-amigaos
;;
amigaunix | amix)
basic_machine=m68k-unknown
os=-sysv4
;;
apollo68)
basic_machine=m68k-apollo
os=-sysv
;;
apollo68bsd)
basic_machine=m68k-apollo
os=-bsd
;;
aros)
basic_machine=i386-pc
os=-aros
;;
aux)
basic_machine=m68k-apple
os=-aux
;;
balance)
basic_machine=ns32k-sequent
os=-dynix
;;
blackfin)
basic_machine=bfin-unknown
os=-linux
;;
blackfin-*)
basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
os=-linux
;;
bluegene*)
basic_machine=powerpc-ibm
os=-cnk
;;
c90)
basic_machine=c90-cray
os=-unicos
;;
cegcc)
basic_machine=arm-unknown
os=-cegcc
;;
convex-c1)
basic_machine=c1-convex
os=-bsd
;;
convex-c2)
basic_machine=c2-convex
os=-bsd
;;
convex-c32)
basic_machine=c32-convex
os=-bsd
;;
convex-c34)
basic_machine=c34-convex
os=-bsd
;;
convex-c38)
basic_machine=c38-convex
os=-bsd
;;
cray | j90)
basic_machine=j90-cray
os=-unicos
;;
craynv)
basic_machine=craynv-cray
os=-unicosmp
;;
cr16)
basic_machine=cr16-unknown
os=-elf
;;
crds | unos)
basic_machine=m68k-crds
;;
crisv32 | crisv32-* | etraxfs*)
basic_machine=crisv32-axis
;;
cris | cris-* | etrax*)
basic_machine=cris-axis
;;
crx)
basic_machine=crx-unknown
os=-elf
;;
da30 | da30-*)
basic_machine=m68k-da30
;;
decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
basic_machine=mips-dec
;;
decsystem10* | dec10*)
basic_machine=pdp10-dec
os=-tops10
;;
decsystem20* | dec20*)
basic_machine=pdp10-dec
os=-tops20
;;
delta | 3300 | motorola-3300 | motorola-delta \
| 3300-motorola | delta-motorola)
basic_machine=m68k-motorola
;;
delta88)
basic_machine=m88k-motorola
os=-sysv3
;;
dicos)
basic_machine=i686-pc
os=-dicos
;;
djgpp)
basic_machine=i586-pc
os=-msdosdjgpp
;;
dpx20 | dpx20-*)
basic_machine=rs6000-bull
os=-bosx
;;
dpx2* | dpx2*-bull)
basic_machine=m68k-bull
os=-sysv3
;;
ebmon29k)
basic_machine=a29k-amd
os=-ebmon
;;
elxsi)
basic_machine=elxsi-elxsi
os=-bsd
;;
encore | umax | mmax)
basic_machine=ns32k-encore
;;
es1800 | OSE68k | ose68k | ose | OSE)
basic_machine=m68k-ericsson
os=-ose
;;
fx2800)
basic_machine=i860-alliant
;;
genix)
basic_machine=ns32k-ns
;;
gmicro)
basic_machine=tron-gmicro
os=-sysv
;;
go32)
basic_machine=i386-pc
os=-go32
;;
h3050r* | hiux*)
basic_machine=hppa1.1-hitachi
os=-hiuxwe2
;;
h8300hms)
basic_machine=h8300-hitachi
os=-hms
;;
h8300xray)
basic_machine=h8300-hitachi
os=-xray
;;
h8500hms)
basic_machine=h8500-hitachi
os=-hms
;;
harris)
basic_machine=m88k-harris
os=-sysv3
;;
hp300-*)
basic_machine=m68k-hp
;;
hp300bsd)
basic_machine=m68k-hp
os=-bsd
;;
hp300hpux)
basic_machine=m68k-hp
os=-hpux
;;
hp3k9[0-9][0-9] | hp9[0-9][0-9])
basic_machine=hppa1.0-hp
;;
hp9k2[0-9][0-9] | hp9k31[0-9])
basic_machine=m68000-hp
;;
hp9k3[2-9][0-9])
basic_machine=m68k-hp
;;
hp9k6[0-9][0-9] | hp6[0-9][0-9])
basic_machine=hppa1.0-hp
;;
hp9k7[0-79][0-9] | hp7[0-79][0-9])
basic_machine=hppa1.1-hp
;;
hp9k78[0-9] | hp78[0-9])
# FIXME: really hppa2.0-hp
basic_machine=hppa1.1-hp
;;
hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
# FIXME: really hppa2.0-hp
basic_machine=hppa1.1-hp
;;
hp9k8[0-9][13679] | hp8[0-9][13679])
basic_machine=hppa1.1-hp
;;
hp9k8[0-9][0-9] | hp8[0-9][0-9])
basic_machine=hppa1.0-hp
;;
hppa-next)
os=-nextstep3
;;
hppaosf)
basic_machine=hppa1.1-hp
os=-osf
;;
hppro)
basic_machine=hppa1.1-hp
os=-proelf
;;
i370-ibm* | ibm*)
basic_machine=i370-ibm
;;
# I'm not sure what "Sysv32" means. Should this be sysv3.2?
i*86v32)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-sysv32
;;
i*86v4*)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-sysv4
;;
i*86v)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-sysv
;;
i*86sol2)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-solaris2
;;
i386mach)
basic_machine=i386-mach
os=-mach
;;
i386-vsta | vsta)
basic_machine=i386-unknown
os=-vsta
;;
iris | iris4d)
basic_machine=mips-sgi
case $os in
-irix*)
;;
*)
os=-irix4
;;
esac
;;
isi68 | isi)
basic_machine=m68k-isi
os=-sysv
;;
m68knommu)
basic_machine=m68k-unknown
os=-linux
;;
m68knommu-*)
basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
os=-linux
;;
m88k-omron*)
basic_machine=m88k-omron
;;
magnum | m3230)
basic_machine=mips-mips
os=-sysv
;;
merlin)
basic_machine=ns32k-utek
os=-sysv
;;
microblaze)
basic_machine=microblaze-xilinx
;;
mingw32)
basic_machine=i386-pc
os=-mingw32
;;
mingw32ce)
basic_machine=arm-unknown
os=-mingw32ce
;;
miniframe)
basic_machine=m68000-convergent
;;
*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
basic_machine=m68k-atari
os=-mint
;;
mips3*-*)
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
;;
mips3*)
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
;;
monitor)
basic_machine=m68k-rom68k
os=-coff
;;
morphos)
basic_machine=powerpc-unknown
os=-morphos
;;
msdos)
basic_machine=i386-pc
os=-msdos
;;
ms1-*)
basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
;;
mvs)
basic_machine=i370-ibm
os=-mvs
;;
ncr3000)
basic_machine=i486-ncr
os=-sysv4
;;
netbsd386)
basic_machine=i386-unknown
os=-netbsd
;;
netwinder)
basic_machine=armv4l-rebel
os=-linux
;;
news | news700 | news800 | news900)
basic_machine=m68k-sony
os=-newsos
;;
news1000)
basic_machine=m68030-sony
os=-newsos
;;
news-3600 | risc-news)
basic_machine=mips-sony
os=-newsos
;;
necv70)
basic_machine=v70-nec
os=-sysv
;;
next | m*-next )
basic_machine=m68k-next
case $os in
-nextstep* )
;;
-ns2*)
os=-nextstep2
;;
*)
os=-nextstep3
;;
esac
;;
nh3000)
basic_machine=m68k-harris
os=-cxux
;;
nh[45]000)
basic_machine=m88k-harris
os=-cxux
;;
nindy960)
basic_machine=i960-intel
os=-nindy
;;
mon960)
basic_machine=i960-intel
os=-mon960
;;
nonstopux)
basic_machine=mips-compaq
os=-nonstopux
;;
np1)
basic_machine=np1-gould
;;
nsr-tandem)
basic_machine=nsr-tandem
;;
op50n-* | op60c-*)
basic_machine=hppa1.1-oki
os=-proelf
;;
openrisc | openrisc-*)
basic_machine=or32-unknown
;;
os400)
basic_machine=powerpc-ibm
os=-os400
;;
OSE68000 | ose68000)
basic_machine=m68000-ericsson
os=-ose
;;
os68k)
basic_machine=m68k-none
os=-os68k
;;
pa-hitachi)
basic_machine=hppa1.1-hitachi
os=-hiuxwe2
;;
paragon)
basic_machine=i860-intel
os=-osf
;;
parisc)
basic_machine=hppa-unknown
os=-linux
;;
parisc-*)
basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
os=-linux
;;
pbd)
basic_machine=sparc-tti
;;
pbb)
basic_machine=m68k-tti
;;
pc532 | pc532-*)
basic_machine=ns32k-pc532
;;
pc98)
basic_machine=i386-pc
;;
pc98-*)
basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentium | p5 | k5 | k6 | nexgen | viac3)
basic_machine=i586-pc
;;
pentiumpro | p6 | 6x86 | athlon | athlon_*)
basic_machine=i686-pc
;;
pentiumii | pentium2 | pentiumiii | pentium3)
basic_machine=i686-pc
;;
pentium4)
basic_machine=i786-pc
;;
pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentiumpro-* | p6-* | 6x86-* | athlon-*)
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentium4-*)
basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pn)
basic_machine=pn-gould
;;
power) basic_machine=power-ibm
;;
ppc) basic_machine=powerpc-unknown
;;
ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ppcle | powerpclittle | ppc-le | powerpc-little)
basic_machine=powerpcle-unknown
;;
ppcle-* | powerpclittle-*)
basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ppc64) basic_machine=powerpc64-unknown
;;
ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ppc64le | powerpc64little | ppc64-le | powerpc64-little)
basic_machine=powerpc64le-unknown
;;
ppc64le-* | powerpc64little-*)
basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ps2)
basic_machine=i386-ibm
;;
pw32)
basic_machine=i586-unknown
os=-pw32
;;
rdos)
basic_machine=i386-pc
os=-rdos
;;
rom68k)
basic_machine=m68k-rom68k
os=-coff
;;
rm[46]00)
basic_machine=mips-siemens
;;
rtpc | rtpc-*)
basic_machine=romp-ibm
;;
s390 | s390-*)
basic_machine=s390-ibm
;;
s390x | s390x-*)
basic_machine=s390x-ibm
;;
sa29200)
basic_machine=a29k-amd
os=-udi
;;
sb1)
basic_machine=mipsisa64sb1-unknown
;;
sb1el)
basic_machine=mipsisa64sb1el-unknown
;;
sde)
basic_machine=mipsisa32-sde
os=-elf
;;
sei)
basic_machine=mips-sei
os=-seiux
;;
sequent)
basic_machine=i386-sequent
;;
sh)
basic_machine=sh-hitachi
os=-hms
;;
sh5el)
basic_machine=sh5le-unknown
;;
sh64)
basic_machine=sh64-unknown
;;
sparclite-wrs | simso-wrs)
basic_machine=sparclite-wrs
os=-vxworks
;;
sps7)
basic_machine=m68k-bull
os=-sysv2
;;
spur)
basic_machine=spur-unknown
;;
st2000)
basic_machine=m68k-tandem
;;
stratus)
basic_machine=i860-stratus
os=-sysv4
;;
sun2)
basic_machine=m68000-sun
;;
sun2os3)
basic_machine=m68000-sun
os=-sunos3
;;
sun2os4)
basic_machine=m68000-sun
os=-sunos4
;;
sun3os3)
basic_machine=m68k-sun
os=-sunos3
;;
sun3os4)
basic_machine=m68k-sun
os=-sunos4
;;
sun4os3)
basic_machine=sparc-sun
os=-sunos3
;;
sun4os4)
basic_machine=sparc-sun
os=-sunos4
;;
sun4sol2)
basic_machine=sparc-sun
os=-solaris2
;;
sun3 | sun3-*)
basic_machine=m68k-sun
;;
sun4)
basic_machine=sparc-sun
;;
sun386 | sun386i | roadrunner)
basic_machine=i386-sun
;;
sv1)
basic_machine=sv1-cray
os=-unicos
;;
symmetry)
basic_machine=i386-sequent
os=-dynix
;;
t3e)
basic_machine=alphaev5-cray
os=-unicos
;;
t90)
basic_machine=t90-cray
os=-unicos
;;
tic54x | c54x*)
basic_machine=tic54x-unknown
os=-coff
;;
tic55x | c55x*)
basic_machine=tic55x-unknown
os=-coff
;;
tic6x | c6x*)
basic_machine=tic6x-unknown
os=-coff
;;
# This must be matched before tile*.
tilegx*)
basic_machine=tilegx-unknown
os=-linux-gnu
;;
tile*)
basic_machine=tile-unknown
os=-linux-gnu
;;
tx39)
basic_machine=mipstx39-unknown
;;
tx39el)
basic_machine=mipstx39el-unknown
;;
toad1)
basic_machine=pdp10-xkl
os=-tops20
;;
tower | tower-32)
basic_machine=m68k-ncr
;;
tpf)
basic_machine=s390x-ibm
os=-tpf
;;
udi29k)
basic_machine=a29k-amd
os=-udi
;;
ultra3)
basic_machine=a29k-nyu
os=-sym1
;;
v810 | necv810)
basic_machine=v810-nec
os=-none
;;
vaxv)
basic_machine=vax-dec
os=-sysv
;;
vms)
basic_machine=vax-dec
os=-vms
;;
vpp*|vx|vx-*)
basic_machine=f301-fujitsu
;;
vxworks960)
basic_machine=i960-wrs
os=-vxworks
;;
vxworks68)
basic_machine=m68k-wrs
os=-vxworks
;;
vxworks29k)
basic_machine=a29k-wrs
os=-vxworks
;;
w65*)
basic_machine=w65-wdc
os=-none
;;
w89k-*)
basic_machine=hppa1.1-winbond
os=-proelf
;;
xbox)
basic_machine=i686-pc
os=-mingw32
;;
xps | xps100)
basic_machine=xps100-honeywell
;;
ymp)
basic_machine=ymp-cray
os=-unicos
;;
z8k-*-coff)
basic_machine=z8k-unknown
os=-sim
;;
z80-*-coff)
basic_machine=z80-unknown
os=-sim
;;
none)
basic_machine=none-none
os=-none
;;
# Here we handle the default manufacturer of certain CPU types. It is in
# some cases the only manufacturer, in others, it is the most popular.
w89k)
basic_machine=hppa1.1-winbond
;;
op50n)
basic_machine=hppa1.1-oki
;;
op60c)
basic_machine=hppa1.1-oki
;;
romp)
basic_machine=romp-ibm
;;
mmix)
basic_machine=mmix-knuth
;;
rs6000)
basic_machine=rs6000-ibm
;;
vax)
basic_machine=vax-dec
;;
pdp10)
# there are many clones, so DEC is not a safe bet
basic_machine=pdp10-unknown
;;
pdp11)
basic_machine=pdp11-dec
;;
we32k)
basic_machine=we32k-att
;;
sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
basic_machine=sh-unknown
;;
sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
basic_machine=sparc-sun
;;
cydra)
basic_machine=cydra-cydrome
;;
orion)
basic_machine=orion-highlevel
;;
orion105)
basic_machine=clipper-highlevel
;;
mac | mpw | mac-mpw)
basic_machine=m68k-apple
;;
pmac | pmac-mpw)
basic_machine=powerpc-apple
;;
*-unknown)
# Make sure to match an already-canonicalized machine name.
;;
*)
echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
exit 1
;;
esac
# Here we canonicalize certain aliases for manufacturers.
case $basic_machine in
*-digital*)
basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
;;
*-commodore*)
basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
;;
*)
;;
esac
# Decode manufacturer-specific aliases for certain operating systems.
if [ x"$os" != x"" ]
then
case $os in
# First match some system type aliases
# that might get confused with valid system types.
# -solaris* is a basic system type, with this one exception.
-auroraux)
os=-auroraux
;;
-solaris1 | -solaris1.*)
os=`echo $os | sed -e 's|solaris1|sunos4|'`
;;
-solaris)
os=-solaris2
;;
-svr4*)
os=-sysv4
;;
-unixware*)
os=-sysv4.2uw
;;
-gnu/linux*)
os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
;;
# First accept the basic system types.
# The portable systems comes first.
# Each alternative MUST END IN A *, to match a version number.
# -sysv* is not here because it comes later, after sysvr4.
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
| -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
| -sym* | -kopensolaris* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
| -aos* | -aros* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
| -openbsd* | -solidbsd* \
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* | -cegcc* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
| -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
| -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
case $basic_machine in
x86-* | i*86-*)
;;
*)
os=-nto$os
;;
esac
;;
-nto-qnx*)
;;
-nto*)
os=`echo $os | sed -e 's|nto|nto-qnx|'`
;;
-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
| -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
| -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
;;
-mac*)
os=`echo $os | sed -e 's|mac|macos|'`
;;
-linux-dietlibc)
os=-linux-dietlibc
;;
-linux*)
os=`echo $os | sed -e 's|linux|linux-gnu|'`
;;
-sunos5*)
os=`echo $os | sed -e 's|sunos5|solaris2|'`
;;
-sunos6*)
os=`echo $os | sed -e 's|sunos6|solaris3|'`
;;
-opened*)
os=-openedition
;;
-os400*)
os=-os400
;;
-wince*)
os=-wince
;;
-osfrose*)
os=-osfrose
;;
-osf*)
os=-osf
;;
-utek*)
os=-bsd
;;
-dynix*)
os=-bsd
;;
-acis*)
os=-aos
;;
-atheos*)
os=-atheos
;;
-syllable*)
os=-syllable
;;
-386bsd)
os=-bsd
;;
-ctix* | -uts*)
os=-sysv
;;
-nova*)
os=-rtmk-nova
;;
-ns2 )
os=-nextstep2
;;
-nsk*)
os=-nsk
;;
# Preserve the version number of sinix5.
-sinix5.*)
os=`echo $os | sed -e 's|sinix|sysv|'`
;;
-sinix*)
os=-sysv4
;;
-tpf*)
os=-tpf
;;
-triton*)
os=-sysv3
;;
-oss*)
os=-sysv3
;;
-svr4)
os=-sysv4
;;
-svr3)
os=-sysv3
;;
-sysvr4)
os=-sysv4
;;
# This must come after -sysvr4.
-sysv*)
;;
-ose*)
os=-ose
;;
-es1800*)
os=-ose
;;
-xenix)
os=-xenix
;;
-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
os=-mint
;;
-aros*)
os=-aros
;;
-kaos*)
os=-kaos
;;
-zvmoe)
os=-zvmoe
;;
-dicos*)
os=-dicos
;;
-nacl*)
;;
-none)
;;
*)
# Get rid of the `-' at the beginning of $os.
os=`echo $os | sed 's/[^-]*-//'`
echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
exit 1
;;
esac
else
# Here we handle the default operating systems that come with various machines.
# The value should be what the vendor currently ships out the door with their
# machine or put another way, the most popular os provided with the machine.
# Note that if you're going to try to match "-MANUFACTURER" here (say,
# "-sun"), then you have to tell the case statement up towards the top
# that MANUFACTURER isn't an operating system. Otherwise, code above
# will signal an error saying that MANUFACTURER isn't an operating
# system, and we'll never get to this point.
case $basic_machine in
score-*)
os=-elf
;;
spu-*)
os=-elf
;;
*-acorn)
os=-riscix1.2
;;
arm*-rebel)
os=-linux
;;
arm*-semi)
os=-aout
;;
c4x-* | tic4x-*)
os=-coff
;;
# This must come before the *-dec entry.
pdp10-*)
os=-tops20
;;
pdp11-*)
os=-none
;;
*-dec | vax-*)
os=-ultrix4.2
;;
m68*-apollo)
os=-domain
;;
i386-sun)
os=-sunos4.0.2
;;
m68000-sun)
os=-sunos3
# This also exists in the configure program, but was not the
# default.
# os=-sunos4
;;
m68*-cisco)
os=-aout
;;
mep-*)
os=-elf
;;
mips*-cisco)
os=-elf
;;
mips*-*)
os=-elf
;;
or32-*)
os=-coff
;;
*-tti) # must be before sparc entry or we get the wrong os.
os=-sysv3
;;
sparc-* | *-sun)
os=-sunos4.1.1
;;
*-be)
os=-beos
;;
*-haiku)
os=-haiku
;;
*-ibm)
os=-aix
;;
*-knuth)
os=-mmixware
;;
*-wec)
os=-proelf
;;
*-winbond)
os=-proelf
;;
*-oki)
os=-proelf
;;
*-hp)
os=-hpux
;;
*-hitachi)
os=-hiux
;;
i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
os=-sysv
;;
*-cbm)
os=-amigaos
;;
*-dg)
os=-dgux
;;
*-dolphin)
os=-sysv3
;;
m68k-ccur)
os=-rtu
;;
m88k-omron*)
os=-luna
;;
*-next )
os=-nextstep
;;
*-sequent)
os=-ptx
;;
*-crds)
os=-unos
;;
*-ns)
os=-genix
;;
i370-*)
os=-mvs
;;
*-next)
os=-nextstep3
;;
*-gould)
os=-sysv
;;
*-highlevel)
os=-bsd
;;
*-encore)
os=-bsd
;;
*-sgi)
os=-irix
;;
*-siemens)
os=-sysv4
;;
*-masscomp)
os=-rtu
;;
f30[01]-fujitsu | f700-fujitsu)
os=-uxpv
;;
*-rom68k)
os=-coff
;;
*-*bug)
os=-coff
;;
*-apple)
os=-macos
;;
*-atari*)
os=-mint
;;
*)
os=-none
;;
esac
fi
# Here we handle the case where we know the os, and the CPU type, but not the
# manufacturer. We pick the logical manufacturer.
vendor=unknown
case $basic_machine in
*-unknown)
case $os in
-riscix*)
vendor=acorn
;;
-sunos*)
vendor=sun
;;
-cnk*|-aix*)
vendor=ibm
;;
-beos*)
vendor=be
;;
-hpux*)
vendor=hp
;;
-mpeix*)
vendor=hp
;;
-hiux*)
vendor=hitachi
;;
-unos*)
vendor=crds
;;
-dgux*)
vendor=dg
;;
-luna*)
vendor=omron
;;
-genix*)
vendor=ns
;;
-mvs* | -opened*)
vendor=ibm
;;
-os400*)
vendor=ibm
;;
-ptx*)
vendor=sequent
;;
-tpf*)
vendor=ibm
;;
-vxsim* | -vxworks* | -windiss*)
vendor=wrs
;;
-aux*)
vendor=apple
;;
-hms*)
vendor=hitachi
;;
-mpw* | -macos*)
vendor=apple
;;
-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
vendor=atari
;;
-vos*)
vendor=stratus
;;
esac
basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
;;
esac
echo $basic_machine$os
exit
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "timestamp='"
# time-stamp-format: "%:y-%02m-%02d"
# time-stamp-end: "'"
# End:
logstalgia-1.0.3/src/ 0000755 0002031 0002031 00000000000 11526610646 014251 5 ustar andrewc andrewc logstalgia-1.0.3/src/ppm.h 0000644 0002031 0002031 00000003652 11526610646 015224 0 ustar andrewc andrewc /*
Copyright (C) 2009 Johannes Schindelin (johannes.schindelin@gmx.de)
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
3 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, see .
*/
#ifndef PPM_FRAME_EXPORTER_H
#define PPM_FRAME_EXPORTER_H
#include
#include
#include
#include "SDL_thread.h"
#include "core/sdlapp.h"
#include "core/display.h"
enum { FRAME_EXPORTER_WAIT,
FRAME_EXPORTER_DUMP,
FRAME_EXPORTER_EXIT };
class FrameExporter {
protected:
char* pixels1;
char* pixels2;
char* pixels_out;
char* pixels_shared_ptr;
size_t rowstride;
GLuint screentex;
SDL_Thread* thread;
SDL_mutex* mutex;
SDL_cond* cond;
int dumper_thread_state;
public:
FrameExporter();
virtual ~FrameExporter();
void dump();
void dumpThr();
virtual void dumpImpl() {};
};
class PPMExporterException : public std::exception {
protected:
std::string filename;
public:
PPMExporterException(std::string& filename) : filename(filename) {}
virtual ~PPMExporterException() throw () {};
virtual const char* what() const throw() { return filename.c_str(); }
};
class PPMExporter : public FrameExporter {
protected:
std::ostream* output;
std::string filename;
char ppmheader[1024];
public:
PPMExporter(std::string outputfile);
virtual ~PPMExporter();
virtual void dumpImpl();
};
#endif
logstalgia-1.0.3/src/requestball.h 0000644 0002031 0002031 00000003125 11526610646 016746 0 ustar andrewc andrewc /*
Copyright (C) 2008 Andrew Caudwell (acaudwell@gmail.com)
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
3 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, see .
*/
#ifndef REQUESTBALL_H
#define REQUESTBALL_H
#include "core/fxfont.h"
#include "logentry.h"
#include "ball.h"
#include "textarea.h"
class RequestBall : public ProjectedBall {
protected:
vec2f start;
vec2f dest;
vec2f offset;
vec3f pagecolour;
vec3f responseColour();
FXFont* font;
TextureResource* tex;
std::string response_code;
vec3f response_colour;
public:
LogEntry* le;
RequestBall(LogEntry* le, FXFont* font, TextureResource* tex, const vec3f& colour, const vec2f& pos, const vec2f& dest, float speed = 10.0f);
~RequestBall();
bool mouseOver(TextArea& textarea, vec2f& mouse);
int logic(float dt);
void drawGlow() const;
void draw(float dt) const;
void drawResponseCode() const;
};
extern bool gDisableGlow;
extern float gGlowIntensity;
extern float gGlowMultiplier;
extern float gGlowDuration;
#endif
logstalgia-1.0.3/src/ncsa.h 0000644 0002031 0002031 00000001627 11526610646 015354 0 ustar andrewc andrewc /*
Copyright (C) 2010 Andrew Caudwell (acaudwell@gmail.com)
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
3 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, see .
*/
#ifndef NCSA_ACCESS_LOG
#define NCSA_ACCESS_LOG
#include "logentry.h"
class NCSALog : public AccessLog {
public:
NCSALog();
bool parseLine(std::string& line, LogEntry& entry);
};
#endif
logstalgia-1.0.3/src/ball.h 0000644 0002031 0002031 00000003644 11526610646 015343 0 ustar andrewc andrewc /*
Copyright (C) 2008 Andrew Caudwell (acaudwell@gmail.com)
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
3 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, see .
*/
#ifndef BALL_H
#define BALL_H
#include
#include "core/vectors.h"
#include "core/sdlapp.h"
class Line {
public:
vec2f start;
vec2f end;
Line(vec2f start, vec2f end);
~Line();
bool intersects(Line& l, vec2f* p = 0);
};
class ProjectedBall {
protected:
std::vector points;
std::vector line_lengths;
float total_length;
int dest_x;
int start_x;
float eta;
float elapsed;
float progress;
bool has_bounced;
bool no_bounce;
public:
vec2f pos;
vec2f vel;
float size;
vec3f colour;
float speed;
ProjectedBall();
ProjectedBall(const vec2f& pos, const vec2f& vel, const vec3f& colour, int dest_x, float eta, float size, float speed = 10.0f);
~ProjectedBall();
void init(const vec2f& pos, const vec2f& vel, const vec3f& colour, int dest_x, float eta, float size, float speed);
void setElapsed(float e);
void project();
vec2f finish();
void bounce();
void dontBounce();
float getX();
bool isFinished() const;
bool hasBounced() const { return has_bounced; }
bool arrived() const;
float arrivalTime();
float getProgress() const;
void logic(float dt);
};
#endif
logstalgia-1.0.3/src/slider.h 0000644 0002031 0002031 00000001244 11526610646 015705 0 ustar andrewc andrewc #ifndef POS_SLIDER_H
#define POS_SLIDER_H
#include "core/logger.h"
#include "core/bounds.h"
#include "core/fxfont.h"
class PositionSlider {
FXFont font;
Bounds2D bounds;
float percent;
float mouseover;
float mouseover_elapsed;
float fade_time;
float alpha;
vec3f slidercol;
float capwidth;
std::string caption;
public:
PositionSlider(float percent = 0.0f);
void setColour(vec3f col);
void setCaption(std::string cap);
void setPercent(float percent);
bool mouseOver(vec2f pos, float* percent_ptr);
bool click(vec2f pos, float* percent_ptr);
void logic(float dt);
void draw(float dt);
};
#endif
logstalgia-1.0.3/src/paddle.cpp 0000644 0002031 0002031 00000007221 11526610646 016210 0 ustar andrewc andrewc /*
Copyright (C) 2008 Andrew Caudwell (acaudwell@gmail.com)
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
3 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, see .
*/
#include "paddle.h"
int gPaddleMode = PADDLE_SINGLE;
Paddle::Paddle(vec2f pos, vec4f colour, std::string token) {
this->token = token;
this->token_colour = token.size() > 0 ? colourHash2(token) : vec3f(0.5,0.5,0.5);
this->pos = pos;
this->lastcol = colour;
this->default_colour = colour;
this->colour = lastcol;
this->width = 10;
this->height = 50;
this->target = 0;
dest_y = -1;
}
Paddle::~Paddle() {
}
void Paddle::moveTo(int y, float eta, vec4f nextcol) {
this->start_y = (int) this->pos.y;
this->dest_y = y;
this->dest_eta = eta;
this->dest_elapsed = 0.0f;
this->nextcol = nextcol;
//debugLog("move to %d over %.2f\n", dest_y, dest_eta);
}
bool Paddle::visible() {
return colour.w > 0.01;
}
bool Paddle::moving() {
return dest_y != -1;
}
float Paddle::getY() {
return pos.y;
}
float Paddle::getX() {
return pos.x;
}
RequestBall* Paddle::getTarget() {
return target;
}
void Paddle::setTarget(RequestBall* target) {
this->target = target;
if(target==0) {
moveTo(display.height/2, 4, default_colour);
return;
}
vec2f dest = target->finish();
vec4f col = (gPaddleMode == PADDLE_VHOST || gPaddleMode == PADDLE_PID) ?
vec4f(token_colour,1.0) : vec4f(target->colour, 1.0f);
moveTo((int)dest.y, target->arrivalTime(), col);
}
bool Paddle::mouseOver(TextArea& textarea, vec2f& mouse) {
if(pos.x <= mouse.x && pos.x + width >= mouse.x && abs(pos.y - mouse.y) < height/2) {
std::vector content;
content.push_back( token );
textarea.setText(content);
textarea.setPos(mouse);
textarea.setColour(colour.truncate());
return true;
}
return false;
}
void Paddle::logic(float dt) {
if(dest_y != -1) {
float remaining = dest_eta - dest_elapsed;
if(remaining<0.0f) {
//debugLog("paddle end point reached\n");
pos.y = dest_y;
dest_y = -1;
colour = nextcol;
lastcol = colour;
} else {
float alpha = remaining/dest_eta;
pos.y = start_y + ((dest_y-start_y)*(1.0f - alpha));
colour = lastcol * alpha + nextcol * (1.0f - alpha);
}
dest_elapsed += dt;
}
}
void Paddle::drawShadow() {
if(!gPaddleMode) return;
vec2f spos = vec2f(pos.x + 1.0f, pos.y + 1.0f);
glColor4f(0.0, 0.0, 0.0, 0.7 * colour.w);
glBegin(GL_QUADS);
glVertex2f(spos.x,spos.y-(height/2));
glVertex2f(spos.x,spos.y+(height/2));
glVertex2f(spos.x+width,spos.y+(height/2));
glVertex2f(spos.x+width,spos.y-(height/2));
glEnd();
}
void Paddle::draw() {
if(!gPaddleMode) return;
glColor4fv(colour);
glBegin(GL_QUADS);
glVertex2f(pos.x,pos.y-(height/2));
glVertex2f(pos.x,pos.y+(height/2));
glVertex2f(pos.x+width,pos.y+(height/2));
glVertex2f(pos.x+width,pos.y-(height/2));
glEnd();
}
logstalgia-1.0.3/src/ppm.cpp 0000644 0002031 0002031 00000010242 11526610646 015550 0 ustar andrewc andrewc /*
Copyright (C) 2009 Johannes Schindelin (johannes.schindelin@gmx.de)
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
3 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, see .
*/
#include "ppm.h"
extern "C" {
static int dumper_thread(void *arg) {
FrameExporter *e = static_cast(arg);
e->dumpThr();
return 0;
}
};
// FrameExporter
FrameExporter::FrameExporter() {
//this now assumes the display is setup
//before the frame exporter is created
//(which seems reasonable)
rowstride = display.width * 3;
pixels1 = new char[display.height * rowstride];
pixels2 = new char[display.height * rowstride];
pixels_out = new char[display.height * rowstride];
pixels_shared_ptr = 0;
screentex = display.emptyTexture(display.width, display.height, GL_RGBA);
dumper_thread_state = FRAME_EXPORTER_WAIT;
cond = SDL_CreateCond();
mutex = SDL_CreateMutex();
thread = SDL_CreateThread( dumper_thread, this );
}
FrameExporter::~FrameExporter() {
if(dumper_thread_state != FRAME_EXPORTER_EXIT) {
SDL_mutexP(mutex);
dumper_thread_state = FRAME_EXPORTER_EXIT;
SDL_CondSignal(cond);
SDL_mutexV(mutex);
}
/* wait for thread to quit, then tear down */
SDL_KillThread(thread);
SDL_DestroyCond(cond);
SDL_DestroyMutex(mutex);
if(screentex!=0) glDeleteTextures(1, &screentex);
pixels_shared_ptr = 0;
delete[] pixels1;
delete[] pixels2;
delete[] pixels_out;
}
void FrameExporter::dump() {
display.mode2D();
glEnable(GL_TEXTURE_2D);
glDisable(GL_BLEND);
char* next_pixel_ptr = (pixels_shared_ptr == pixels1) ? pixels2 : pixels1;
// copy pixels - now the right way up
glReadPixels(0, 0, display.width, display.height,
GL_RGB, GL_UNSIGNED_BYTE, next_pixel_ptr);
// wait for lock before changing the pointer to point to our new buffer
SDL_mutexP(mutex);
//flip buffer we are pointing at
pixels_shared_ptr = next_pixel_ptr;
dumper_thread_state = FRAME_EXPORTER_DUMP;
SDL_CondSignal(cond);
SDL_mutexV(mutex);
}
void FrameExporter::dumpThr() {
SDL_mutexP(mutex);
for (;;) {
while (dumper_thread_state == FRAME_EXPORTER_WAIT)
SDL_CondWait(cond, mutex);
if (dumper_thread_state == FRAME_EXPORTER_EXIT) break;
if (pixels_shared_ptr != 0) {
//invert image
for(int y=0;yfail()) {
delete output;
throw PPMExporterException(outputfile);
}
}
//write header
sprintf(ppmheader, "P6\n# Generated by %s\n%d %d\n255\n",
gSDLAppTitle.c_str(), display.width, display.height
);
}
PPMExporter::~PPMExporter() {
SDL_mutexP(mutex);
dumper_thread_state = FRAME_EXPORTER_EXIT;
SDL_CondSignal(cond);
SDL_mutexV(mutex);
if(filename.size()>0)
((std::fstream*)output)->close();
}
void PPMExporter::dumpImpl() {
*output << ppmheader;
output->write(pixels_out, rowstride * display.height);
}
logstalgia-1.0.3/src/custom.h 0000644 0002031 0002031 00000001653 11526610646 015741 0 ustar andrewc andrewc /*
Copyright (C) 2010 Andrew Caudwell (acaudwell@gmail.com)
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
3 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, see .
*/
#ifndef CUSTOM_ACCESS_LOG
#define CUSTOM_ACCESS_LOG
#include "logentry.h"
class CustomAccessLog : public AccessLog {
public:
CustomAccessLog();
bool parseLine(std::string& line, LogEntry& entry);
};
#endif
logstalgia-1.0.3/src/summarizer.cpp 0000644 0002031 0002031 00000036222 11526610646 017160 0 ustar andrewc andrewc /*
Copyright (C) 2008 Andrew Caudwell (acaudwell@gmail.com)
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
3 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, see .
*/
#include "summarizer.h"
/*
Method:
if leaf:
- return string
if has children:
- look at each childs 'word' count and allocate a % of the no_strings to each
child where the % is the total word count of the children / the individual count
of each node (rounding downwards - ie 0.9 -> 0)
call each child and return the total set of strings from the children.
*/
//SummUnit
SummUnit::SummUnit() {
this->words=0;
this->refs=0;
this->truncated=false;
this->exceptions=false;
}
SummUnit::SummUnit(SummNode* source, bool truncated, bool exceptions) {
this->source = source;
this->words = source->words;
this->refs = source->refs;
this->truncated = truncated;
this->exceptions= exceptions;
if(source->parent!=0) prependChar(source->c);
}
void SummUnit::buildSummary() {
expanded.clear();
source->expand(str, expanded, exceptions);
}
void SummUnit::prependChar(char c) {
str.insert(0,1,c);
}
//SummNode
const char* summ_wildcard = "*";
SummNode::SummNode() {
c = '*';
words=0;
parent=0;
}
SummNode::SummNode(const std::string& str, size_t offset, SummNode* parent) {
c = str[offset];
words=0;
refs=0;
this->parent=parent;
//if leaf
if(!addWord(str, ++offset)) {
words=1;
}
}
bool SummNode::removeWord(const std::string& str, size_t offset) {
refs--;
size_t str_size = str.size() - offset;
if(!str_size) return false;
words--;
size_t no_children = children.size();
bool removed = false;
for(size_t i=0;ic == str[offset]) {
removed = children[i]->removeWord(str,++offset);
if(children[i]->refs == 0) {
std::vector::iterator it = children.begin()+i;
delete *it;
children.erase(it);
}
break;
}
}
return removed;
}
void SummNode::debug(int indent) {
for(int i=0;idebug(indent);
}
}
bool SummNode::addWord(const std::string& str, size_t offset) {
refs++;
size_t str_size = str.size() - offset;
if(!str_size) return false;
words++;
size_t no_children = children.size();
for(size_t i=0;ic == str[offset]) {
return children[i]->addWord(str, ++offset);
}
}
children.push_back(new SummNode(str, offset, this));
return true;
}
std::string format_node(std::string str, int refs) {
char buff[256];
snprintf(buff, 256, "%03d %s", refs, str.c_str());
return std::string(buff);
}
void SummNode::expand(std::string prefix, std::vector& vec, bool exceptions) {
size_t no_child = children.size();
if(no_child==0) {
vec.push_back(format_node(prefix, refs));
return;
}
//find top-but-not-root node, expand root node
std::vector::iterator it;
for(size_t i=0;i strvec;
children[i]->summarize(strvec, 100);
for(it=strvec.begin(); it!=strvec.end(); it++) {
vec.push_back(format_node(prefix+(*it).str, children[i]->refs));
}
}
}
int SummNode::summarize(std::vector& strvec, int no_words) {
// if no children, just append this node
if(children.size()==0 && parent!=0) {
strvec.push_back(SummUnit(this));
return 1;
}
int total_count=0;
//get total number of words
size_t no_child = children.size();
//figure out the total number of words 'below' this node
int total_child_words = 0;
for(size_t i=0;iwords;
}
//distribute slots to children
int extra_slots = no_words;
int un_covered=0;
for(size_t i=0;iwords / total_child_words;
int child_share = (int)(percent * no_words);
extra_slots -= child_share;
if(child_share==0) un_covered++;
}
//if any child will be left out need a spare catch all slot
if(un_covered>extra_slots) {
extra_slots--;
}
exception.clear();
un_covered=0;
int last_uncovered=-1;
//summarize children,
for(size_t i=0;iwords / total_child_words;
int child_share = (int)(percent * no_words);
//give any left over slots to largest child
if(extra_slots>0 && child_share==0) {
if(i==no_child-1) {
child_share += extra_slots;
extra_slots = 0;
} else {
child_share += 1;
extra_slots -= 1;
}
}
if(child_share<=0) {
un_covered++;
exception.push_back(true);
last_uncovered=i;
continue;
}
exception.push_back(false);
int currsize = strvec.size();
int count = children[i]->summarize(strvec, child_share);
total_count+=count;
size_t newsize = (size_t) (count + currsize);
for(size_t j=currsize;j0) {
if(un_covered==1) {
int currsize = strvec.size();
int count = children[last_uncovered]->summarize(strvec, 1);
size_t newsize = (size_t) (count + currsize);
total_count += count;
for(size_t j=currsize;junit = unit;
vec3f col = icol!=0 ? *icol : colourHash(unit.str);
this->colour = vec4f(col, 1.0f);
char buff[1024];
if(unit.truncated) {
if(showcount) {
snprintf(buff, 1024, "%03d %s (%d)", unit.refs, unit.str.c_str(), (int) unit.expanded.size());
} else {
snprintf(buff, 1024, "%s (%d)", unit.str.c_str(), (int) unit.expanded.size());
}
} else {
if(showcount) {
snprintf(buff, 1024, "%03d %s", unit.refs, unit.str.c_str());
} else {
snprintf(buff, 1024, "%s", unit.str.c_str());
}
}
this->displaystr = std::string(buff);
this->width = font.getWidth(displaystr);
}
SummItem::SummItem(SummUnit unit, vec2f pos, vec2f dest, float target_x, vec3f* icol, FXFont font, bool showcount) {
this->pos = pos;
this->target_x = target_x;
this->icol = icol;
this->font = font;
this->showcount=showcount;
updateUnit(unit);
destroy=false;
moving=false;
setDest(dest);
}
void SummItem::setDest(vec2f dest, bool depart) {
if(moving && (this->dest - dest).length2()<1.0f) return;
this->oldpos = pos;
this->dest = dest;
this->elapsed = 0;
this->eta = 1.0f;
destroy = false;
moving = true;
departing = depart;
}
void SummItem::logic(float dt) {
if(!moving) return;
float remaining = eta - elapsed;
if(remaining>0.0f) {
float dist_x = target_x - pos.x;
if(dist_x<0.0f) dist_x = -dist_x;
float alpha = 0.0f;
if(dist_x<200.0f) {
alpha = 1.0f - (dist_x/200.0f);
}
colour.w = alpha;
pos = oldpos + (dest-oldpos)*(1.0f - (remaining/eta));
elapsed+=dt;
} else {
pos = dest;
if(departing) {
destroy = true;
}
departing = false;
moving = false;
colour.w=1.0f;
}
}
void SummItem::draw(float alpha) {
glColor4f(colour.x, colour.y, colour.z, colour.w * alpha);
font.draw((int)pos.x, (int)pos.y, displaystr.c_str());
}
// Summarizer
Summarizer::Summarizer(FXFont font, float x, float top_gap, float bottom_gap, float refresh_delay, std::string matchstr, std::string title)
: matchre(matchstr)
{
this->pos_x = x;
this->top_gap = top_gap;
this->bottom_gap = bottom_gap;
this->title = title;
this->font = font;
this->refresh_delay = refresh_delay;
this->refresh_elapsed = refresh_delay;
this->item_colour=0;
this->showcount=false;
changed = false;
font_gap = font.getHeight() + 4;
max_strings = (int) ((display.height-top_gap-bottom_gap)/font_gap);
incrementf =0;
root = SummNode();
mouseover=false;
right = (pos_x > (display.width/2)) ? true : false;
if(this->title.size()) {
this->top_gap+= font_gap;
}
}
void Summarizer::mouseOut() {
mouseover=false;
}
bool Summarizer::mouseOver(TextArea& textarea, vec2f mouse) {
mouseover=false;
if(right && mouse.x < pos_x) return false;
if(mouse.y < top_gap || mouse.y > (display.height-bottom_gap)) return false;
if(items.size()<1) return false;
float y = mouse.y;
std::list::iterator it;
for(it=items.begin();it!=items.end();it++) {
SummItem* si = &(*it);
if(si->departing) continue;
if(si->pos.y<=y && (si->pos.y+font.getHeight()+4) > y) {
if(mouse.x< si->pos.x || mouse.x > si->pos.x + si->width) continue;
std::vector content;
textarea.setText(si->unit.expanded);
textarea.setColour(si->colour.truncate());
textarea.setPos(mouse);
mouseover=true;
return true;
}
}
return false;
}
void Summarizer::setColour(vec3f col) {
this->item_colour = new vec3f(col);
}
bool Summarizer::isColoured() {
return (item_colour!=0);
}
vec3f Summarizer::getColour() {
return *item_colour;
}
Summarizer::~Summarizer() {
if(item_colour!=0) delete item_colour;
}
bool Summarizer::supportedString(std::string& str) {
return matchre.match(str);
}
void Summarizer::summarize() {
if(!changed) return;
changed = false;
strings.clear();
root.summarize(strings,max_strings);
size_t nostrs = strings.size();
for(size_t i=0;i1) {
incrementf = (((float)display.height-font_gap-top_gap-bottom_gap)/(nostrs-1));
} else {
incrementf =0;
}
}
void Summarizer::recalc_display() {
size_t nostrs = strings.size();
std::vector strfound;
strfound.resize(nostrs, false);
std::list::iterator it;
//update summItems
for(it=items.begin();it!=items.end();it++) {
SummItem* item = &(*it);
int match = -1;
for(size_t j=0;junit.str) == 0) {
item->updateUnit(summstr);
match = (int)j;
strfound[j]= true;
break;
}
}
if(match!= -1) {
float destY = calcPosY(match);
item->setDest(vec2f(pos_x, destY));
} else {
float destX = right ? (display.width + 100) : -100;
item->setDest(vec2f(destX, item->pos.y), true);
}
}
//add items for strings not found
for(size_t i=0;i best_size
&& strn_size < input_size)) {
best = i;
best_diff = min_common_diff;
best_size = min_size;
}
}
return best;
}
const std::string& Summarizer::getBestMatchStr(const std::string& str) const {
int pos = getBestMatchIndex(str);
return strings[pos].str;
}
float Summarizer::getMiddlePosY(const std::string& str) const {
return getPosY(str) + (font.getHeight()) / 2;
}
float Summarizer::getPosY(const std::string& str) const {
int best = getBestMatchIndex(str);
if(best!=-1) {
return calcPosY(best);
}
return calcPosY(0);
}
void Summarizer::showCount(bool showcount) {
this->showcount = showcount;
}
void Summarizer::addString(const std::string& str) {
root.addWord(str,0);
changed = true;
}
void Summarizer::logic(float dt) {
if(changed) summarize();
refresh_elapsed+=dt;
if(refresh_elapsed>=refresh_delay) {
recalc_display();
refresh_elapsed=0;
}
//move items
std::list::iterator it;
for(it = items.begin();it != items.end(); it++) {
(*it).logic(dt);
if((*it).destroy) {
it = items.erase(it);
if(it==items.end()) {
break;
}
}
}
}
void Summarizer::draw(float dt, float alpha) {
glEnable(GL_BLEND);
glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glEnable(GL_TEXTURE_2D);
if(title.size()) {
glColor4f(1.0f, 1.0f, 1.0f, alpha);
font.draw((int)pos_x, (int)(top_gap - font_gap), title.c_str());
}
std::list::iterator it;
for(it=items.begin();it!=items.end();it++) {
(*it).draw(alpha);
}
}
logstalgia-1.0.3/src/logstalgia.cpp 0000644 0002031 0002031 00000100527 11526610646 017110 0 ustar andrewc andrewc /*
Copyright (C) 2008 Andrew Caudwell (acaudwell@gmail.com)
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
3 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, see .
*/
#include "logstalgia.h"
//Logstalgia
//turn performance profiling
//#define LS_PERFORMANCE_PROFILE
float gSplash = -1.0f;
float gStartPosition = 0.0;
float gStopPosition = 1.0;
float gPaddlePosition = 0.67;
bool gAutoSkip = true;
int gFontSize = 14;
bool gDisableProgress = false;
bool gSyncLog = false;
bool gHideURLPrefix = false;
std::string profile_name;
Uint32 profile_start_msec;
std::string old_tz;
void profile_start(std::string profile) {
#ifdef LS_PERFORMANCE_PROFILE
profile_start_msec = SDL_GetTicks();
profile_name = profile;
#endif
}
void profile_stop() {
#ifdef LS_PERFORMANCE_PROFILE
debugLog("%s took %d ms\n", profile_name.c_str(), SDL_GetTicks() - profile_start_msec);
#endif
}
void logstalgia_info(std::string msg) {
SDLAppInfo(msg);
}
void logstalgia_quit(std::string error) {
SDLAppQuit(error);
}
void logstalgia_help() {
#ifdef _WIN32
SDLAppCreateWindowsConsole();
//resize window to fit help message
SDLAppResizeWindowsConsole(700);
#endif
printf("Logstalgia v%s\n", LOGSTALGIA_VERSION);
printf("Usage: logstalgia [OPTIONS] FILE\n\n");
printf("Options:\n");
printf(" -WIDTHxHEIGHT Set window size\n");
printf(" -f Fullscreen\n\n");
printf(" -b --background FFFFFF Background colour in hex\n\n");
printf(" -x --full-hostnames Show full request ip/hostname\n");
printf(" -s --speed Simulation speed (default: 1)\n");
printf(" -u --update-rate Page summary update rate (default: 5)\n\n");
printf(" -g name,regex,percent[,colour] Group urls that match a regular expression\n\n");
printf(" --paddle-mode MODE Paddle mode (single, pid, vhost)\n");
printf(" --paddle-position POSITION Paddle position as a fraction of the view width\n\n");
printf(" --sync Read from STDIN, ignoring entries before now\n");
printf(" --start-position POSITION Begin at some position in the log (0.0 - 1.0)\n");
printf(" --stop-position POSITION Stop at some position\n\n");
printf(" --no-bounce No bouncing\n\n");
printf(" --hide-response-code Hide response code\n");
printf(" --hide-paddle Hide paddle\n");
printf(" --hide-url-prefix Hide URL protocol and hostname prefix\n\n");
printf(" --disable-auto-skip Disable skipping of empty time periods\n");
printf(" --disable-progress Disable the progress bar\n");
printf(" --disable-glow Disable the glow effect\n\n");
printf(" --font-size SIZE Font size\n\n");
printf(" --glow-duration Duration of the glow (default: 0.15)\n");
printf(" --glow-multiplier Adjust the amount of glow (default: 1.25)\n");
printf(" --glow-intensity Intensity of the glow (default: 0.5)\n\n");
printf(" --output-ppm-stream FILE Write frames as PPM to a file ('-' for STDOUT)\n");
printf(" --output-framerate FPS Framerate of output (25,30,60)\n\n");
printf("FILE should be a log file or '-' to read STDIN.\n\n");
#ifdef _WIN32
printf("Press Enter\n");
getchar();
#endif
exit(0);
}
Logstalgia::Logstalgia(std::string logfile, float simu_speed, float update_rate) : SDLApp() {
info = false;
paused = false;
recentre = false;
next = false;
this->simu_speed = simu_speed;
this->update_rate = update_rate;
this->logfile = logfile;
spawn_delay=0;
highscore = 0;
uimessage_timer=0.0f;
ipSummarizer = 0;
mintime = gSyncLog ? time(0) : 0;
seeklog = 0;
streamlog = 0;
if(!logfile.size())
throw SDLAppException("no file supplied");
if(logfile.compare("-")==0) {
logfile = "STDIN";
streamlog = new StreamLog();
gDisableProgress = true;
} else {
try {
seeklog = new SeekLog(logfile);
} catch(SeekLogException& exception) {
throw SDLAppException("unable to read log file");
}
}
total_space = display.height - 40;
remaining_space = total_space - 2;
total_entries=0;
background = vec3f(0.0, 0.0, 0.0);
fontLarge = fontmanager.grab("FreeSerif.ttf", 42);
fontMedium = fontmanager.grab("FreeMonoBold.ttf", 16);
fontBall = fontmanager.grab("FreeMonoBold.ttf", 16);
fontSmall = fontmanager.grab("FreeMonoBold.ttf", gFontSize);
fontLarge.dropShadow(true);
fontMedium.dropShadow(true);
fontSmall.dropShadow(true);
balltex = texturemanager.grab("ball.tga");
glowtex = texturemanager.grab("glow.tga");
infowindow = TextArea(fontSmall);
mousehide_timeout = 0.0f;
time_scale = 1.0;
runtime = 0.0;
frameExporter = 0;
framecount = 0;
frameskip = 0;
fixed_tick_rate = 0.0;
accesslog = 0;
font_alpha = 1.0;
//every 60 minutes seconds blank text for 60 seconds
screen_blank_interval = 3600.0;
screen_blank_period = 60.0;
screen_blank_elapsed = 0.0;
paddle_x = display.width * gPaddlePosition;
paddle_colour = (gPaddleMode > PADDLE_SINGLE) ?
vec4f(0.0f, 0.0f, 0.0f, 0.0f) : vec4f(0.5, 0.5, 0.5, 1.0);
debugLog("Logstalgia end of constructor\n");
//check if TZ is set, store current value
if(old_tz.empty()) {
char* current_tz_env = getenv("TZ");
if(current_tz_env != 0) {
old_tz = std::string("TZ=");
old_tz += std::string(current_tz_env);
}
}
}
Logstalgia::~Logstalgia() {
if(accesslog!=0) delete accesslog;
for(std::map::iterator it= paddles.begin(); it!=paddles.end();it++) {
delete it->second;
}
paddles.clear();
if(seeklog!=0) delete seeklog;
if(streamlog!=0) delete streamlog;
for(size_t i=0;imouseOut();
int nogrps = summGroups.size();
for(int i=0;imouseOut();
}
}
}
void Logstalgia::keyPress(SDL_KeyboardEvent *e) {
if (e->type == SDL_KEYDOWN) {
if (e->keysym.sym == SDLK_ESCAPE) {
appFinished=true;
}
if(e->keysym.sym == SDLK_q) {
info = !info;
}
if(e->keysym.sym == SDLK_c) {
gSplash = 10.0f;
}
if(e->keysym.sym == SDLK_n) {
next = true;
}
if(e->keysym.sym == SDLK_SPACE) {
togglePause();
}
if(e->keysym.sym == SDLK_EQUALS || e->keysym.sym == SDLK_KP_PLUS) {
if(simu_speed<=29.0f) {
simu_speed += 1.0f;
recentre=true;
}
}
if(e->keysym.sym == SDLK_MINUS || e->keysym.sym == SDLK_KP_MINUS) {
if(simu_speed>=2.0f) {
simu_speed -= 1.0f;
recentre=true;
}
}
if(e->keysym.sym == SDLK_PERIOD) {
if(time_scale>=1.0) {
time_scale = std::min(4.0f, floorf(time_scale) + 1.0f);
} else {
time_scale = std::min(1.0f, time_scale * 2.0f);
}
}
if(e->keysym.sym == SDLK_COMMA) {
if(time_scale>1.0) {
time_scale = std::max(0.0f, floorf(time_scale) - 1.0f);
} else {
time_scale = std::max(0.25f, time_scale * 0.5f);
}
}
}
}
void Logstalgia::reset() {
end_reached = false;
highscore = 0;
for(std::map::iterator it= paddles.begin(); it!=paddles.end();it++) {
delete it->second;
}
paddles.clear();
if(gPaddleMode <= PADDLE_SINGLE) {
vec2f paddle_pos = vec2f(paddle_x - 20, rand() % display.height);
Paddle* paddle = new Paddle(paddle_pos, paddle_colour, "");
paddles[""] = paddle;
}
for(std::list::iterator it = balls.begin(); it != balls.end(); it++) {
removeBall(*it);
}
balls.clear();
ipSummarizer->recalc_display();
for(size_t i=0;irecalc_display();
}
queued_entries.clear();
// reset settings
elapsed_time = 0;
starttime = 0;
lasttime = 0;
}
void Logstalgia::seekTo(float percent) {
debugLog("seekTo(%.2f)\n", percent);
if(gDisableProgress) return;
//disable pause if enabled before seeking
if(paused) paused = false;
reset();
seeklog->seekTo(percent);
readLog();
}
void Logstalgia::mouseClick(SDL_MouseButtonEvent *e) {
debugLog("click! (x=%d,y=%d)\n", e->x, e->y);
if(e->type != SDL_MOUSEBUTTONDOWN) return;
if(e->button == SDL_BUTTON_LEFT) {
if(!gDisableProgress) {
float position;
if(slider.click(mousepos, &position)) {
seekTo(position);
}
}
}
}
//peek at the date under the mouse pointer on the slider
std::string Logstalgia::dateAtPosition(float percent) {
std::string date;
if(seeklog == 0 || accesslog == 0) return date;
//get line at position
std::string linestr;
if(percent<1.0 && seeklog->getNextLineAt(linestr, percent)) {
LogEntry le;
if(accesslog->parseLine(linestr, le)) {
//display date
char datestr[256];
long timestamp = le.timestamp;
struct tm* timeinfo = localtime ( ×tamp );
strftime(datestr, 256, "%H:%M:%S %B %d, %Y", timeinfo);
date = std::string(datestr);
}
}
return date;
}
void Logstalgia::mouseMove(SDL_MouseMotionEvent *e) {
mousepos = vec2f(e->x, e->y);
SDL_ShowCursor(true);
mousehide_timeout = 5.0f;
float pos;
if(!gDisableProgress && slider.mouseOver(mousepos, &pos)) {
std::string date = dateAtPosition(pos);
slider.setCaption(date);
}
}
Regex ls_url_hostname_regex("^http://[^/]+(.+)$");
std::string Logstalgia::filterURLHostname(const std::string& hostname) {
std::vector matches;
if(ls_url_hostname_regex.match(hostname, &matches)) {
return matches[0];
}
return hostname;
}
void Logstalgia::addStrings(LogEntry* le) {
std::string hostname = le->hostname;
std::string pageurl = le->path;
int nogroups = summGroups.size();
Summarizer* pageSummarizer= 0;
for(int i=0;isupportedString(pageurl)) {
pageSummarizer = summGroups[i];
break;
}
}
if(pageSummarizer==0) return;
if(gHideURLPrefix) pageurl = filterURLHostname(pageurl);
pageSummarizer->addString(pageurl);
ipSummarizer->addString(hostname);
}
void Logstalgia::addBall(LogEntry* le, float start_offset) {
std::string hostname = le->hostname;
std::string pageurl = le->path;
//find appropriate summarizer for url
int nogroups = summGroups.size();
Summarizer* pageSummarizer= 0;
for(int i=0;isupportedString(pageurl)) {
pageSummarizer = summGroups[i];
break;
}
}
if(pageSummarizer==0) return;
Paddle* entry_paddle = 0;
if(gPaddleMode > PADDLE_SINGLE) {
std::string paddle_token = (gPaddleMode == PADDLE_VHOST) ? le->vhost : le->pid;
entry_paddle = paddles[paddle_token];
if(entry_paddle == 0) {
vec2f paddle_pos = vec2f(display.width-(display.width/3), rand() % display.height);
Paddle* paddle = new Paddle(paddle_pos, paddle_colour, paddle_token);
entry_paddle = paddles[paddle_token] = paddle;
}
} else {
entry_paddle = paddles[""];
}
if(gHideURLPrefix) pageurl = filterURLHostname(pageurl);
float dest_y = pageSummarizer->getMiddlePosY(pageurl);
float pos_y = ipSummarizer->getMiddlePosY(hostname);
float start_x = -(entry_paddle->getX()/ 5.0f);
vec2f ball_start = vec2f(start_x, pos_y);
vec2f ball_dest = vec2f(entry_paddle->getX(), dest_y);
const std::string& match = ipSummarizer->getBestMatchStr(hostname);
vec3f colour = pageSummarizer->isColoured() ? pageSummarizer->getColour() : colourHash(match);
RequestBall* ball = new RequestBall(le, &fontMedium, balltex, colour, ball_start, ball_dest, simu_speed);
ball->setElapsed( start_offset );
balls.push_back(ball);
}
BaseLog* Logstalgia::getLog() {
if(seeklog !=0) return seeklog;
return streamlog;
}
void Logstalgia::readLog(int buffer_rows) {
profile_start("readLog");
//change TZ to UTC
putenv((char*)"TZ=UTC");
tzset();
int entries_read = 0;
std::string linestr;
BaseLog* baselog = getLog();
time_t read_timestamp = 0;
while( baselog->getNextLine(linestr) ) {
//trim whitespace
if(linestr.size()>0) {
size_t string_end =
linestr.find_last_not_of(" \t\f\v\n\r");
if(string_end == std::string::npos) {
linestr = "";
} else if(string_end != linestr.size()-1) {
linestr = linestr.substr(0,string_end+1);
}
}
LogEntry le;
bool parsed_entry;
//determine format
if(accesslog==0) {
//is this a recognized NCSA access log?
NCSALog* ncsalog = new NCSALog();
if((parsed_entry = ncsalog->parseLine(linestr, le))) {
accesslog = ncsalog;
} else {
delete ncsalog;
}
if(accesslog==0) {
//is this a custom log?
CustomAccessLog* customlog = new CustomAccessLog();
if((parsed_entry = customlog->parseLine(linestr, le))) {
accesslog = customlog;
} else {
delete customlog;
}
}
} else {
if(!(parsed_entry = accesslog->parseLine(linestr, le))) {
debugLog("error: could not read line %s\n", linestr.c_str());
}
}
if(parsed_entry) {
if(mintime == 0 || mintime <= le.timestamp) {
queued_entries.push_back(new LogEntry(le));
total_entries++;
entries_read++;
//read at least the buffered row count if specified
//otherwise read all entries with the same time
if(buffer_rows) {
if(entries_read > buffer_rows) break;
} else {
if(read_timestamp && read_timestamp < le.timestamp) break;
}
read_timestamp = le.timestamp;
}
}
}
profile_stop();
//reset TZ to previous value
if(!old_tz.empty()) {
putenv((char*)old_tz.c_str());
} else {
#ifdef HAVE_UNSETENV
unsetenv("TZ");
#else
putenv("TZ=");
#endif
}
tzset();
if(queued_entries.empty() && seeklog != 0) {
if(total_entries==0) {
logstalgia_quit("could not parse first entry");
}
//no more entries
end_reached = true;
return;
}
if(seeklog != 0) {
float percent = seeklog->getPercent();
if(percent > gStopPosition) {
end_reached = true;
return;
}
if(!gDisableProgress) slider.setPercent(percent);
}
//set start time if currently 0
if(starttime==0 && !queued_entries.empty()) {
starttime = queued_entries.front()->timestamp;
currtime = 0;
}
}
void Logstalgia::init() {
debugLog("init called\n");
ipSummarizer = new Summarizer(fontSmall, 2, 40, 0, 2.0f);
reset();
readLog();
//add default groups
if(summGroups.size()==0) {
//images - file is under images or
addGroup("CSS", "\\.css\\b", 15);
addGroup("Script", "\\.js\\b", 15);
addGroup("Images", "/images/|\\.(jpe?g|gif|bmp|tga|ico|png)\\b", 20);
}
//always fill remaining space with Misc, (if there is some)
if(remaining_space>50) {
addGroup(summGroups.size()>0 ? "Misc" : "", ".*");
}
SDL_ShowCursor(false);
//set start position
if(gStartPosition > 0.0 && gStartPosition < 1.0) {
seekTo(gStartPosition);
}
}
void Logstalgia::setBackground(vec3f background) {
this->background = background;
}
void Logstalgia::setFrameExporter(FrameExporter* exporter, int video_framerate) {
int fixed_framerate = video_framerate;
this->framecount = 0;
this->frameskip = 0;
//calculate appropriate tick rate for video frame rate
while(fixed_framerate<60) {
fixed_framerate += video_framerate;
this->frameskip++;
}
this->fixed_tick_rate = 1.0f / ((float) fixed_framerate);
this->frameExporter = exporter;
}
void Logstalgia::update(float t, float dt) {
//if exporting a video use a fixed tick rate rather than time based
if(frameExporter != 0) {
dt = fixed_tick_rate;
}
dt *= time_scale;
//have to manage runtime internally as we're messing with dt
runtime += dt;
logic(runtime, dt);
draw(runtime, dt);
//extract frames based on frameskip setting
//if frameExporter defined
if(frameExporter != 0) {
if(framecount % (frameskip+1) == 0) {
frameExporter->dump();
}
}
framecount++;
}
RequestBall* Logstalgia::findNearest(Paddle* paddle, const std::string& paddle_token) {
float min_dist = -1.0f;
RequestBall* nearest = 0;
for(std::list::iterator it = balls.begin(); it != balls.end(); it++) {
RequestBall* ball = *it;
//special case if failed response code
if(!ball->le->successful) {
continue;
}
if(ball->le->successful && !ball->hasBounced()
&& (gPaddleMode <= PADDLE_SINGLE
|| gPaddleMode == PADDLE_VHOST && ball->le->vhost == paddle_token
|| gPaddleMode == PADDLE_PID && ball->le->pid == paddle_token
)
) {
float dist = (paddle->getX() - ball->getX())/ball->speed;
if(min_dist<0.0f || distle->path;
std::string host = ball->le->hostname;
int nogroups = summGroups.size();
for(int i=0;isupportedString(url)) {
if(gHideURLPrefix) url = filterURLHostname(url);
summGroups[i]->removeString(url);
break;
}
}
ipSummarizer->removeString(host);
delete ball;
}
void Logstalgia::logic(float t, float dt) {
float sdt = dt*simu_speed;;
if(mousehide_timeout>0.0f) {
mousehide_timeout -= dt;
if(mousehide_timeout<0.0f) {
SDL_ShowCursor(false);
}
}
infowindow.hide();
if(end_reached && balls.empty()) {
appFinished = true;
return;
}
//if paused, dont move anything, only check what is under mouse
if(paused) {
for(std::map::iterator it= paddles.begin(); it!=paddles.end();it++) {
std::string paddle_token = it->first;
Paddle* paddle = it->second;
if(paddle->mouseOver(infowindow, mousepos)) {
break;
}
}
for(std::list::iterator it = balls.begin(); it != balls.end(); it++) {
RequestBall* ball = *it;
if(ball->mouseOver(infowindow, mousepos)) {
break;
}
}
if(!ipSummarizer->mouseOver(infowindow,mousepos)) {
int nogrps = summGroups.size();
for(int i=0;imouseOver(infowindow, mousepos)) break;
}
}
return;
}
//increment clock
elapsed_time += sdt;
currtime = starttime + (long)(elapsed_time);
//next will fast forward clock to the time of the next entry,
//if the next entry is in the future
if(next || gAutoSkip && balls.empty()) {
if(!queued_entries.empty()) {
LogEntry* le = queued_entries.front();
long entrytime = le->timestamp;
if(entrytime > currtime) {
elapsed_time = entrytime - starttime;
currtime = starttime + (long)(elapsed_time);
}
}
next = false;
}
//recalc spawn speed each second by
if(currtime != lasttime) {
//dont bother reading the log if we dont need to
if(queued_entries.empty() || queued_entries.back()->timestamp <= currtime) {
readLog();
}
profile_start("determine new entries");
int items_to_spawn=0;
for(std::list::iterator it = queued_entries.begin(); it != queued_entries.end(); it++) {
LogEntry* le = *it;
if(le->timestamp > currtime) break;
items_to_spawn++;
addStrings(le);
}
profile_stop();
//debugLog("items to spawn %d\n", items_to_spawn);
if(items_to_spawn > 0) {
profile_start("add new strings");
//re-summarize
ipSummarizer->summarize();
int nogrps = summGroups.size();
for(int i=0;isummarize();
}
profile_stop();
profile_start("add new entries");
float item_offset = 1.0 / (float) (items_to_spawn);
int item_no = 0;
while(!queued_entries.empty()) {
LogEntry* le = queued_entries.front();
if(le->timestamp > currtime) break;
float pos_offset = 1.0 - item_offset * (float) item_no++;
float start_offset = std::min(1.0f, pos_offset);
addBall(le, start_offset);
queued_entries.pop_front();
}
}
//update date
if(total_entries>0) {
char datestr[256];
char timestr[256];
struct tm* timeinfo = localtime ( &currtime );
strftime(datestr, 256, "%A, %B %d, %Y", timeinfo);
strftime(timestr, 256, "%X", timeinfo);
displaydate = datestr;
displaytime = timestr;
} else {
displaydate = "";
displaytime = "";
}
lasttime=currtime;
profile_stop();
} else {
//do small reads per frame if we havent buffered the next second
if(queued_entries.empty() || queued_entries.back()->timestamp <= currtime+1) {
readLog(50);
}
}
std::list inactivePaddles;
//update paddles
for(std::map::iterator it= paddles.begin(); it!=paddles.end();it++) {
std::string paddle_token = it->first;
Paddle* paddle = it->second;
if(gPaddleMode > PADDLE_SINGLE && !paddle->moving() && !paddle->visible()) {
bool token_match = false;
//are there any requests that will match this paddle?
for(std::list::iterator bit = balls.begin(); bit != balls.end();bit++) {
RequestBall* ball = *bit;
if( gPaddleMode == PADDLE_VHOST && ball->le->vhost == paddle_token
|| gPaddleMode == PADDLE_PID && ball->le->pid == paddle_token) {
token_match = true;
break;
}
}
//mark this paddle for deletion, continue
if(!token_match) {
inactivePaddles.push_back(paddle);
continue;
}
}
// find nearest ball to this paddle
if((recentre || !paddle->moving()) && balls.size()>0) {
recentre=false;
RequestBall* ball = findNearest(paddle, paddle_token);
if(ball!=0 && !(paddle->moving() && paddle->getTarget() == ball)) {
paddle->setTarget(ball);
}
}
//if still not moving, recentre
if(!paddle->moving()) {
recentre=true;
paddle->setTarget(0);
}
it->second->logic(sdt);
}
recentre = false;
profile_start("check ball status");
for(std::list::iterator it = balls.begin(); it != balls.end();) {
RequestBall* ball = *it;
highscore += ball->logic(dt);
if(ball->isFinished()) {
it = balls.erase(it);
removeBall(ball);
} else {
it++;
}
}
profile_stop();
profile_start("ipSummarizer logic");
ipSummarizer->logic(dt);
profile_stop();
profile_start("updateGroups logic");
updateGroups(dt);
profile_stop();
screen_blank_elapsed += dt;
if(screen_blank_elapsed-screen_blank_interval > screen_blank_period)
screen_blank_elapsed = 0.0f;
//update font alpha
font_alpha = 1.0f;
if(screen_blank_elapsed>screen_blank_interval) {
font_alpha = std::min(1.0f, (float) fabs(1.0f - (screen_blank_elapsed-screen_blank_interval)/(screen_blank_period*0.5)));
font_alpha *= font_alpha;
}
}
void Logstalgia::addGroup(std::string groupstr) {
std::vector groupdef;
Regex groupregex("^([^,]+),([^,]+),([^,]+)(?:,([^,]+))?$");
groupregex.match(groupstr, &groupdef);
vec3f colour(0.0f, 0.0f, 0.0f);
if(groupdef.size()>=3) {
std::string groupname = groupdef[0];
std::string groupregex = groupdef[1];
int percent = atoi(groupdef[2].c_str());
//check for optional colour param
if(groupdef.size()>=4) {
int col;
int r, g, b;
if(sscanf(groupdef[3].c_str(), "%02x%02x%02x", &r, &g, &b) == 3) {
colour = vec3f( r, g, b );
debugLog("r = %d, g = %d, b = %d\n", r, g, b);
colour /= 255.0f;
}
}
addGroup(groupname, groupregex, percent, colour);
}
}
void Logstalgia::addGroup(std::string grouptitle, std::string groupregex, int percent, vec3f colour) {
if(percent<0) return;
int remainpc = (int) ( ((float) remaining_space/total_space) * 100);
if(percent==0) {
percent=remainpc;
}
if(remainpcshowCount(true);
if(colour.length2() > 0.01f) {
summ->setColour(colour);
}
summGroups.push_back(summ);
remaining_space -= space;
}
void Logstalgia::updateGroups(float dt) {
int nogrps = summGroups.size();
for(int i=0;ilogic(dt);
}
}
void Logstalgia::drawGroups(float dt, float alpha) {
int nogrps = summGroups.size();
for(int i=0;idraw(dt, alpha);
}
}
void Logstalgia::draw(float t, float dt) {
if(appFinished) return;
if(!gDisableProgress) slider.logic(dt);
display.setClearColour(background);
display.clear();
glDisable(GL_FOG);
display.mode2D();
glDisable(GL_DEPTH_TEST);
glDisable(GL_CULL_FACE);
glDisable(GL_LIGHTING);
profile_start("draw ip summarizer");
ipSummarizer->draw(dt, font_alpha);
profile_stop();
profile_start("draw groups");
drawGroups(dt, font_alpha);
profile_stop();
profile_start("draw balls");
glEnable(GL_BLEND);
glEnable(GL_TEXTURE_2D);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glBindTexture(GL_TEXTURE_2D, balltex->textureid);
for(std::list::iterator it = balls.begin(); it != balls.end(); it++) {
(*it)->draw(dt);
}
profile_stop();
profile_start("draw response codes");
for(std::list::iterator it = balls.begin(); it != balls.end(); it++) {
RequestBall* r = *it;
if(gResponseCode && r->hasBounced()) {
r->drawResponseCode();
}
}
profile_stop();
glDisable(GL_TEXTURE_2D);
glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glEnable(GL_BLEND);
if(gPaddleMode != PADDLE_NONE) {
//draw paddles shadows
for(std::map::iterator it= paddles.begin(); it!=paddles.end();it++) {
it->second->drawShadow();
}
//draw paddles
for(std::map::iterator it= paddles.begin(); it!=paddles.end();it++) {
it->second->draw();
}
}
if(!gDisableGlow) {
glBlendFunc (GL_ONE, GL_ONE);
glEnable(GL_BLEND);
glEnable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D, glowtex->textureid);
for(std::list::iterator it = balls.begin(); it != balls.end(); it++) {
(*it)->drawGlow();
}
}
infowindow.draw();
glEnable(GL_BLEND);
glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glEnable(GL_TEXTURE_2D);
if(uimessage_timer>0.1f) {
glColor4f(1.0,1.0,uimessage_timer/3.0f,uimessage_timer/3.0f);
int mwidth = fontLarge.getWidth(uimessage.c_str());
fontLarge.draw(display.width/2 - mwidth/2, display.height/2 - 20, uimessage.c_str());
uimessage_timer-=dt;
}
if(gSplash>0.0f) {
int logowidth = fontLarge.getWidth("Logstalgia");
int logoheight = 105;
int cwidth = fontMedium.getWidth("Website Access Log Viewer");
int awidth = fontMedium.getWidth("(C) 2008 Andrew Caudwell");
vec2f corner(display.width/2 - logowidth/2 - 30.0f,
display.height/2 - 45);
float logo_alpha = std::min(1.0f, gSplash/3.0f);
float logo_bg = std::min(0.2f, gSplash/10.0f);
glDisable(GL_TEXTURE_2D);
glColor4f(0.0f, 0.5f, 1.0f, logo_bg);
glBegin(GL_QUADS);
glVertex2f(0.0f, corner.y);
glVertex2f(0.0f, corner.y + logoheight);
glVertex2f(display.width, corner.y + logoheight);
glVertex2f(display.width, corner.y);
glEnd();
glEnable(GL_TEXTURE_2D);
fontLarge.alignTop(true);
fontLarge.dropShadow(true);
glColor4f(1,1,1,logo_alpha);
fontLarge.draw(display.width/2 - logowidth/2,display.height/2 - 30, "Logstalgia");
glColor4f(0,1,1,logo_alpha);
fontLarge.draw(display.width/2 - logowidth/2,display.height/2 - 30, "Log");
glColor4f(1,1,1,logo_alpha);
fontMedium.draw(display.width/2 - cwidth/2,display.height/2 + 17, "Website Access Log Viewer");
fontMedium.draw(display.width/2 - awidth/2,display.height/2 + 37, "(C) 2008 Andrew Caudwell");
gSplash-=dt;
}
if(!gDisableProgress) slider.draw(dt);
glColor4f(1,1,1,font_alpha);
if(info) {
fontMedium.print(2,2, "FPS %d", (int) fps);
fontMedium.print(2,19,"Balls %03d", balls.size());
fontMedium.print(2,36,"Queue %03d", queued_entries.size());
fontMedium.print(2,53,"Paddles %03d", paddles.size());
} else {
fontMedium.draw(2,2, displaydate.c_str());
fontMedium.draw(2,19, displaytime.c_str());
}
glColor4f(1,1,1,font_alpha);
int counter_width = fontLarge.getWidth("00000000");
fontLarge.alignTop(false);
fontLarge.print(display.width-10-counter_width,display.height-10, "%08d", highscore);
}
logstalgia-1.0.3/src/custom.cpp 0000644 0002031 0002031 00000003561 11526610646 016274 0 ustar andrewc andrewc #include "custom.h"
//timestamp
//hostname
//path
//response_code
//response_size
//success (1|0)
//response_colour
//referrer
//user_agent
//virtual_host
//pid
Regex custom_entry("^([^|]*)\\|([^|]*)\\|([^|]*)\\|([^|]*)\\|([^|]*)(?:\\|([^|]*))?(?:\\|#?([^|]*))?(?:\\|([^|]*))?(?:\\|([^|]*))?(?:\\|([^|]*))?(?:\\|([^|]*))?$");
CustomAccessLog::CustomAccessLog() {
}
bool CustomAccessLog::parseLine(std::string& line, LogEntry& entry) {
std::vector matches;
if(!custom_entry.match(line, &matches)) return false;
entry.timestamp = atol(matches[0].c_str());
entry.hostname = matches[1];
entry.path = matches[2];
entry.response_code = matches[3];
entry.response_size = atol(matches[4].c_str());
//optional fields
//success 1 or 0
if(matches.size()>5) {
std::string success = matches[5];
if(success.size()==0 || success.size()==1 && success[0] == ' ') {
entry.setSuccess();
} else {
entry.successful = atoi(success.c_str())==1 ? true : false;
}
} else entry.setSuccess();
//response colour
if(matches.size()>6) {
std::string colour = matches[6];
int r, g, b;
if(colour.size()>0 &&
sscanf(colour.c_str(), "%02x%02x%02x", &r, &g, &b) == 3) {
entry.response_colour = vec3f( r, g, b );
entry.response_colour /= 255.0f;
} else {
entry.setResponseColour();
}
} else entry.setResponseColour();
//referrer
if(matches.size()>7) {
entry.referrer = matches[7];
}
//user agent
if(matches.size()>8) {
entry.user_agent = matches[8];
}
//vhost
if(matches.size()>9) {
entry.vhost = matches[9];
}
//pid or some other identifier
if(matches.size()>10) {
entry.pid = matches[10];
}
return entry.validate();
}
logstalgia-1.0.3/src/logentry.h 0000644 0002031 0002031 00000003010 11526610646 016257 0 ustar andrewc andrewc /*
Copyright (C) 2008 Andrew Caudwell (acaudwell@gmail.com)
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
3 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, see .
*/
#ifndef LOGENTRY_H
#define LOGENTRY_H
#include
#include
#include
#include
#include "core/sdlapp.h"
#include "core/vectors.h"
#include "core/regex.h"
extern bool gMask;
class LogEntry {
private:
std::string maskHostname(std::string hostname);
public:
LogEntry();
bool validate();
void setSuccess();
void setResponseColour();
long timestamp;
std::string hostname;
std::string vhost;
std::string path;
std::string pid;
std::string response_code;
long response_size;
std::string referrer;
std::string user_agent;
vec3f response_colour;
bool successful;
};
class AccessLog {
public:
AccessLog();
virtual ~AccessLog() {};
virtual bool parseLine(std::string& line, LogEntry& entry) {};
};
#endif
logstalgia-1.0.3/src/ncsa.cpp 0000644 0002031 0002031 00000007543 11526610646 015712 0 ustar andrewc andrewc /*
Copyright (C) 2010 Andrew Caudwell (acaudwell@gmail.com)
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
3 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, see .
*/
#include "ncsa.h"
const char* ls_ncsa_months[] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug" , "Sep", "Oct", "Nov", "Dec" };
Regex ls_ncsa_entry_start("^(?:([^ ]+) )?([^ ]+) +[^ ]+ +([^ ]+) +\\[(.*?)\\] +(.*)$");
Regex ls_ncsa_entry_date("(\\d+)/(\\d+|[A-Za-z]+)/(\\d+):(\\d+):(\\d+):(\\d+) ([+-])(\\d+)");
Regex ls_ncsa_entry_request("\"([^ ]+) +([^ ]+) +([^ ]+)\" +([^ ]+) +([^\\s+]+)(.*)");
Regex ls_ncsa_entry_agent("(?: +\"([^\"]+)\" +\"([^\"]+)\")?(?: +\([^ ]+))?");
NCSALog::NCSALog() {
}
//parse NCSA format access.log entry into components
bool NCSALog::parseLine(std::string& line, LogEntry& entry) {
std::vector matches;
ls_ncsa_entry_start.match(line, &matches);
if(matches.size()!=5) {
return 0;
}
//get details
entry.vhost = matches[0];
entry.hostname = matches[1];
//entry.username = matches[1];
//parse timestamp
struct tm time_str;
int day, month, year, hour, minute, second;
std::string request_str = matches[4];
std::string datestr = matches[3];
matches.clear();
ls_ncsa_entry_date.match(datestr, &matches);
if(matches.size()!=8) {
return 0;
}
day = atoi(matches[0].c_str());
month = atoi(matches[1].c_str());
year = atoi(matches[2].c_str());
hour = atoi(matches[3].c_str());
minute = atoi(matches[4].c_str());
second = atoi(matches[5].c_str());
if(month) {
month--;
} else {
//parse non numeric month
for(int i=0;i<12;i++) {
if(strcmp(matches[1].c_str(), ls_ncsa_months[i])==0) {
month=i;
break;
}
}
}
//could not parse month (range 0-11 as used by mktime)
if(month<0 || month>11) return 0;
//convert zone to utc offset
int tz_hour = atoi(matches[7].substr(0,2).c_str());
int tz_min = atoi(matches[7].substr(2,2).c_str());
int tz_offset = tz_hour * 3600 + tz_min * 60;
if(matches[6] == "-") {
tz_offset = -tz_offset;
}
time_str.tm_year = year - 1900;
time_str.tm_mon = month;
time_str.tm_mday = day;
time_str.tm_hour = hour;
time_str.tm_min = minute;
time_str.tm_sec = second;
time_str.tm_isdst = -1;
entry.timestamp = mktime(&time_str);
//apply utc offset
entry.timestamp -= tz_offset;
matches.clear();
ls_ncsa_entry_request.match(request_str, &matches);
if(matches.size() < 5) {
return 0;
}
// entry.method = matches[0];
entry.path = matches[1];
// entry.protocol = matches[2];
entry.response_code = matches[3].c_str();
entry.response_size = atol(matches[4].c_str());
if(matches.size() > 5) {
std::string agentstr = matches[5];
matches.clear();
ls_ncsa_entry_agent.match(agentstr, &matches);
if(matches.size()==3) {
entry.referrer = matches[0];
entry.user_agent = matches[1];
entry.pid = matches[2];
}
}
//successful if response code less than 400
int code = atoi(entry.response_code.c_str());
entry.setSuccess();
entry.setResponseColour();
return entry.validate();
}
logstalgia-1.0.3/src/summarizer.h 0000644 0002031 0002031 00000007340 11526610646 016624 0 ustar andrewc andrewc /*
Copyright (C) 2008 Andrew Caudwell (acaudwell@gmail.com)
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
3 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, see .
*/
#ifndef SUMMARIZER_H
#define SUMMARIZER_H
#include
#include "core/stringhash.h"
#include "core/fxfont.h"
#include "core/regex.h"
#include "textarea.h"
extern const char* summ_wildcard;
class SummNode;
class SummUnit {
public:
SummNode* source;
int words;
int refs;
std::string str;
bool truncated;
bool exceptions;
std::vector expanded;
void prependChar(char c);
void buildSummary();
SummUnit();
SummUnit(SummNode* source, bool truncated = false, bool exceptions = false);
};
class SummNode {
public:
SummNode* parent;
SummNode();
SummNode(const std::string& str, size_t offset, SummNode* parent);
char c;
int words;
int refs;
bool is_root;
std::vector children;
std::vector exception;
void debug(int indent = 0);
bool addWord(const std::string& str, size_t offset);
bool removeWord(const std::string& str, size_t offset);
void expand(std::string prefix, std::vector& expansion, bool exceptions);
int summarize(std::vector& strvec, int no_words);
};
class SummItem {
vec2f dest;
vec2f oldpos;
bool moving;
float elapsed;
float eta;
float target_x;
vec3f* icol;
bool showcount;
FXFont font;
public:
bool departing;
bool destroy;
std::string displaystr;
int width;
SummUnit unit;
vec4f colour;
vec2f pos;
void setDest(vec2f dest, bool depart = false);
void logic(float dt);
void draw(float alpha);
void updateUnit(SummUnit& unit);
SummItem(SummUnit unit, vec2f pos, vec2f dest, float target_x, vec3f* icol, FXFont font, bool showcount);
};
class Summarizer {
std::vector strings;
std::list items;
SummNode root;
vec3f* item_colour;
float pos_x;
int max_strings;
int font_gap;
FXFont font;
bool showcount;
bool right;
bool mouseover;
bool changed;
float incrementf;
float top_gap, bottom_gap;
float refresh_delay;
float refresh_elapsed;
std::string title;
Regex matchre;
public:
Summarizer(FXFont font, float x, float top_gap = 0.0f, float bottom_gap = 0.0f, float refresh_delay = 2.0f,
std::string matchstr = ".*", std::string title="");
~Summarizer();
bool mouseOver(TextArea& textarea, vec2f mouse);
void mouseOut();
bool isColoured();
void showCount(bool showcount);
void setColour(vec3f col);
vec3f getColour();
bool supportedString(std::string& str);
void removeString(const std::string& str);
void addString(const std::string& str);
const std::string& getBestMatchStr(const std::string& str) const;
int getBestMatchIndex(const std::string& str) const;
float getPosY(const std::string& str) const;
float getMiddlePosY(const std::string& str) const;
float calcPosY(int i) const;
void summarize();
void recalc_display();
void logic(float dt);
void draw(float dt, float alpha);
};
#endif
logstalgia-1.0.3/src/logentry.cpp 0000644 0002031 0002031 00000005523 11526610646 016625 0 ustar andrewc andrewc /*
Copyright (C) 2008 Andrew Caudwell (acaudwell@gmail.com)
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
3 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, see .
*/
#include "logentry.h"
bool gMask = true;
//AccessLog
AccessLog::AccessLog() {
}
//LogEntry
LogEntry::LogEntry() {
timestamp = 0;
response_size = 0;
successful = false;
response_colour = vec3f(1.0, 0.0, 0.0);
}
Regex logentry_hostname_parts("([^.]+)(?:\\.([^.]+))?(?:\\.([^.]+))?(?:\\.([^.]+))?(?:\\.([^.]+))?(?:\\.([^.]+))?(?:\\.([^.]+))?(?:\\.([^.]+))?$");
std::string LogEntry::maskHostname(std::string hostname) {
std::vector parts;
logentry_hostname_parts.match(hostname, &parts);
//if only 1-2 parts, or 3 parts and a 2 character suffix, pass through unchanged
if(parts.size()<=2 || parts.size()==3 && parts[parts.size()-1].size()==2)
return hostname;
int num = atoi(parts[parts.size()-1].c_str());
std::string output;
//if last element is numeric, assume it is a numbered ip address
//(ie 192.168.0.1 => 192.168.0-)
if(num!=0) {
for(size_t i=0;i0) output += '.';
output += parts[i];
}
output += '-';
return output;
}
//hide the first element
//(ie dhcp113.web.com -> web.com
for(size_t i=1;i1) output += '.';
output += parts[i];
}
return output;
}
void LogEntry::setSuccess() {
int code = atoi(response_code.c_str());
successful = (code<400) ? true : false;
}
void LogEntry::setResponseColour() {
int code = atoi(response_code.c_str());
//set response colour
if(code<200) {
response_colour = vec3f(0.0f, 1.0f, 0.5f);
}
else if(code>= 200 && code < 300) {
response_colour = vec3f(1.0f, 1.0f, 0.0f);
}
else if(code>= 300 && code < 400) {
response_colour = vec3f(1.0f, 0.5f, 0.0f);
}
else {
response_colour = vec3f(1.0f, 0.0f, 0.0f);
}
}
bool LogEntry::validate() {
if(pid == "-") pid = "";
if(referrer == "-") referrer = "";
if(hostname.size()==0) return false;
if(gMask) {
hostname = maskHostname(hostname);
}
if(path.size()==0) return false;
if(timestamp == 0) return false;
return true;
}
logstalgia-1.0.3/src/paddle.h 0000644 0002031 0002031 00000003275 11526610646 015662 0 ustar andrewc andrewc /*
Copyright (C) 2008 Andrew Caudwell (acaudwell@gmail.com)
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
3 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, see .
*/
#ifndef PADDLE_H
#define PADDLE_H
#include "core/vectors.h"
#include "core/sdlapp.h"
#include "core/stringhash.h"
#include "requestball.h"
#define PADDLE_NONE 0
#define PADDLE_SINGLE 1
#define PADDLE_PID 2
#define PADDLE_VHOST 3
extern int gPaddleMode;
class Paddle {
protected:
vec2f pos;
RequestBall* target;
std::string token;
vec3f token_colour;
vec4f default_colour;
vec4f proc_colour;
vec4f colour;
vec4f lastcol;
vec4f nextcol;
int width, height;
int start_y;
int dest_y;
float dest_eta;
float dest_elapsed;
public:
Paddle(vec2f pos, vec4f colour, std::string token);
~Paddle();
void moveTo(int y, float eta, vec4f nextcol);
bool moving();
bool visible();
void setTarget(RequestBall* target);
RequestBall* getTarget();
void logic(float dt);
bool mouseOver(TextArea& textarea, vec2f& mouse);
void drawShadow();
void draw();
float getX();
float getY();
};
#endif
logstalgia-1.0.3/src/ball.cpp 0000644 0002031 0002031 00000012705 11526610646 015674 0 ustar andrewc andrewc /*
Copyright (C) 2008 Andrew Caudwell (acaudwell@gmail.com)
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
3 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, see .
*/
#include "ball.h"
//Line
Line::Line(vec2f start, vec2f end) {
this->start = start;
this->end = end;
}
Line::~Line() {
}
// check if line intersects the plane of another line
bool Line::intersects(Line& l, vec2f *p) {
vec2f a = end - start;
vec2f b = l.end - l.start;
float d = a.x*b.y - a.y * b.x;
//parallel test
if (!d) return false;
vec2f w = start - l.start;
//check if outside either line segment
float s = b.x * w.y - b.y * w.x;
float sd = s/d;
if (sd < 0.0f || sd > 1.0f) return false;
float t = a.x * w.y - a.y * w.x;
float td = t/d;
if (td < 0.0f || td > 1.0f) return false;
//calculate intersect
if(p != 0) *p = a * sd + start;
return true;
}
//Projected Ball
ProjectedBall::ProjectedBall() {
}
ProjectedBall::ProjectedBall(const vec2f& pos, const vec2f& vel, const vec3f& colour, int dest_x, float eta, float size, float speed) {
init(pos, vel, colour, dest_x, eta, size, speed);
}
void ProjectedBall::init(const vec2f& pos, const vec2f& vel, const vec3f& colour, int dest_x, float eta, float size, float speed) {
this->pos = pos;
this->vel = vel;
this->colour = colour;
this->speed = speed;
this->size = size;
this->dest_x = dest_x;
this->start_x = (int) pos.x;
this->eta = eta;
this->has_bounced=0;
no_bounce = 0;
project();
}
ProjectedBall::~ProjectedBall() {
}
/*project path of the ball
as a series of line segments
*/
void ProjectedBall::project() {
elapsed = 0.0f;
progress = 0.0f;
points.clear();
vec2f p = pos;
points.push_back(p);
//project current position and direction until it hits a wall or crosses dest_x
Line finish(vec2f(dest_x, 0), vec2f(dest_x, display.height));
Line top(vec2f(0,0), vec2f(display.width, 0));
Line bottom(vec2f(0,display.height), vec2f(display.width, display.height));
//project far enough to cross a side of the screen
float inc = display.width*2.0f;
bool finished=false;
vec2f currvel = vel;
total_length=0;
line_lengths.clear();
while(!finished) {
Line proj(p, p + currvel*inc);
/*
debugLog("proj = (%.2f, %.2f), (%.2f, %.2f)\n", proj.start.x, proj.start.y, proj.end.x, proj.end.y);
debugLog("finish = (%.2f, %.2f), (%.2f, %.2f)\n", finish.start.x, finish.start.y, finish.end.x, finish.end.y);
debugLog("top = (%.2f, %.2f), (%.2f, %.2f)\n", top.start.x, top.start.y, top.end.x, top.end.y);
debugLog("bottom = (%.2f, %.2f), (%.2f, %.2f)\n", bottom.start.x, bottom.start.y, bottom.end.x, bottom.end.y);
*/
vec2f intersect;
//find nearest intersected plane
if(proj.intersects(finish, &intersect)) {
finished=true;
}
else if(proj.intersects(bottom, &intersect)) {
currvel.y = -currvel.y;
intersect.y -= 1.0f;
} else if(proj.intersects(top, &intersect)) {
currvel.y = -currvel.y;
intersect.y += 1.0f;
} else {
break;
}
float length = (intersect-p).length();
p = intersect;
points.push_back(intersect);
line_lengths.push_back(length);
total_length +=length;
}
}
bool ProjectedBall::isFinished() const {
return has_bounced && elapsed>=eta;
}
void ProjectedBall::bounce() {
if(has_bounced) return;
pos = finish();
if(!no_bounce) {
vel.x = -vel.x;
dest_x = 0;
} else {
dest_x = display.width;
}
project();
has_bounced=true;
}
bool ProjectedBall::arrived() const {
return elapsed>=eta;
}
void ProjectedBall::setElapsed(float e) {
elapsed =e;
}
float ProjectedBall::arrivalTime() {
return (eta-elapsed)/speed;
}
float ProjectedBall::getProgress() const {
return progress;
}
void ProjectedBall::dontBounce() {
no_bounce=1;
}
void ProjectedBall::logic(float dt) {
elapsed += (dt * speed);
progress = elapsed / eta;
if(progress>1.0f) {
if(!has_bounced) {
bounce();
return;
}
return;
}
//number of lines
int nolines = points.size()-1;
//progress
float currposf = progress * total_length;
int pointno = 0;
float len=0;
while(pointno=nolines) {
if(!has_bounced) {
bounce();
return;
}
return;
}
vec2f from = points[pointno];
vec2f to = points[pointno+1];
float linepos = (currposf - len)/line_lengths[pointno];
this->pos = from + ((to-from)*linepos);
}
vec2f ProjectedBall::finish() {
return points[points.size()-1];
}
float ProjectedBall::getX() {
return pos.x;
}
logstalgia-1.0.3/src/logstalgia.h 0000644 0002031 0002031 00000010511 11526610646 016546 0 ustar andrewc andrewc /*
Copyright (C) 2008 Andrew Caudwell (acaudwell@gmail.com)
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
3 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, see .
*/
#ifndef LOGSTALGIA_H
#define LOGSTALGIA_H
#define LOGSTALGIA_VERSION "1.0.3"
#ifdef _WIN32
#include "windows.h"
#endif
#include "core/display.h"
#include "core/fxfont.h"
#include "core/stringhash.h"
#include "core/seeklog.h"
#include "ncsa.h"
#include "custom.h"
#include "logentry.h"
#include "paddle.h"
#include "requestball.h"
#include "summarizer.h"
#include "textarea.h"
#include "slider.h"
#include "ppm.h"
#include
#include
#include
#include
#include
#include