re-importing E after cvs failure to comply with orders... thus it DIED!

SVN revision: 37
This commit is contained in:
Carsten Haitzler 1999-08-17 22:56:46 +00:00
commit c79f01a1d9
234 changed files with 77383 additions and 0 deletions

16
.cvsignore Normal file
View File

@ -0,0 +1,16 @@
Makefile
Makefile.in
aclocal.m4
config.status
config.log
config.cache
configure
econfig.h
econfig.h.in
stamp-h
stamp-h.in
confdefs.h
config.sub
ltconfig
ltmain.sh
config.guess

68
AUTHORS Normal file
View File

@ -0,0 +1,68 @@
The Rasterman: <raster@rasterman.com> <raster@redhat.com>
<raster@zip.com.au>
<raster@enlightenment.org>
aka. Carsten Haitzler
Mandrake: <mandrake@mandrake.net>
<mandrake@enlightenment.org>
<mandrake@lobotomy.com>
aka. Geoff Harrison
-------------- CONTRIBUTORS: -----------------------------------------------
All code contributed by contributors remains copyright to them respectively
if they wish to retain copyright. it is up to the authors of patches and
contributions to clearly mark their contributions with their name, email and
date in comments if they wish to retain copyright, otherwise it is assumed
to be transferred to the main E source body.
A BIG thanks to all those who have submitted patches:
Troy Pesola: <pesoltr@network.com>
For contributing several patches, both to the current and
previous revisions of E
Chutt: <ijr@po.cwru.edu>
aka. Isaac Richards
Contributed a patch for use with esound that lowered
the RSS by around 200k with the default theme.
Owen Taylor <otaylor@redhat.com>
icccm widthdraw WM_STATE patch to fix some java endless loops
Sung-Hyun Nam <namsh@lgic.co.kr>
Fnlib OR X fonts used in text classes.
Kimball Thurston <kimball@sgrail.com>
Fixes for cross-platform support on IRIX
Michael Kellen <michael@agn.physics.montana.edu>
For sound patches..... :)
Stalyn <add mail here>
For dock support.
Frederic Devernay <devernay@istar.fr>
Patch for Session managemend IFDEF.
Felix Bellaby <felix@pooh.u-net.com>
LOTs of useful Session Management related code.
Michael Jennings (KainX) <mej@eterm.org>
lots of useful patches :)
Christian Kreibich <kreibich@informatik.tu-muenchen.de>
several minor patches some of which were the dox customisable
color patch, shading patch, and some more.. :)
Peter Kjellerstedt <peter.kjellerstedt@axis.com>
for finding a bug in theme preparse loaded files.
And others whose names we probably forgot to add (email us and we'll put you
in here)

18
COPYING Normal file
View File

@ -0,0 +1,18 @@
Copyright (C) 1999 Carsten Haitzler and various contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

1592
ChangeLog Normal file

File diff suppressed because it is too large Load Diff

0
FAQ Normal file
View File

182
INSTALL Normal file
View File

@ -0,0 +1,182 @@
Basic Installation
==================
These are generic installation instructions.
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
those values to create a `Makefile' in each directory of the package.
It may also create one or more `.h' files containing system-dependent
definitions. Finally, it creates a shell script `config.status' that
you can run in the future to recreate the current configuration, a file
`config.cache' that saves the results of its tests to speed up
reconfiguring, and a file `config.log' containing compiler output
(useful mainly for debugging `configure').
If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail
diffs or instructions to the address given in the `README' so they can
be considered for the next release. If at some point `config.cache'
contains results you don't want to keep, you may remove or edit it.
The file `configure.in' is used to create `configure' by a program
called `autoconf'. You only need `configure.in' if you want to change
it or regenerate `configure' using a newer version of `autoconf'.
The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system. If you're
using `csh' on an old version of System V, you might need to type
`sh ./configure' instead to prevent `csh' from trying to execute
`configure' itself.
Running `configure' takes awhile. While running, it prints some
messages telling which features it is checking for.
2. Type `make' to compile the package.
3. Optionally, type `make check' to run any self-tests that come with
the package.
4. Type `make install' to install the programs and any data files and
documentation.
5. You can remove the program binaries and object files from the
source code directory by typing `make clean'. To also remove the
files that `configure' created (so you can compile the package for
a different kind of computer), type `make distclean'. There is
also a `make maintainer-clean' target, but that is intended mainly
for the package's developers. If you use it, you may have to get
all sorts of other programs in order to regenerate files that came
with the distribution.
Compilers and Options
=====================
Some systems require unusual options for compilation or linking that
the `configure' script does not know about. You can give `configure'
initial values for variables by setting them in the environment. Using
a Bourne-compatible shell, you can do that on the command line like
this:
CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
Or on systems that have the `env' program, you can do it like this:
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
Compiling For Multiple Architectures
====================================
You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
own directory. To do this, you must use a version of `make' that
supports the `VPATH' variable, such as GNU `make'. `cd' to the
directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'.
If you have to use a `make' that does not supports the `VPATH'
variable, you have to compile the package for one architecture at a time
in the source code directory. After you have installed the package for
one architecture, use `make distclean' before reconfiguring for another
architecture.
Installation Names
==================
By default, `make install' will install the package's files in
`/usr/local/bin', `/usr/local/man', etc. You can specify an
installation prefix other than `/usr/local' by giving `configure' the
option `--prefix=PATH'.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
give `configure' the option `--exec-prefix=PATH', the package will use
PATH as the prefix for installing programs and libraries.
Documentation and other data files will still use the regular prefix.
In addition, if you use an unusual directory layout you can give
options like `--bindir=PATH' to specify different values for particular
kinds of files. Run `configure --help' for a list of the directories
you can set and what kinds of files go in them.
If the package supports it, you can cause programs to be installed
with an extra prefix or suffix on their names by giving `configure' the
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
Optional Features
=================
Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
is something like `gnu-as' or `x' (for the X Window System). The
`README' should mention any `--enable-' and `--with-' options that the
package recognizes.
For packages that use the X Window System, `configure' can usually
find the X include and library files automatically, but if it doesn't,
you can use the `configure' options `--x-includes=DIR' and
`--x-libraries=DIR' to specify their locations.
Specifying the System Type
==========================
There may be some features `configure' can not figure out
automatically, but needs to determine by the type of host the package
will run on. Usually `configure' can figure that out, but if it prints
a message saying it can not guess the host type, give it the
`--host=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name with three fields:
CPU-COMPANY-SYSTEM
See the file `config.sub' for the possible values of each field. If
`config.sub' isn't included in this package, then this package doesn't
need to know the host type.
If you are building compiler tools for cross-compiling, you can also
use the `--target=TYPE' option to select the type of system they will
produce code for and the `--build=TYPE' option to select the type of
system on which you are compiling the package.
Sharing Defaults
================
If you want to set default values for `configure' scripts to share,
you can create a site shell script called `config.site' that gives
default values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script.
A warning: not all `configure' scripts look for a site script.
Operation Controls
==================
`configure' recognizes the following options to control how it
operates.
`--cache-file=FILE'
Use and save the results of the tests in FILE instead of
`./config.cache'. Set FILE to `/dev/null' to disable caching, for
debugging `configure'.
`--help'
Print a summary of the options to `configure', and exit.
`--quiet'
`--silent'
`-q'
Do not print messages saying which checks are being made. To
suppress all normal output, redirect it to `/dev/null' (any error
messages will still be shown).
`--srcdir=DIR'
Look for the package's source code in directory DIR. Usually
`configure' can determine that directory automatically.
`--version'
Print the version of Autoconf used to generate the `configure'
script, and exit.
`configure' also accepts some other, not widely useful, options.

100
IPC.todo Normal file
View File

@ -0,0 +1,100 @@
IPC checklist:
( ) - not done
(*) - done
--------------
help:
(*) - basic command list
(this could use some better formatting)
(*) - extended command list
(*) - individual command help
--------------
(*) version information
--------------
(*) Copyright information
--------------
(*) Autosave toggle
--------------
(*) Default Theme Selector
--------------
(*) theme lister
--------------
(*) restart command (also restart_wm, restart_theme)
--------------
(*) exit command
--------------
(*) Desktop/area changers
--------------
(*) Desktop/area number settings
--------------
(*) icons toggle
--------------
(*) focus mode selector
--------------
(*) focus advanced options settings
--------------
(*) window/client lister
--------------
(*) move mode selector
--------------
(*) resize mode selector
--------------
(*) audio toggle
--------------
( ) create / delete / modify imageclasses
--------------
( ) create / delete / modify actionclasses
--------------
( ) create / delete / modify "keybindings"
--------------
( ) create / delete / modify "mousebindings"
--------------
(*) create / delete / modify soundclasses
--------------
( ) create / delete / modify borderpart
--------------
( ) create / delete / modify border
--------------
( ) add / change / delete background
--------------
(*) toggle/set autoraise timeout
--------------
(*) toggle/set tooltip timeout
--------------
(*) toggle/set window placement mode
--------------
(*) toggle/set dragbar mode
--------------
(*) toggle/set sliding method / speed
--------------
(*) toggle/set window shading speed
--------------
(*) toggle/set edge resistance speed
--------------
(*) set/retreive focused window
--------------
(*) toggle menu animation
--------------
(*) toggle active pager
--------------
(*) toggle active network
--------------
window operations:
(*) close
(*) annihilate
(*) iconify
(*) shade
(*) stick
(*) width/height/size toggles
(*) border selector
(*) desk/area selector
(*) raise/lower
(*) move/resize
(*) move/resize relative
(*) focus
--------------
(*) Pop up a dialog box
--------------
( ) Pop up a more complicated input box and get results

7
Makefile.am Normal file
View File

@ -0,0 +1,7 @@
SUBDIRS = \
dox \
eesh \
epp \
src
EXTRA_DIST = e.spec configure configure.in TODO econfig.h.in

15
NEWS Normal file
View File

@ -0,0 +1,15 @@
Wed May 13 21:03:23 EDT 1998
Moved everything to autoconf/automake
Sat May 16 12:23:30 EDT 1998
Packaged up a snapshot
Sat May 16 20:42:22 EDT 1998
Packaged up a snapshot
Thu Jul 1 14:20:31 PDT 1999
Did stuff

16
README Normal file
View File

@ -0,0 +1,16 @@
-------------------------------------------------------------------------------
E N L I G H T E N M E N T - CVS VERSION IN DEVELOPMENT.
-------------------------------------------------------------------------------
this is a test.
Welcome to Enlightenment 0.16.
This version is currently only available via CVS, and thus there isn't
any help available. try asking for help online in #E on EFNet (irc)
the current CVSROOT is
:pserver:anonymous@cvs.on.openprojects.net:/cvs/enlightenment
the password is blank (just hit return when prompted)

51
TODO Normal file
View File

@ -0,0 +1,51 @@
----------------
FEATURES to ADD:
----------------
(*) extend IPC
(*) focus switching options
(*) icon revisiting
(*) containers
(*) button strips and joints
(*) network file retreival via http and ftp
(*) automatic-upgrade paths
(*) upgrade notification
(*) snapable and then selectable multiple configs
(*) filemanager in E (Xdnd)
(*) iconbox (also transparent iconbox)
(*) panel - like dock app containers (redo dock apps and an api for them)
(*) widgets (slider, scrollbar, cyclebutton) - fix tables in tables
fix rowspan for table.
(*) optimse menu loading when it has icons.
(*) FX api needs expanding with fx parameer structs and possible gui for them
(*) sound on focus change
(*) add support for icon miniature elements for window borders etc. (need to
munge this out of eirhter the icon pixmap, or the KDE hint if there - also
add hints for apps to be able to set 24bit image data to make it easier
for scaling etc.)
(*) add support for app defined border elements
(*) settigns dialogs need to autoarrange not be centered
------------
BUGS to FIX:
------------
(*) autoarrange needs to better handle "no space left on display" rather than
just putting window int he middle (and still needs to avoid panel etc.)
(*) dragbar doesn't unpress when you release mouse button 2/3
(*) focus code cleanup -- context_ewin vs focuswin vs realfocuswin
(*) edge resistance while in click to focus - window from bottom will appear on
the top when flipping.
(*) wow, dox seems to chew up memory for no good reason.
7197 mandrake 0 0 15788 8096 496 S 0 0.0 12.8 0:03 dox
287 mandrake 2 0 1868 1356 768 S 0 0.3 2.1 0:14 enlightenmen
it starts out at like 2.7 megs and somehow grows to 16. memory leak? naah
:) gains about 300-500k every time I change pages, indefinitely. never
frees the memory, still gains when I visit a page I've already been to.
------------
FIXED BUGS:
------------

18
acconfig.h Normal file
View File

@ -0,0 +1,18 @@
#undef ENLIGHTENMENT_VERSION
#undef HAVE_STDARGS
#undef HAVE_LIBESD
#undef HAVE_SM
#undef ENLIGHTENMENT_MAJOR
#undef ENLIGHTENMENT_MINOR
#undef ENLIGHTENMENT_MICRO
#undef AUTOUPGRADE
#undef WITH_TARTY_WARP

164
acinclude.m4 Normal file
View File

@ -0,0 +1,164 @@
# Configure paths for ESD
# Manish Singh 98-9-30
# stolen back from Frank Belew
# stolen from Manish Singh
# Shamelessly stolen from Owen Taylor
dnl AM_PATH_ESD([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
dnl Test for ESD, and define ESD_CFLAGS and ESD_LIBS
dnl
AC_DEFUN(AM_PATH_ESD,
[dnl
dnl Get the cflags and libraries from the esd-config script
dnl
AC_ARG_WITH(esd-prefix,[ --with-esd-prefix=PFX Prefix where ESD is installed (optional)],
esd_prefix="$withval", esd_prefix="")
AC_ARG_WITH(esd-exec-prefix,[ --with-esd-exec-prefix=PFX Exec prefix where ESD is installed (optional)],
esd_exec_prefix="$withval", esd_exec_prefix="")
AC_ARG_ENABLE(esdtest, [ --disable-esdtest Do not try to compile and run a test ESD program],
, enable_esdtest=yes)
if test x$esd_exec_prefix != x ; then
esd_args="$esd_args --exec-prefix=$esd_exec_prefix"
if test x${ESD_CONFIG+set} != xset ; then
ESD_CONFIG=$esd_exec_prefix/bin/esd-config
fi
fi
if test x$esd_prefix != x ; then
esd_args="$esd_args --prefix=$esd_prefix"
if test x${ESD_CONFIG+set} != xset ; then
ESD_CONFIG=$esd_prefix/bin/esd-config
fi
fi
AC_PATH_PROG(ESD_CONFIG, esd-config, no)
min_esd_version=ifelse([$1], ,0.2.7,$1)
AC_MSG_CHECKING(for ESD - version >= $min_esd_version)
no_esd=""
if test "$ESD_CONFIG" = "no" ; then
no_esd=yes
else
ESD_CFLAGS=`$ESD_CONFIG $esdconf_args --cflags`
ESD_LIBS=`$ESD_CONFIG $esdconf_args --libs`
esd_major_version=`$ESD_CONFIG $esd_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
esd_minor_version=`$ESD_CONFIG $esd_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
esd_micro_version=`$ESD_CONFIG $esd_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
if test "x$enable_esdtest" = "xyes" ; then
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $ESD_CFLAGS"
LIBS="$LIBS $ESD_LIBS"
dnl
dnl Now check if the installed ESD is sufficiently new. (Also sanity
dnl checks the results of esd-config to some extent
dnl
rm -f conf.esdtest
AC_TRY_RUN([
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <esd.h>
char*
my_strdup (char *str)
{
char *new_str;
if (str)
{
new_str = malloc ((strlen (str) + 1) * sizeof(char));
strcpy (new_str, str);
}
else
new_str = NULL;
return new_str;
}
int main ()
{
int major, minor, micro;
char *tmp_version;
system ("touch conf.esdtest");
/* HP/UX 9 (%@#!) writes to sscanf strings */
tmp_version = my_strdup("$min_esd_version");
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
printf("%s, bad version string\n", "$min_esd_version");
exit(1);
}
if (($esd_major_version > major) ||
(($esd_major_version == major) && ($esd_minor_version > minor)) ||
(($esd_major_version == major) && ($esd_minor_version == minor) && ($esd_micro_version >= micro)))
{
return 0;
}
else
{
printf("\n*** 'esd-config --version' returned %d.%d.%d, but the minimum version\n", $esd_major_version, $esd_minor_version, $esd_micro_version);
printf("*** of ESD required is %d.%d.%d. If esd-config is correct, then it is\n", major, minor, micro);
printf("*** best to upgrade to the required version.\n");
printf("*** If esd-config was wrong, set the environment variable ESD_CONFIG\n");
printf("*** to point to the correct copy of esd-config, and remove the file\n");
printf("*** config.cache before re-running configure\n");
return 1;
}
}
],, no_esd=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
if test "x$no_esd" = x ; then
AC_MSG_RESULT(yes)
ifelse([$2], , :, [$2])
else
AC_MSG_RESULT(no)
if test "$ESD_CONFIG" = "no" ; then
echo "*** The esd-config script installed by ESD could not be found"
echo "*** If ESD was installed in PREFIX, make sure PREFIX/bin is in"
echo "*** your path, or set the ESD_CONFIG environment variable to the"
echo "*** full path to esd-config."
else
if test -f conf.esdtest ; then
:
else
echo "*** Could not run ESD test program, checking why..."
CFLAGS="$CFLAGS $ESD_CFLAGS"
LIBS="$LIBS $ESD_LIBS"
AC_TRY_LINK([
#include <stdio.h>
#include <esd.h>
], [ return 0; ],
[ echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding ESD or finding the wrong"
echo "*** version of ESD. If it is not finding ESD, you'll need to set your"
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
echo "*** to the installed location Also, make sure you have run ldconfig if that"
echo "*** is required on your system"
echo "***"
echo "*** If you have an old version installed, it is best to remove it, although"
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
[ echo "*** The test program failed to compile or link. See the file config.log for the"
echo "*** exact error that occured. This usually means ESD was incorrectly installed"
echo "*** or that you have moved ESD since it was installed. In the latter case, you"
echo "*** may want to edit the esd-config script: $ESD_CONFIG" ])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
ESD_CFLAGS=""
ESD_LIBS=""
ifelse([$3], , :, [$3])
fi
AC_SUBST(ESD_CFLAGS)
AC_SUBST(ESD_LIBS)
rm -f conf.esdtest
])

54
autogen.sh Executable file
View File

@ -0,0 +1,54 @@
#!/bin/sh
# Run this to generate all the initial makefiles, etc.
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
THEDIR="`pwd`"
cd "$srcdir"
DIE=0
(autoconf --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "You must have autoconf installed to compile Enlightenment."
echo "Download the appropriate package for your distribution,"
echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
DIE=1
}
(automake --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "You must have automake installed to compile Enlightenment."
echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz"
echo "(or a newer version if it is available)"
DIE=1
}
if test "$DIE" -eq 1; then
exit 1
fi
(test -d src && test -d dox) || {
echo "You must run this script in the top-level Enlightenment directory"
exit 1
}
if test -z "$*"; then
echo "I am going to run ./configure with no arguments - if you wish "
echo "to pass any to it, please specify them on the $0 command line."
fi
echo "Generating configuration files for Enlightenment, please wait...."
echo " aclocal $ACLOCAL_FLAGS"
aclocal $ACLOCAL_FLAGS
echo " autoheader"
autoheader
echo " automake --add-missing"
automake --add-missing
echo " autoconf"
autoconf
cd "$THEDIR"
$srcdir/configure "$@" && echo && echo "Now type 'make' to compile Enlightenment."

68
config.h.in Normal file
View File

@ -0,0 +1,68 @@
/* config.h.in. Generated automatically from configure.in by autoheader. */
/* Define if you need to in order for stat and other things to work. */
#undef _POSIX_SOURCE
/* Define as the return type of signal handlers (int or void). */
#undef RETSIGTYPE
/* Define if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Define if your processor stores words with the most significant
byte first (like Motorola and SPARC, unlike Intel and VAX). */
#undef WORDS_BIGENDIAN
/* Define if the X Window System is missing or not being used. */
#undef X_DISPLAY_MISSING
#undef ENLIGHTENMENT_VERSION
#undef HAVE_STDARGS
#undef HAVE_LIBESD
#undef HAVE_SM
#undef ENLIGHTENMENT_MAJOR
#undef ENLIGHTENMENT_MINOR
#undef ENLIGHTENMENT_MICRO
#undef AUTOUPGRADE
#undef WITH_TARTY_WARP
/* Define if you have the blumfrub function. */
#undef HAVE_BLUMFRUB
/* Define if you have the buckets_of_erogenous_nym function. */
#undef HAVE_BUCKETS_OF_EROGENOUS_NYM
/* Define if you have the buttox function. */
#undef HAVE_BUTTOX
/* Define if you have the getcwd function. */
#undef HAVE_GETCWD
/* Define if you have the mkdir function. */
#undef HAVE_MKDIR
/* Define if you have the setenv function. */
#undef HAVE_SETENV
/* Define if you have the snprintf function. */
#undef HAVE_SNPRINTF
/* Define if you have the strcasecmp function. */
#undef HAVE_STRCASECMP
/* Define if you have the <alloca.h> header file. */
#undef HAVE_ALLOCA_H
/* Define if you have the Fridge library (-lFridge). */
#undef HAVE_LIBFRIDGE
/* Define if you have the Xtst library (-lXtst). */
#undef HAVE_LIBXTST

237
configure.in Normal file
View File

@ -0,0 +1,237 @@
AC_INIT(e.spec)
ENLIGHTENMENT_MAJOR=0
ENLIGHTENMENT_MINOR=16
ENLIGHTENMENT_MICRO=devel.4
ENLIGHTENMENT_VERSION=$ENLIGHTENMENT_MAJOR.$ENLIGHTENMENT_MINOR.$ENLIGHTENMENT_MICRO
VERSION=$ENLIGHTENMENT_VERSION
PACKAGE=enlightenment
AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define)
AM_MAINTAINER_MODE
AM_CONDITIONAL(FSSTD, test x$enable_fsstd = xyes)
AC_SUBST(USE_FSSTD)
dnl reasonable guesses for where stuff is installed
if test "x$prefix" = "xNONE"; then
prefix="/usr/local"
else
prefix=$prefix
fi
#
# ok enlightenment d00ds want to ignore civilization and install
# everything in one place. The rest of use prefer sanity.
#
AC_ARG_ENABLE(fsstd, [ --enable-fsstd install files following FSSTD [default=no]], ,enable_fsstd=no)
if test "x$enable_fsstd" = "xyes"; then
ENLIGHTENMENT_ROOT=${datadir}/enlightenment
ENLIGHTENMENT_BIN=${bindir}
USE_FSSTD=yes
else
ENLIGHTENMENT_ROOT=${prefix}/enlightenment
ENLIGHTENMENT_BIN=${prefix}/enlightenment/bin
USE_FSSTD=no
fi
AM_CONFIG_HEADER(econfig.h)
AC_DEFINE_UNQUOTED(ENLIGHTENMENT_VERSION, "$ENLIGHTENMENT_VERSION")
AC_SUBST(ENLIGHTENMENT_VERSION)
AC_DEFINE_UNQUOTED(ENLIGHTENMENT_MAJOR, "$ENLIGHTENMENT_MAJOR")
AC_SUBST(ENLIGHTENMENT_MAJOR)
AC_DEFINE_UNQUOTED(ENLIGHTENMENT_MINOR, "$ENLIGHTENMENT_MINOR")
AC_SUBST(ENLIGHTENMENT_MINOR)
AC_DEFINE_UNQUOTED(ENLIGHTENMENT_MICRO, "$ENLIGHTENMENT_MICRO")
AC_SUBST(ENLIGHTENMENT_MICRO)
AC_SUBST(ENLIGHTENMENT_ROOT)
AC_SUBST(ENLIGHTENMENT_BIN)
AC_PROG_CC
AC_PROG_MAKE_SET
AC_ISC_POSIX
AC_PROG_INSTALL
AC_PROG_LN_S
AC_HEADER_STDC
AC_PATH_X
AC_PATH_XTRA
AC_CHECK_HEADER(stdarg.h, AC_DEFINE(HAVE_STDARGS))
AC_CHECK_HEADER(X11/SM/SMlib.h, AC_DEFINE(HAVE_SM))
AC_CHECK_HEADERS(alloca.h)
AC_TYPE_SIGNAL
AC_C_BIGENDIAN
AC_CHECK_FUNCS(getcwd)
AC_CHECK_FUNCS(mkdir)
AC_CHECK_FUNCS(snprintf)
AC_CHECK_FUNCS(strcasecmp)
AC_CHECK_FUNCS(setenv)
AC_CHECK_FUNCS(blumfrub)
AC_CHECK_FUNCS(buckets_of_erogenous_nym)
AC_CHECK_FUNCS(buttox)
AC_ARG_ENABLE(sound, [ --enable-sound compile with sound support
[default=yes]], ,enable_sound=yes)
AC_ARG_ENABLE(upgrade, [ --enable-upgrade compile with auto-upgrade support
[default=yes]], ,enable_upgrade=yes)
if test "x$enable_sound" = "xyes"; then
AM_PATH_ESD(0.2.12,AC_DEFINE(HAVE_LIBESD),[
echo "WARNING: Enlightenment needs a system with libesd.so (EsounD)"
echo "0.2.12 or higher to use sound support."
echo "Enlightenment can use EsounD (ESD) to be installed to compile."
echo "Sound will be disabled in this binary. If you ever want sound"
echo "You will need to get and install EsounD then recompile Enlightenment"
echo "Please see the EsounD homepage below on how to obtain/install it."
echo "http://pw1.netcom.com/~ericmit/EsounD.html"
echo "You can also obtain it from:"
echo "ftp://ftp.enlightenment.org/pub/enlightenment/"
echo "ftp://www.rasterman.com/pub/enlightenment/"
AC_MSG_WARN([Warning: no EsounD detected.])])
else
echo "Sound support has been turned off, per the --enable-sound=no"
echo "passed to your configure line."
fi
AM_PATH_IMLIB(1.9.5, , [
echo "ERROR: Enlightenment needs a system with Imlib 1.8.2 or higher"
echo "You can obtain it from:"
echo "ftp://ftp.enlightenment.org/pub/enlightenment/"
echo "ftp://www.rasterman.com/pub/enlightenment/"
echo "ftp://ftp.labs.redhat.com/pub/imlib/"
AC_MSG_ERROR([Fatal Error: no Imlib detected.])])
LDFLAGS="$LDFLAGS -L$prefix/lib"
LDFLAGS="$LDFLAGS `echo $IMLIB_LIBS | sed 's/\(.*\)-lImlib.*/\1/'`"
LDFLAGS="$LDFLAGS `echo $IMLIB_LIBS | sed 's/.*-lImlib.*\(-L[[^ ]]*\).*$/\1/'`"
XTST_LIBS=""
AC_CHECK_LIB(Fnlib, Fnlib_init, FNLIB_LIBS=-lFnlib , [
echo "ERROR: Enlightenment needs a system with libFnlib.so (Fnlib)"
echo "You can obtain it from:"
echo "ftp://ftp.enlightenment.org/pub/enlightenment/"
echo "ftp://www.rasterman.com/pub/enlightenment/"
echo "ftp://ftp.labs.redhat.com/pub/fnlib/"
AC_MSG_ERROR([Fatal Error: no Fnlib detected.])], $IMLIB_LIBS)
AC_SUBST(FNLIB_LIBS)
if test "x$enable_upgrade" = "xyes"; then
AC_CHECK_LIB(ghttp, ghttp_uri_validate, [AC_DEFINE(AUTOUPGRADE)
GHTTP_LIBS=-lghttp] , [
echo "Automatic Upgrades requires libghttp"
AC_MSG_WARN([no libghttp detected.])
],$IMLIB_LIBS)
else
echo "Automatic Upgrades have been turned off by request at compiletime"
fi
AC_SUBST(GHTTP_LIBS)
AC_CHECK_LIB(ttf, TT_Init_FreeType, TTF_LIBS=-lttf, [
echo "ERROR: Enlightenment needs a system with libttf.so (TrueType Font Library)"
echo "You can obtain it from:"
echo "ftp://ftp.enlightenment.org/pub/enlightenment/"
echo "ftp://www.rasterman.com/pub/enlightenment/"
echo "You can also obtain it from:"
echo "http://www.freetype.org/"
echo "You can obtain some truetype fonts from:"
echo "http://voyager.cns.ohiou.edu/~sadkins/web_library/fonts/font_archive/"
AC_MSG_ERROR([Fatal Error: no FreeType detected.])], -lm)
AC_SUBST(TTF_LIBS)
AC_CHECK_LIB(dl, dlopen, DL_LIBS=-ldl , [
echo "Warning: Enlightenment requires the dl (dynamic loader) library"
echo "to be supported on your platform for module support. Modules"
echo "have been disabled (this will affect functionality)"
AC_MSG_WARN([Module Support Disabled (no dynamic loader)])], -lm)
AC_SUBST(DL_LIBS)
AC_CHECK_LIB(Xtst, XTestGrabControl, , , $X_LIBS)
AC_CHECK_LIB(Xtst, XTestQueryExtension, XTST_LIBS=-lXtst, , $X_LIBS)
AC_SUBST(XTST_LIBS)
AC_CHECK_LIB(Xext, XkbQueryExtension, AC_DEFINE(WITH_TARTY_WARP), , $X_LIBS)
AC_CHECK_LIB(Xxf86vm, XF86VidModeQueryExtension, AC_DEFINE(WITH_ZOOM), , $X_LIBS)
AC_CHECK_LIB(Xxf86vm, XF86VidModeQueryExtension, XVM_LIBS=-lXxf86vm, , $X_LIBS)
AC_SUBST(XVM_LIBS)
AC_SUBST(XKB)
#pixdata=`ls -1 $srcdir/src/pix | egrep -v '(Makefile|CVS)'`
#snddata=`ls -1 $srcdir/src/themes/DEFAULT/snd | egrep -v '(Makefile|CVS)'`
#t17data=`ls -1 $srcdir/src/themes/DEFAULT/tin-e/17 | egrep -v '(Makefile|CVS)'`
#ttfdata=`ls -1 $srcdir/src/themes/DEFAULT/ttfonts | egrep -v '(Makefile|CVS)'`
#pixdata=`echo $pixdata`
#snddata=`echo $snddata`
#t17data=`echo $t17data`
#ttfdata=`echo $ttfdata`
#AC_SUBST(pixdata)
#AC_SUBST(snddata)
#AC_SUBST(t17data)
#AC_SUBST(ttfdata)
#CONFIGEDIT=
#AC_PATH_PROG(PERL, perl)
#if test -z "$PERL"; then
# AC_MSG_WARN([perl not found, ConfigEdit will not be installed])
#else
# CONFIGEDIT=configedit
#fi
#AC_SUBST(CONFIGEDIT)
AC_CHECK_LIB(Fridge,mass_quantities_of_bass_ale)
AC_CHECK_LIB(Fridge,mass_quantities_of_any_ale, , [
echo "Warning: No ales were found in your refrigerator."
echo " We highly suggest that you rectify this situation immediately."
])
edocdata=`ls -1 $srcdir/dox/E-docs | egrep -v '(Makefile|CVS|^e|^misc|\.sh$)'`
edocexec=`ls -1 $srcdir/dox/E-docs | egrep '\.sh$'`
#e17data=`ls -1 $srcdir/dox/E-docs/e/17 | egrep -v '(Makefile|CVS)'`
#epixdata=`ls -1 $srcdir/dox/E-docs/epix | egrep -v '(Makefile|CVS)'`
#miscdata=`ls -1 $srcdir/dox/E-docs/misc | egrep -v '(Makefile|CVS)'`
edocdata=`echo $edocdata`
edocexec=`echo $edocexec`
#e17data=`echo $e17data`
#epixdata=`echo $epixdata`
#miscdata=`echo $miscdata`
AC_SUBST(edocdata)
AC_SUBST(edocexec)
dnl#AC_SUBST(e17data)
dnl#AC_SUBST(epixdata)
dnl#AC_SUBST(miscdata)
#configedit/Makefile
#configedit/configedit.rc
#configedit/ConfigEdit
#src/configs/user_main.cfg
AC_OUTPUT([
Makefile
src/Makefile
src/themes/Makefile
src/themes/configs/Makefile
src/themes/configs/pix/Makefile
dox/Makefile
dox/E-docs/Makefile
eesh/Makefile
epp/Makefile
])
#, [chmod +x configedit/ConfigEdit])

11
debian/README.debian vendored Normal file
View File

@ -0,0 +1,11 @@
enlightenment for DEBIAN
----------------------
The Enlightenment window manager package.
It now complies with the FHS (Thanks DrMike & KainX!). You can
now build your own .debs of CVS if you so choose, since the debian
specific files are going to be commited to the source tree. Just run
'debian/rules binary' and you'll be set. If you have questions, just
email me.
Brian M. Almeida <bma@debian.org>, Wed, 30 Sep 1998 18:47:42 -0400

109
debian/changelog vendored Normal file
View File

@ -0,0 +1,109 @@
enlightenment-cvs (0.15-0.11) unstable; urgency=low
* Package names changed to reflect CVS version
* CVS updates, more auto* fixes
* Removed econfigedit stuff (dead program)
* Made version number two digits again to make it
recognized as a new version
-- Brian M. Almeida <bma@debian.org> Sat, 19 Dec 1998 10:09:18 -0500
enlightenment (0.15-0.1) unstable; urgency=low
* Happy day! E now supports the FSSTD.
-- Brian M. Almeida <bma@debian.org> Thu, 10 Dec 1998 17:31:00 -0500
enlightenment (0.15-0.08) unstable; urgency=low
* CVS upstream patches (Snapshot from 19981120)
-- Brian M. Almeida <bma@debian.org> Fri, 20 Nov 1998 15:46:00 -0500
enlightenment (0.15-0.07) unstable; urgency=low
* CVS upstream patches (Snapshot from 19981115)
* Raster made a commit RIGHT AFTER 0.06 built...grrr...
-- Brian M. Almeida <bma@debian.org> Sat, 15 Nov 1998 23:21:00 -0500
enlightenment (0.15-0.06) unstable; urgency=low
* CVS upstream patches (Snapshot from 19981115)
* Has a double click event that shades the window, yay!
-- Brian M. Almeida <bma@debian.org> Sat, 15 Nov 1998 22:30:00 -0400
enlightenment (0.15-0.05) unstable; urgency=low
* CVS upstream patches (Snapshot from 19981110)
-- Brian M. Almeida <bma@debian.org> Tue, 10 Nov 1998 16:19:00 -0400
enlightenment (0.15-0.04) unstable; urgency=low
* CVS upstream patches (Snapshot from 19981109)
-- Brian M. Almeida <bma@debian.org> Tue, 10 Nov 1998 10:28:00 -0400
enlightenment (0.15-0.03) unstable; urgency=low
* CVS upstream patches (Snapshot from 19981107)
-- Brian M. Almeida <bma@debian.org> Sat, 07 Nov 1998 22:24:00 -0400
enlightenment (0.15-0.02) unstable; urgency=low
* CVS upstream patches (Snapshot from 19981104) to satisfy the masses
* Changed econfigedit dependeny to be libgtk-imlib-perl | libgnome-perl
-- Brian M. Almeida <bma@debian.org> Fri, 06 Nov 1998 12:39:00 -0400
enlightenment (0.15-0.01) unstable; urgency=low
* CVS upstream release (Snapshot from 19981025) to satisfy the masses
-- Brian M. Almeida <bma@debian.org> Mon, 26 Oct 1998 21:40:00 -0400
enlightenment (0.14-5) unstable; urgency=low
* Added Enlightenment to WindowManagers submenu using update-menus (#27927)
* Changed dependency on libgtk-perl to libgtk-imlib-perl
-- Brian M. Almeida <bma@debian.org> Wed, 14 Oct 1998 15:15:00 -0400
enlightenment (0.14-4) unstable; urgency=low
* user_main.cfg calls eeyes now, not ee (#27730)
-- Brian M. Almeida <bma@debian.org> Tue, 13 Oct 1998 20:00:00 -0400
enlightenment (0.14-3) unstable; urgency=low
* New maintainer
-- Brian M. Almeida <bma@debian.org> Wed, 30 Sep 1998 18:25:18 -0400
enlightenment (0.14-2) unstable; urgency=low
* Fixed writing of dotfiles
-- Sean E. Perry <shaleh@debian.org> Tue, 21 Jul 1998 00:03:18 -0400
enlightenment (0.14-1) unstable; urgency=low
* Added the e-docs package
* Official upstream release
-- Sean E. Perry <shaleh@debian.org> Sun, 19 Jul 1998 03:38:18 -0400
enlightenment (0.14-0) unstable; urgency=low
* Initial Release.
-- Sean E. Perry <shaleh@debian.org> Sun, 5 Jul 1998 20:07:42 -0400
Local variables:
mode: debian-changelog
add-log-mailing-address: "bma@debian.org"
End:

53
debian/control vendored Normal file
View File

@ -0,0 +1,53 @@
Source: enlightenment-cvs
Section: x11
Priority: optional
Maintainer: Brian M. Almeida <bma@debian.org>
Standards-Version: 2.4.0.0
Package: enlightenment-cvs-docs
Architecture: all
Recommends: enlightenment-cvs (>= 0.15)
Replaces: enlightenment-docs (<< 0.15-0.11)
Conflicts: enlightenment-docs (<< 0.15-0.11)
Provides: enlightenment-docs
Description: All documentation for Enlightenment and its themes
How to make a theme, how to customize E, FAQ, README, the works
Package: enlightenment-cvs
Architecture: any
Depends: ${shlibs:Depends}, enlightenment-cvs-docs, enlightenment-cvs-theme
Suggests: dox-cvs, esound-cvs
Replaces: enlightenment (<< 0.15-0.11)
Conflicts: enlightenment (<< 0.15-0.11)
Provides: enlightenment
Description: The Enlightenment Window Manager
The Enlightnment Window Manager, whose motto is "Time to rethink everything".
It allows complete user control of almost every possible setting. This is
accomplished through its use of themes. However at this stage, Enlightenment
is slightly more complex than wmx and many will find it lacking in features.
There is no support for menus or iconization.
Package: enlightenment-cvs-theme
Architecture: all
Depends: enlightenment-cvs-docs
Recommends: enlightenment-cvs(>= 0.15)
Replaces: enlightenment-theme (<< 0.15-0.11)
Conflicts: enlightenment-theme (<< 0.15-0.11)
Provides: enlightenment-theme
Description: Themes pictures and config files need by the Enlightenment WM
This package contains the graphics, sounds, and font needed for a minimal
install of Enlightenment. The user is allowed and even suggested to make
their own.
Package: dox-cvs
Architecture: any
Depends: ${shlibs:Depends}
Recommends: enlightenment-cvs
Replaces: dox (<< 0.15-0.11)
Conflicts: dox (<< 0.15-0.11)
Provides: dox
Description: Dox is the Enlightened help program
Dox is Rasterman's little creation for Enlightenment and other Enlightened
apps to use as a mini help viewer. It uses Rasterman's own markup type
language.

8
debian/copyright vendored Normal file
View File

@ -0,0 +1,8 @@
This package was debianized by Sean E. Perry shaleh@debian.org on
Sun, 5 Jul 1998 20:07:42 -0400.
It can be downloaded from www.rasterman.com or www.enlightenment.org
Copyright:
Enlightenment and Dox are released under the GPL.

3
debian/dox-cvs.files vendored Normal file
View File

@ -0,0 +1,3 @@
usr/X11R6/bin/dox
usr/share/enlightenment/E-docs

2
debian/enlightenment-cvs-docs.files vendored Normal file
View File

@ -0,0 +1,2 @@
usr/doc/enlightenment-cvs-docs

3
debian/enlightenment-cvs-theme.files vendored Normal file
View File

@ -0,0 +1,3 @@
usr/share/enlightenment/config
usr/share/enlightenment/themes

3
debian/enlightenment-cvs.files vendored Normal file
View File

@ -0,0 +1,3 @@
usr/X11R6/bin/enlightenment
usr/X11R6/bin/eesh
usr/X11R6/bin/epp

2
debian/enlightenment-cvs.menu vendored Normal file
View File

@ -0,0 +1,2 @@
?package(enlightenment):needs="wm" section="WindowManagers"\
title="Enlightenment" command="/usr/X11R6/bin/enlightenment"

1
debian/enlightenment.substvars vendored Normal file
View File

@ -0,0 +1 @@
shlibs:Depends=freetype2, imlib1, libc6, libesd0, libfnlib0, libjpeg62, libpng2, libtiff3g, libungif3g (>= 3.0-2) | giflib3g (>= 3.0-5.2), xlib6g (>= 3.3-5), zlib1g (>= 1:1.1.3)

111
debian/rules vendored Normal file
View File

@ -0,0 +1,111 @@
#!/usr/bin/make -f
# Made with the iad of dh_make, by Craig Small
BUILD_DIR=`pwd`/debian/build
INSTALL_DIR=`pwd`/debian/tmp
#export DH_VERBOSE=1
configure: configure.in
@echo "--- Making configure script and configuring"
./autogen.sh
Makefile: configure
@echo "--- Configuring"
./configure --enable-fsstd=yes --prefix=/usr \
--bindir=/usr/X11R6/bin
build: Makefile build-stamp
build-stamp:
@echo "--- Compiling"
dh_testdir
$(MAKE)
touch build-stamp
clean:
@echo "--- Cleaning"
dh_testdir
dh_testroot
rm -f build-stamp
rm -rf debian/build
rm -rf `find . -name '.deps'`
-$(MAKE) distclean
dh_clean
install: build
@echo "--- Installing"
dh_testdir
dh_testroot
$(MAKE) install DESTDIR=${INSTALL_DIR}
mkdir -p ${INSTALL_DIR}/usr/doc/enlightenment-cvs-docs
binary-indep: build install \
enlightenment-cvs-docs \
enlightenment-cvs-theme \
binary-arch: build install \
enlightenment-cvs \
dox-cvs
enlightenment-cvs-docs: install
@echo "--- Building: $@"
dh_installdocs -p$@ -P$(BUILD_DIR)/$@ src/README AUTHORS FAQ
dh_installchangelogs -p$@ -P$(BUILD_DIR)/$@ src/ChangeLog
dh_movefiles -p$@ -P$(BUILD_DIR)/$@
dh_compress -p$@ -P$(BUILD_DIR)/$@
dh_fixperms -p$@ -P$(BUILD_DIR)/$@
dh_installdeb -p$@ -P$(BUILD_DIR)/$@
dh_gencontrol -p$@ -P$(BUILD_DIR)/$@
dh_md5sums -p$@ -P$(BUILD_DIR)/$@
dh_builddeb -p$@ -P$(BUILD_DIR)/$@
enlightenment-cvs-theme: install
@echo "--- Building: $@"
mkdir -p $(BUILD_DIR)/$@/usr/doc
cd $(BUILD_DIR)/$@/usr/doc; ln -sf enlightenment-cvs-docs $@
dh_movefiles -p$@ -P$(BUILD_DIR)/$@
dh_compress -p$@ -P$(BUILD_DIR)/$@
dh_fixperms -p$@ -P$(BUILD_DIR)/$@
dh_installdeb -p$@ -P$(BUILD_DIR)/$@
dh_gencontrol -p$@ -P$(BUILD_DIR)/$@
dh_md5sums -p$@ -P$(BUILD_DIR)/$@
dh_builddeb -p$@ -P$(BUILD_DIR)/$@
enlightenment-cvs: install
@echo "--- Building: $@"
mkdir -p $(BUILD_DIR)/$@/usr/doc
cd $(BUILD_DIR)/$@/usr/doc; ln -sf enlightenment-cvs-docs $@
dh_installmenu -p$@ -P$(BUILD_DIR)/$@
dh_movefiles -p$@ -P$(BUILD_DIR)/$@
dh_strip -p$@ -P$(BUILD_DIR)/$@
dh_compress -p$@ -P$(BUILD_DIR)/$@
dh_fixperms -p$@ -P$(BUILD_DIR)/$@
dh_installdeb -p$@ -P$(BUILD_DIR)/$@
dh_undocumented -p$@ -P$(BUILD_DIR)/$@ enlightenment.1x
dh_shlibdeps -p$@ -P$(BUILD_DIR)/$@
dh_gencontrol -p$@ -P$(BUILD_DIR)/$@
dh_md5sums -p$@ -P$(BUILD_DIR)/$@
dh_builddeb -p$@ -P$(BUILD_DIR)/$@
dox-cvs: install
@echo "--- Building: $@"
dh_installdocs -p$@ -P$(BUILD_DIR)/$@ dox/README \
debian/README.debian
dh_installchangelogs -p$@ -P$(BUILD_DIR)/$@ dox/ChangeLog
dh_movefiles -p$@ -P$(BUILD_DIR)/$@
dh_strip -p$@ -P$(BUILD_DIR)/$@
dh_compress -p$@ -P$(BUILD_DIR)/$@
dh_fixperms -p$@ -P$(BUILD_DIR)/$@
dh_installdeb -p$@ -P$(BUILD_DIR)/$@
dh_undocumented -p$@ -P$(BUILD_DIR)/$@ dox.1x
dh_shlibdeps -p$@ -P$(BUILD_DIR)/$@
dh_gencontrol -p$@ -P$(BUILD_DIR)/$@
dh_md5sums -p$@ -P$(BUILD_DIR)/$@
dh_builddeb -p$@ -P$(BUILD_DIR)/$@
source diff:
@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary

4
dox/.cvsignore Normal file
View File

@ -0,0 +1,4 @@
Makefile
Makefile.in
.deps
dox

340
dox/COPYING Normal file
View File

@ -0,0 +1,340 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) 19yy name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.

50
dox/ChangeLog Normal file
View File

@ -0,0 +1,50 @@
Thu Jun 25 16:26:27 EDT 1998
(Raster)
added dox to cvs - guess what.. it actually works.. :)
-----------------------------------------------------------------
Sun Aug 23 22:13:16 EDT 1998
(Mandrake)
fixed imlib-config stuff
-----------------------------------------------------------------
Sun Sep 6 18:54:17 EDT 1998
(Mandrake)
incremented minor rev to 15.
-----------------------------------------------------------------
Fri Sep 11 11:29:57 EDT 1998
(Mandrake)
added -I$prefix/include to CPPFLAGS in configure.in
-----------------------------------------------------------------
Aug 14/1998 (Hilarion, woo hoo!)
o Added in support for keybindings (PgUp/PgDn/Return/Home/End)
o Can now select buttons with keys
o Previous button/PageUp can now return from a button press
to the original page
-----------------------------------------------------------------
Tue Sep 29 18:11:10 PDT 1998
(Yosh)
Redid the Makefiles to be less kludgy
-----------------------------------------------------------------
Sat Jul 10 16:45:42 PDT 1999
(Mandrake)
added patch from Christian Kreibich <kreibich@informatik.tu-muenchen.de>
to stop the memory leak in dox

2
dox/E-docs/.cvsignore Normal file
View File

@ -0,0 +1,2 @@
Makefile
Makefile.in

BIN
dox/E-docs/E_app_menu.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

BIN
dox/E-docs/E_keyboard.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

BIN
dox/E-docs/E_logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

BIN
dox/E-docs/E_mouse.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

BIN
dox/E-docs/E_mousewheel.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

BIN
dox/E-docs/E_window.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

BIN
dox/E-docs/Edoc_bg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 130 KiB

530
dox/E-docs/MAIN Normal file
View File

@ -0,0 +1,530 @@
<page columns=1 padding=16 name=front background=Edoc_bg.png linkcolor=#88dddd>
<img src=E_logo.png x=32 y=64>
<font face=rothwell/25 color=#ffffff>
<p align=50%>
<br>
Enlightenment<br>
0.16 devel snap
<br>
<font face=aircut3/12 color=#ffffff>
<p align=50%>
Topics:<br>
<br>
_About(about)<br>
_Credits(credits)<br>
_Website(web)<br>
_IRC(irc)<br>
_Email(email)<br>
<br>
_Tutorial(tut)<br>
_Interactive_Hints(INPUT.interactive.sh)<br>
<br>
<font face=aircut3/10 color=#ffffff>
Please read the tutorial if you are new to Enlightenment or just upgraded as
there may be new features you may be missing out on.
<page columns=1 padding=16 name=about background=Edoc_bg.png linkcolor=#88dddd>
<font face=aircut3/12 color=#ffffff>
<p align=50%>
Enlightenment is your Window Manager. The Window Manager controls the
appearance of the borders of your windows, their behavior and
all user interaction with positioning, killing, resizing, moving, iconifying,
shading etc. your windows, virtual desktops, multiple desktops, menus attached
to windows and some root window menus and can also control the background
of your desktop(s).
<p align=50%>
It is a large and complex program and is by no means perfect, but it is being
worked on and is as stable as possible. It has many advanced features as well
as possibly missing some features. This version (0.15.5) is by no means the
end of development and improvements, fixes and new exciting features are
being worked on all the time. Please go and visit the _Web(web) site often,
as new versions, fixes, patches and updates will be released.
<p align=50%>
It is hoped you enjoy using this software and that it is of benefit to you.
It might not be for everyone, but if it has made your day any better than it
was it has done more than enough already.
<page columns=2 padding=16 name=credits background=Edoc_bg.png linkcolor=#88dddd>
<font face=aircut3/10 color=#ffffff>
<p>
Enlightenment has been written by:<br>
<br>
The Rasterman (Carsten Haitzler)<br>
Mandrake (Geoff Harrison)<br>
Chutt (Isaac Richards)<br>
Sung-Hyun Nam<br>
Kimball Thurston<br>
Michael Kellen<br>
Frederic Devernay<br>
Felix Bellaby<br>
Michael Jennings (KainX)<br>
Christian Kreibich<br>
Peter Kjellerstedt<br>
Troy Pesola<br>
Owen Taylor<br>
<br>
And many others.
<p>
A big thanks to several companies that helped support Enlightenment.
<p>
2rad Networks (www.2rad.net) for providing servers and bandwidth to run the
Enlightenment web site.
<p>
Red Hat Software (www.redhat.com) for allowing developers resources and time
to work on Enlightenment.
<p>
VA Linux Systems (www.linux.com) for providing hardware, bandwidth and coke.
<p>
Xi Graphics (www.xig.com) for providing Xservers.
<p>
Not only should these people be thanked, but the whole E community - those on
the E mailing list, on #E on IRC on EFnet and all E users who have provided
feedback and debugging information, bug-fixes, patches and support. A big
thanks goes out to all of you who make a project like this possible.
<p>
In addition people should be aware that E makes use of other projects - such
as XFree86, Imlib, Esound, Freetype and many others, The people working on
projects that provide infrastructure that E can use and build on should not
be forgotten.
<page columns=1 padding=16 name=web background=Edoc_bg.png linkcolor=#88dddd>
<font face=aircut3/12 color=#ffffff>
<br>
<br>
<br>
<br>
<br>
<br>
<p align=50%>
For updated information on Enlightenment, development, bug-fixes, snapshots of
development versions etc. please visit:
<p align=50%>
<font face=rothwell/30 color=#ccdddd>
http://www.enlightenment.org/
<font face=aircut3/12 color=#ffffff>
<p align=50%>
You may want to visit this site often as it changes
regularly with fixes and development releases -- also visiting the
daily-snapshots section
on the FTP site is a good idea (see the snapshots section on the website for
more information).
<page columns=1 padding=16 name=irc background=Edoc_bg.png linkcolor=#88dddd>
<font face=aircut3/12 color=#ffffff>
<p>
There is an Official Enlightenment IRC channel where you can go and "hang out"
if you want - talk to other E users, developers, get some help, drool
together, or whatever. #E will kill me for this but get onto any EFnet irc
server (irc.efnet.org) then join #E. An example:
<p>
BitchX your_nick irc.efnet.org<br>
<br>
or<br>
<br>
irc your_nick irc.efnet.org<br>
<br>
or use your favorite graphical IRC client.
<p>
Please remember that it can get busy with 100's of people talking at once and
not everyone is actually listening all the time or are in the middle of a
conversation - be polite and patient, and have a sense of humor and you'll
have fun.
<page columns=1 padding=16 name=email background=Edoc_bg.png linkcolor=#88dddd>
<font face=aircut3/12 color=#ffffff>
<p>
There is a mailing-list for Enlightenment.If you wish to take part in general
and development related discussions concerning Enlightenment you can join
by mailing:
<p>
e-develop-request@rasterman.com
<p>
and put only one word in your body of the mail:
<p>
subscribe
<p>
This should subscribe you to the mailing list. If you are only interested in
announcements, please mail your subscribe request as above to:
<p>
e-announce-request@rasterman.com
<p>
instead.
<page columns=1 padding=16 name=tut background=Edoc_bg.png linkcolor=#88dddd>
<font face=aircut3/12 color=#ffffff>
<p>
<br>
<br>
<br>
This small tutorial is intended to take you step by step through Enlightenment
and its default setup, how to use it, modify settings, and put it to use for
you. When you have finished reading each page please press the NEXT button on
the top of this window to go to the next page.
<p>
If you are reading this right now you have managed to get Enlightenment itself
installed correctly and are either running Enlightenment for the first time or
have just upgraded to a new version. Congratulations. Now it's time to take
you on a quick tour of the desktop you will have before you.
<p>
Please remember that if you use a theme other than the default (Brushed Metal)
that is may look slightly or completely different to the contents of this
tutorial. Some behavior may also vary.
<page columns=1 padding=16 name=tut2 background=Edoc_bg.png linkcolor=#88dddd>
<font face=aircut3/12 color=#ffffff>
<img src=E_screen_start.png x=16 y=16>
<p>
Now that you have started Enlightenment, if you are using it for your desktop
shell, your screen should look something like the image here on the left.
<p>
Across the whole top of the screen you will see a bar with arrows pointing
up and down on the left and right ends. This is your desktop
_Dragbar(dragbar) .
<p>
On the bottom-left you'll see 3 boxes. The top box with the scrollbar attached
will be your _Iconbox(iconbox) .
<p>
The other 2 boxes below are _Pagers(pager) for desktops 0 and 1. Everything
else is your desktop background.
<page columns=1 padding=16 name=tut3 background=Edoc_bg.png linkcolor=#88dddd>
<font face=aircut3/12 color=#ffffff>
<img src=E_app_menu.png x=350 y=48>
<p>
When you click with your left mouse button on the desktop background you will
see an "Applications" menu appear (example displayed on the right here).
Applications you may have installed will appear in this menu. To launch one
of them simply select it from the menu.
<p>
Note: Menus in Enlightenment work like most menu systems. You can either hold
down the mouse button and navigate with the button down, releasing on the
selection you want, or release elsewhere to not select anything, or you can
quickly click and release then navigate just by moving the mouse, and clicking
again on the item you wish to select, or eslewhere if you do not wish to
select an entry.
<p>
If you wish to "stick" a menu up and leave it up so you can select items from
it multiple times, clcik and hold down the mouse and release on the title of
the menu (if it has a title) and it will remain up. You can move it and
manipulate it like a normal window. Close the window to unstick the menu.
<p>
<page columns=1 padding=16 name=tut4 background=Edoc_bg.png linkcolor=#88dddd>
<font face=aircut3/12 color=#ffffff>
<img src=E_settings_menu.png x=285 y=275>
<img src=E_enlightenment_menu.png x=4 y=30>
<p>
You will also find that instead of using the left mouse button, you click the
right mouse button, a menu with the title "Settings" will appear. This is
Enlightenment's settings menu. From it you can select what parts of your
desktop that Enlightenment controls to customise and make more ameniable to
your own needs.
<p>
When you select one of these _settings(settings) a dialog window will appear
giving you options to configure that part of Enlightenment.
<p>
Clicking the middle button on the desktop background will display
Enlightenment's main menu. You can access the other menus plus more options
(including those to log out, restart and display Help information) from this
menu.
<page columns=1 padding=16 name=tut5 background=Edoc_bg.png linkcolor=#88dddd>
<font face=aircut3/12 color=#ffffff>
<p>
You will also find that holding down the ALT key whilst clicking the middle
mouse button will bring up a menu with the titles of all currently active
application windows. Selecting one of these will take you to that application.
By using the CTRL key instead of ALT you will get a menu displaying all
current desktops as submenus, with applicaitons on each desktop in the
desktop submenu.
<p>
If your mouse does not have a middle button you should have enabled
"Emulate 3 Buttons" in your X-Server - in which case pressing both left and
right mouse buttons at once will be the equivalent of pressing a middle
mouse button. If this does not work this may not be turned on. Please see
your X Server documentation on how to configure this.
<p>
This may vary from system to system. OS and XServer may also vary the method
in which you do this, if it is possible. Not having a middle mouse button in
Enlightenment, or for that matter X is not a good thing as it is almost
assumed to be there, and is used by many applications, as well as
Enlightenment.
<page columns=1 padding=16 name=tut6 background=Edoc_bg.png linkcolor=#88dddd>
<font face=aircut3/12 color=#ffffff>
<img src=E_mousewheel.png x=370 y=30>
<img src=E_mouse.png x=410 y=330>
<p>
If you have a WheelMouse and X is configured to understand this Enlightenment
comes equipped with wheel support out of the box.
<p>
Rolling your wheel up on the desktop background will take you back a
_desktop(desktops) or by rolling your wheel downward, you will advance
forward a desktop.
<p>
If this doesn't work, then it may be you haven't configured your XServer to
understand a mouse with a wheel. If you use XFree86 you may need to edit your
XF86Config to have a "Pointer" Section like:
<font face=aircut3/12 color=#ccaacc>
<p>
Section "Pointer"<br>
Protocol "MousemanPlusPS/2"<br>
Device "/dev/mouse"<br>
ZAxisMapping 4 5<br>
Buttons 5<br>
EndSection
<font face=aircut3/12 color=#ffffff>
<p>
You may need to modify this for your mouse.
<page columns=1 padding=16 name=tut7 background=Edoc_bg.png linkcolor=#88dddd>
<font face=aircut3/12 color=#ffffff>
<p>
When you start an application, unless it has special properties, it will come
up on your screen with a border surrounding it that contains a titlebar and
several control buttons.
<p>
This border is the primary interface to controlling an application window.
The Default setup (shown on the next page) gives adequate control but still
retains simplicity.
<p>
If you click left mouse button on the titlbar and keep the mouse button down
the window will follow your mouse wherever it moves. Respectively if you click
your left mouse button and drag on any of the resize handles, the window will
be resized in that direction. Clicking right mouse button on the resize
handles will raise thw windows to the top.
<p>
Clicking right mouse button on the titlebar or any button on the window
operations menu button on the top-left will display a menu that has window
manipulation options in it.
<p>
Double-Clicking (clicking the mouse twice in sucession really fast) will
make the Window shade or unshade (depending if it was unshaded ro shaded to
start with).
<page columns=1 padding=16 name=tut8 background=Edoc_bg.png linkcolor=#88dddd>
<font face=aircut3/12 color=#ffffff>
<img src=E_window_diagram.png x=16 y=48>
<p>
<page columns=1 padding=16 name=tut9 background=Edoc_bg.png linkcolor=#88dddd>
<font face=aircut3/12 color=#ffffff>
<p>
Clicking left mouse button on the iconify button will iconify the window
and send it off to the Iconbox. Hitting the Maximize button will maximize the
size of the application fill your screen. Hitting it again will Unmaximize,
bringing the window back to its normal size.
<p>
Clicking with the left mouse button on the close button will close the window.
If the application that owns that window does not respond ot a nice request to
exit, then pressing right mouse button on the close button to forcibly
terminate that window. This should not be used unnless the application is
visibly "hung".
<p>
In addition to these methods of manipulation a window there are additional
ways of performing these.
<p>
If you hold down the ALT key and hold down left mouse button anywhere in the
window (on the border OR in the application part) whilst dragging, you will
move this window around. Doing the same but with the middle mouse button will
resize the window in that direction. Clicking button 3 anywhere in the window
whilst holding down the ALT key will brung up the window operations menu.
<page columns=1 padding=16 name=tut10 background=Edoc_bg.png linkcolor=#88dddd>
<font face=aircut3/12 color=#ffffff>
<img src=E_keyboard.png x=312 y=0>
<p>
For people who want to use their keyboard to manipulate their personal desktop
there are a number of key combinations bound by default. They are as follows:
<font face=aircut3/12 color=#112222>
<p>
CTRL+ALT+Home - Reshuffle windows on screen to be Clean
<br>
CTRL+ALT+Del - Exit Enlightenment and Log Out
<br>
CTRL+ALT+Home - Restart Enlightenment
<br>
CTRL+ALT+Up-Arrow - Raise window to top
<br>
CTRL+ALT+Down-Arrow - Lower window to the bottom
<br>
CTRL+ALT+Left-Arrow - Go to the previous desktop
<br>
CTRL+ALT+Right-Arrow - Go to the next desktop
<br>
CTRL+ALT+X - Close the currently focused window
<br>
CTRL+ALT+K - Kill the currently focused window nastily
<br>
CTRL+ALT+R - Shade/Unshade the currently focused window
<br>
CTRL+ALT+I - Iconify the currently focused window
<br>
CTRL+ALT+Tab - Switch focus to the next window
<br>
CTRL+ALT+R - Shade/Unshade the currently focused window
<br>
CTRL+ALT+S - Stick/Unstick the currently focused window
<br>
CTRL+ALT+Enter - Zoom/Unzoom the currently focused window
<br>
CTRL+ALT+(F1 - F12) - Go directly to desktops 0 - 11
<br>
<font face=aircut3/12 color=#ffffff>
(more on next page ...)
<page columns=1 padding=16 name=tut11 background=Edoc_bg.png linkcolor=#88dddd>
<font face=aircut3/12 color=#112222>
<p>
SHIFT+ALT+Left-Arrow - Move to the virtual desktop on the left if there is one
<br>
SHIFT+ALT+Right-Arrow - Move to the virtual desktop on the right if there is
one
<br>
SHIFT+ALT+Up-Arrow - Move to the virtual desktop above if there is one
<br>
SHIFT+ALT+Down-Arrow - Move to the virtual desktop below if there is one
<font face=aircut3/12 color=#ffffff>
<p>
Note: Zooming in and out of windows will only work if you have an XFree86
server or one that impliments the Xf86VidMode extension. You also need
to define lots of screen modes for your display, so ensure your "Display"
subsection of your XF86Config looks like:
<font face=aircut3/12 color=#ccaacc>
<p>
SubSection "Display"<br>
Depth 16<br>
Modes "1600x1200" "1280x1024" "1152x864" "1024x768" "800x600" "640x480" "512x384" "400x300" "320x240"<br>
EndSubSection
<font face=aircut3/12 color=#ffffff>
<p>
Have a "Display" subsection per depth (this example is for 16 bit) and all
the resolutions defined as above.
<page columns=1 padding=16 name=desktops background=Edoc_bg.png linkcolor=#88dddd>
<font face=rothwell/25 color=#ffffff>
<p>
Multiple & Virtual Desktops
<font face=aircut3/12 color=#ffffff>
<page columns=1 padding=16 name=dragbar background=Edoc_bg.png linkcolor=#88dddd>
<font face=rothwell/25 color=#ffffff>
<p>
The Dragbar
<font face=aircut3/12 color=#ffffff>
<page columns=1 padding=16 name=pager background=Edoc_bg.png linkcolor=#88dddd>
<font face=rothwell/25 color=#ffffff>
<p>
The Pager
<font face=aircut3/12 color=#ffffff>
<page columns=1 padding=16 name=iconbox background=Edoc_bg.png linkcolor=#88dddd>
<font face=rothwell/25 color=#ffffff>
<p>
The Iconbox
<font face=aircut3/12 color=#ffffff>
<page columns=1 padding=16 name=settings background=Edoc_bg.png linkcolor=#88dddd>
<font face=rothwell/25 color=#ffffff>
<p>
Settings
<font face=aircut3/12 color=#ffffff>

10
dox/E-docs/Makefile.am Normal file
View File

@ -0,0 +1,10 @@
if FSSTD
edocdatadir = $(pkgdatadir)/E-docs
else
edocdatadir = $(prefix)/enlightenment/E-docs
endif
edocdata_DATA = @edocdata@
edocdata_PROGRAMS = @edocexec@
EXTRA_DIST = $(edocdata_DATA)

BIN
dox/E-docs/aircut3.ttf Normal file

Binary file not shown.

Binary file not shown.

66
dox/E-docs/interactive.sh Executable file
View File

@ -0,0 +1,66 @@
#!/bin/sh
cat << __EOF__
<page columns=1 padding=16 name=front background=Edoc_bg.png linkcolor=#88dddd>
<img src=E_logo.png x=32 y=64>
<font face=rothwell/25 color=#ffffff>
<p align=50%>
Hints and tips
<p align=50%>
<font face=aircut3/12 color=#ffffff>
<p>
__EOF__
# checking OS & arch info
UNAME=`uname -a`
OS=`echo "$UNAME" | awk '{print $1;}'`
OSVER=`echo "$UNAME" | awk '{print $3;}'`
ARCH=`echo "$UNAME" | awk '{print $12;}'`
# checking memory stats
MEM=`free`
TOTAL=`echo "$MEM" | grep Mem: | awk '{print $2;}'`
USED=`echo "$MEM" | grep buffers/cache | awk '{print $3;}'`
SWAPPED=`echo "$MEM" | grep Swap: | awk '{print $3;}'`
# checking X Server
XDPYINFO=`xdpyinfo`
VENDOR=`echo "$XDPYINFO" | grep "vendor string:" | awk -F: '{print $2;}'`
VERSION=`echo "$XDPYINFO" | grep "vendor release number:" | awk -F: '{print $2;}'`
DEPTH=`echo "$XDPYINFO" | grep "depths (" | awk -F: '{print $2;}' | awk '{print $1;}'`
DEPTHS=`echo "$XDPYINFO" | grep "depths (" | awk "-F(" '{print $2;}' | awk "-F)" '{print $1;}'`
echo "Your Operating System is:<br>"
echo "<font face=aircut3/12 color=#ccaacc>"
echo $OS"<br>"
echo "<font face=aircut3/12 color=#ffffff>"
echo "Your processor type is:<br><font face=aircut3/12 color=#ccaacc>"
echo $ARCH"<br><font face=aircut3/12 color=#ffffff>"
echo "Your system memory use is:<br><font face=aircut3/12 color=#ccaacc>"
echo $USED" Kb /"$TOTAL" Kb<br>"
echo $SWAPPED" Kb swapped out to disk<br><font face=aircut3/12 color=#ffffff>"
echo "Your X Server is:<br><font face=aircut3/12 color=#ccaacc>"
echo $VENDOR"<br>"
echo "<font face=aircut3/12 color=#ffffff>"
echo "Version:<br><font face=aircut3/12 color=#ccaacc>"
echo $VERSION"<br><font face=aircut3/12 color=#ffffff>"
echo "<font face=aircut3/12 color=#ffffff>"
echo "Running a color depth of:<br><font face=aircut3/12 color=#ccaacc>"
echo $DEPTH" bits per pixel<br><font face=aircut3/12 color=#ffffff>"
echo "Number of depths:<br><font face=aircut3/12 color=#ccaacc>"
echo $DEPTHS"<br><font face=aircut3/12 color=#ffffff>"
cat << __EOF__
<p>
Hit Next for more...
<page columns=1 padding=16 name=2 background=Edoc_bg.png linkcolor=#88dddd>
<font face=aircut3/12 color=#ffffff>
<p align=50%>
<p>
__EOF__
if [ "$DEPTHS" -gt 1 ]; then
echo "It seems you have more than one depth available on your display."
echo "Enlightenment will run but several features may be disabled or not work"
echo "correctly due to this."
echo "<p>"
echo "Please re-configure your X Server to only have one depth (eg 16, 24, 32)"
fi

BIN
dox/E-docs/neuropol.ttf Normal file

Binary file not shown.

BIN
dox/E-docs/rothwell.ttf Normal file

Binary file not shown.

BIN
dox/E-docs/unionform.ttf Normal file

Binary file not shown.

BIN
dox/E-docs/window.xcf Normal file

Binary file not shown.

BIN
dox/E-docs/x-files.ttf Normal file

Binary file not shown.

50
dox/Makefile.am Normal file
View File

@ -0,0 +1,50 @@
SUBDIRS=E-docs
EXTRA_DIST = ChangeLog README
if FSSTD
bindir = @bindir@
ENLIGHTENMENT_BIN=$(bindir)
ENLIGHTENMENT_ROOT=$(pkgdatadir)
else
ENLIGHTENMENT_BIN=$(prefix)/enlightenment/bin
ENLIGHTENMENT_ROOT=$(prefix)/enlightenment
bindir=$(ENLIGHTENMENT_BIN)
endif
bin_PROGRAMS = dox
dox_SOURCES = \
format.c \
file.c \
ttfont.c \
text.c \
dox.c \
title.xpm \
prev1.xpm \
prev2.xpm \
next1.xpm \
next2.xpm \
exit1.xpm \
exit2.xpm \
dox.h
LDADD = $(TTF_LIBS) $(FNLIB_LIBS) $(IMLIB_LIBS) -lm
INCLUDES=-I$(top_srcdir) $(IMLIB_CFLAGS) -I$(includedir) -I..
DEFS=-DENLIGHTENMENT_ROOT=\"@ENLIGHTENMENT_ROOT@\"
#install-exec-local:
# if [ x@USE_FSSTD@ = "xno" ]; then \
# ../mkinstalldirs $(exec_prefix)/bin; \
# for i in $(bin_PROGRAMS); do \
# rm -f $(exec_prefix)/bin/$$i; \
# $(LN_S) $(bindir)/$$i $(exec_prefix)/bin/$$i; \
# done; \
# fi
uninstall-local:
for i in $(bin_PROGRAMS); do \
rm -f $(exec_prefix)/bin/$$i; \
done

4
dox/README Normal file
View File

@ -0,0 +1,4 @@
This is DOX for Enlightenment - a very very very simple document viewer for
Help docs for Enlightenment. This is part of the Enlightenment distribution.
It is Copyright (C) 1998-1999 by The Rasterman (Carsten Haitzler). It is under
the license described in e/LICENSE

515
dox/dox.c Normal file
View File

@ -0,0 +1,515 @@
/* DOX for Enlightenment - by The Rasterman (C) 1998 */
#include "econfig.h"
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xosdefs.h>
#include <X11/Xproto.h>
#include <X11/keysym.h>
#include <X11/extensions/shape.h>
#include <X11/extensions/XTest.h>
#include <X11/extensions/XShm.h>
#include <Imlib.h>
#include <Fnlib.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include "econfig.h"
#include "dox.h"
#ifdef __alpha__ /* gets rid of some misalignment in GCC */
#pragma 2
#endif
/* Motif window hints */
#define MWM_HINTS_FUNCTIONS (1L << 0)
#define MWM_HINTS_DECORATIONS (1L << 1)
/* bit definitions for MwmHints.functions */
#define MWM_FUNC_ALL (1L << 0)
#define MWM_FUNC_RESIZE (1L << 1)
#define MWM_FUNC_MOVE (1L << 2)
#define MWM_FUNC_MINIMIZE (1L << 3)
#define MWM_FUNC_MAXIMIZE (1L << 4)
#define MWM_FUNC_CLOSE (1L << 5)
/* bit definitions for MwmHints.decorations */
#define MWM_DECOR_ALL (1L << 0)
#define MWM_DECOR_BORDER (1L << 1)
#define MWM_DECOR_RESIZEH (1L << 2)
#define MWM_DECOR_TITLE (1L << 3)
#define MWM_DECOR_MENU (1L << 4)
#define MWM_DECOR_MINIMIZE (1L << 5)
#define MWM_DECOR_MAXIMIZE (1L << 6)
#define PROP_MWM_HINTS_ELEMENTS 4
#define STARTPOS 4 /* to bypass next/prev/exit buttons for key binding positions */
typedef struct _mwmhints
{
CARD32 flags;
CARD32 functions;
CARD32 decorations;
INT32 inputMode;
}
MWMHints;
#include "title.xpm"
#include "prev1.xpm"
#include "prev2.xpm"
#include "next1.xpm"
#include "next2.xpm"
#include "exit1.xpm"
#include "exit2.xpm"
Display *disp;
ImlibData *id;
FnlibData *fd;
Window win_main, win_title, win_exit, win_next, win_prev, win_text,
win_cover;
int w, h, t;
ImlibImage *im_text;
ImlibImage *im_title;
ImlibImage *im_prev1, *im_prev2;
ImlibImage *im_next1, *im_next2;
ImlibImage *im_exit1, *im_exit2;
char *docdir;
Window CreateWindow(Window parent, int x, int y, int ww, int hh);
int ReadHeader(FILE * f);
int ReadPages(FILE * f);
Window
CreateWindow(Window parent, int x, int y, int ww, int hh)
{
Window win;
XSetWindowAttributes attr;
MWMHints mwm;
/* Atom a; */
XSizeHints hnt;
attr.backing_store = NotUseful;
attr.override_redirect = False;
attr.colormap = Imlib_get_colormap(id);
attr.border_pixel = 0;
attr.background_pixel = 0;
attr.save_under = False;
mwm.flags = MWM_HINTS_DECORATIONS;
mwm.functions = 0;
mwm.decorations = 0;
mwm.inputMode = 0;
/* a = XInternAtom(disp, "_MOTIF_WM_HINTS", False); */
win = XCreateWindow(disp, parent, x, y, ww, hh, 0, id->x.depth,
InputOutput, Imlib_get_visual(id),
CWOverrideRedirect | CWSaveUnder | CWBackingStore |
CWColormap | CWBackPixel | CWBorderPixel, &attr);
XSetWindowBackground(disp, win, 0);
/* XChangeProperty(disp, win, a, a, 32, PropModeReplace,
* (unsigned char *)&mwm, sizeof(MWMHints) / 4); */
XStoreName(disp, win, "DOX: Enlightenment Document Viewer");
hnt.flags = USPosition | USSize | PPosition | PSize | PMinSize | PMaxSize;
hnt.x = x;
hnt.y = y;
hnt.width = ww;
hnt.height = hh;
hnt.min_width = ww;
hnt.max_width = ww;
hnt.min_height = hh;
hnt.max_height = hh;
XSetWMNormalHints(disp, win, &hnt);
return win;
}
#define FREE_LINKS \
ll = l; \
while (ll) \
{ \
l = ll; \
ll = ll->next; \
free(l->name); \
free(l); \
}
#define UPDATE_NOW \
{ \
XSetWindowBackgroundPixmap(disp, win_text, draw); \
XClearWindow(disp, win_text); \
}
#define UPDATE \
{ \
int up_i, up_j; \
int up_lut[16] = { 0, 8, 4, 12, 2, 6, 10, 14, \
3, 11, 1, 9, 7, 13, 5, 15}; \
XSetWindowBackgroundPixmap(disp, win_text, draw); \
for (up_j = 0; up_j < 16; up_j++) \
{ \
for (up_i = 0; up_i < h; up_i += 16) \
{ \
XClearArea(disp, win_text, 0, up_i + up_lut[up_j], w, 1, False); \
} \
XSync(disp, False); \
} \
}
int
main(int argc, char **argv)
{
int pagenum;
int x, y;
int wx, wy;
FILE *f;
char *s;
Pixmap draw = 0;
Link *l = NULL, *ll = NULL;
ImlibBorder ibd;
ImlibInitParams params;
int *page_hist = NULL;
int page_hist_len = 1;
int page_hist_pos = 0;
w = 512;
h = 400;
x = 0;
y = 0;
pagenum = 0;
disp = XOpenDisplay(NULL);
params.flags = PARAMS_IMAGECACHESIZE | PARAMS_PIXMAPCACHESIZE;
params.imagecachesize = (w * h * 3 * 2);
params.pixmapcachesize = (w * h * 3 * 2 * 8);
id = Imlib_init_with_params(disp, &params);
Imlib_set_render_type(id, RT_DITHER_TRUECOL);
fd = Fnlib_init(id);
im_title = Imlib_create_image_from_xpm_data(id, title_xpm);
ibd.left = 50;
ibd.right = 2;
ibd.top = 2;
ibd.bottom = 2;
Imlib_set_image_border(id, im_title, &ibd);
im_prev1 = Imlib_create_image_from_xpm_data(id, prev1_xpm);
im_prev2 = Imlib_create_image_from_xpm_data(id, prev2_xpm);
im_next1 = Imlib_create_image_from_xpm_data(id, next1_xpm);
im_next2 = Imlib_create_image_from_xpm_data(id, next2_xpm);
im_exit1 = Imlib_create_image_from_xpm_data(id, exit1_xpm);
im_exit2 = Imlib_create_image_from_xpm_data(id, exit2_xpm);
if (argc < 2)
{
printf("usage:\n%s [-page num] Edoc_dir\n", argv[0]);
exit(1);
}
if (!strcmp(argv[1], "-page"))
{
pagenum = atoi(argv[2]);
docdir = strdup(argv[3]);
}
else
docdir = strdup(argv[1]);
s = malloc(strlen(docdir) + 1 + 5);
strcpy(s, docdir);
strcat(s, "/MAIN");
f = fopen(s, "r");
if (!f)
{
printf("Edoc_dir does not contain a MAIN file\n");
exit(1);
}
t = 16;
GetObjects(f);
fclose(f);
Fnlib_add_dir(fd, docdir);
wx = (DisplayWidth(disp, DefaultScreen(disp)) - w) / 2;
wy = (DisplayHeight(disp, DefaultScreen(disp)) - (h + t)) / 2;
win_main = CreateWindow(id->x.root, wx, wy, w, h + t);
win_title = CreateWindow(win_main, 0, 0, (w - 64 - 64 - t), t);
win_prev = CreateWindow(win_main, (w - 64 - 64 - t), 0, 64, t);
XSelectInput(disp, win_prev, ButtonPressMask | ButtonReleaseMask);
win_next = CreateWindow(win_main, (w - 64 - 64 - t) + 64, 0, 64, t);
XSelectInput(disp, win_next, ButtonPressMask | ButtonReleaseMask);
win_exit = CreateWindow(win_main, (w - 64 - 64 - t) + 64 + 64, 0, t, t);
XSelectInput(disp, win_exit, ButtonPressMask | ButtonReleaseMask);
win_text = CreateWindow(win_main, 0, t, w, h);
XSelectInput(disp, win_text, ButtonPressMask | ButtonReleaseMask |
KeyPressMask | KeyReleaseMask | PointerMotionMask);
draw = XCreatePixmap(disp, win_text, w, h, id->x.depth);
XSetWindowBackgroundPixmap(disp, win_text, draw);
Imlib_apply_image(id, im_title, win_title);
Imlib_apply_image(id, im_exit1, win_exit);
Imlib_apply_image(id, im_next1, win_next);
Imlib_apply_image(id, im_prev1, win_prev);
l = RenderPage(draw, pagenum, w, h);
XMapWindow(disp, win_text);
XMapWindow(disp, win_exit);
XMapWindow(disp, win_next);
XMapWindow(disp, win_prev);
XMapWindow(disp, win_title);
XMapWindow(disp, win_main);
XSync(disp, False);
page_hist = malloc(sizeof(int));
page_hist[0] = 0;
for (;;)
{
KeySym key;
XEvent ev;
XNextEvent(disp, &ev);
switch (ev.type)
{
case KeyPress:
key = XLookupKeysym(&ev.xkey, 0);
switch (key)
{
case XK_Escape:
exit(0);
break;
case XK_Down:
case XK_Right:
break;
case XK_Up:
case XK_Left:
break;
case XK_Return:
break;
case XK_Home:
FREE_LINKS;
pagenum = 0;
pagenum = FixPage(pagenum);
l = RenderPage(draw, pagenum, w, h);
UPDATE;
break;
case XK_End:
FREE_LINKS;
pagenum = 99999;
pagenum = FixPage(pagenum);
l = RenderPage(draw, pagenum, w, h);
UPDATE;
break;
case XK_Prior:
FREE_LINKS;
pagenum--;
pagenum = FixPage(pagenum);
l = RenderPage(draw, pagenum, w, h);
UPDATE;
break;
case XK_Next:
FREE_LINKS;
pagenum++;
pagenum = FixPage(pagenum);
l = RenderPage(draw, pagenum, w, h);
UPDATE;
break;
}
break;
case ButtonPress:
if (ev.xbutton.window == win_prev)
Imlib_apply_image(id, im_prev2, win_prev);
else if (ev.xbutton.window == win_next)
Imlib_apply_image(id, im_next2, win_next);
else if (ev.xbutton.window == win_exit)
Imlib_apply_image(id, im_exit2, win_exit);
else
{
int x, y;
x = ev.xbutton.x;
y = ev.xbutton.y;
ll = l;
while (ll)
{
if ((x >= ll->x) && (y >= ll->y) &&
(x < (ll->x + ll->w)) &&
(y < (ll->y + ll->h)))
{
int pg;
if (!strncmp("EXEC.", ll->name, 5))
{
if (!fork())
{
char *exe;
exe = &(ll->name[5]);
execl("/bin/sh", "/bin/sh", "-c", exe, NULL);
exit(0);
}
}
else if (!strncmp("INPUT.", ll->name, 6))
{
FILE *p;
char *exe, tmp[1024];
exe = &(ll->name[6]);
if (exe[0] != '/')
{
sprintf(tmp, "%s/%s", docdir, exe);
exe = tmp;
}
p = popen(exe, "r");
if (p)
{
int dirlen = 0;
char *sp;
sp = exe;
while ((*sp) && (*sp != ' '))
sp++;
while ((*sp != '/') && (sp != exe))
sp--;
dirlen = sp - exe;
if (dirlen > 1)
{
free(docdir);
docdir = malloc(dirlen + 1);
memcpy(docdir, exe, dirlen);
docdir[dirlen] = 0;
}
GetObjects(p);
pclose(p);
if (page_hist)
free(page_hist);
page_hist = malloc(sizeof(int));
page_hist[0] = 0;
page_hist_len = 1;
pagenum = 0;
page_hist_pos = 0;
FREE_LINKS;
l = RenderPage(draw, pagenum, w, h);
UPDATE;
}
}
else
{
pg = GetPage(ll->name);
if (pg >= 0)
{
FREE_LINKS;
pagenum = pg;
if (page_hist_pos >= page_hist_len)
{
page_hist_len++;
page_hist =
realloc(page_hist,
sizeof(int) * page_hist_len);
}
page_hist_pos++;
page_hist[page_hist_pos] = pagenum;
l = RenderPage(draw, pagenum, w, h);
UPDATE;
}
}
break;
}
ll = ll->next;
}
}
break;
case ButtonRelease:
if (ev.xbutton.window == win_prev)
{
Imlib_apply_image(id, im_prev1, win_prev);
FREE_LINKS;
page_hist_pos--;
if (page_hist_pos < 0)
page_hist_pos = 0;
pagenum = page_hist[page_hist_pos];
l = RenderPage(draw, pagenum, w, h);
UPDATE;
}
else if (ev.xbutton.window == win_next)
{
int prev_pagenum;
Imlib_apply_image(id, im_next1, win_next);
FREE_LINKS;
prev_pagenum = pagenum;
pagenum++;
pagenum = FixPage(pagenum);
if (pagenum != prev_pagenum)
{
if (page_hist_pos >= page_hist_len)
{
page_hist_len++;
page_hist = realloc(page_hist,
sizeof(int) * page_hist_len);
page_hist[page_hist_len - 1] = pagenum;
page_hist_pos = page_hist_len - 1;
}
else
page_hist_pos++;
l = RenderPage(draw, pagenum, w, h);
UPDATE;
}
}
else if (ev.xbutton.window == win_exit)
{
Imlib_apply_image(id, im_exit1, win_exit);
exit(0);
}
break;
case EnterNotify:
break;
case LeaveNotify:
break;
case MotionNotify:
while (XCheckTypedEvent(disp, ev.type, &ev));
{
int x, y;
static Link *pl = NULL;
char found = 0;
x = ev.xmotion.x;
y = ev.xmotion.y;
ll = l;
while (ll)
{
if ((x >= ll->x) && (y >= ll->y) &&
(x < (ll->x + ll->w)) &&
(y < (ll->y + ll->h)))
{
GC gc;
XGCValues gcv;
int r, g, b;
if (pl != ll)
{
if (pl)
{
UPDATE_NOW;
}
GetLinkColors(pagenum, &r, &g, &b);
gc = XCreateGC(disp, win_text, 0, &gcv);
XSetForeground(disp, gc,
Imlib_best_color_match(id, &r, &g, &b));
XDrawRectangle(disp, win_text, gc, ll->x, ll->y,
ll->w, ll->h);
XFreeGC(disp, gc);
pl = ll;
}
found = 1;
ll = NULL;
}
if (ll)
ll = ll->next;
}
if (!found)
{
UPDATE_NOW;
pl = NULL;
}
}
break;
default:
break;
}
}
}

225
dox/dox.h Normal file
View File

@ -0,0 +1,225 @@
/*****************************************************************************/
/* Enlightenment - The Window Manager that dares to do what others don't */
/*****************************************************************************/
/* Copyright (C) 1997 - 1999 Carsten Haitzler (The Rasterman) */
/* */
/* This program and utilites 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 software is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU */
/* General Public License for more details. */
/* */
/* You should have received a copy of the GNU Library General Public */
/* License along with this software; if not, write to the */
/* Free Software Foundation, Inc., 59 Temple Place - Suite 330, */
/* Boston, MA 02111-1307, USA. */
/*****************************************************************************/
#include "econfig.h"
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xproto.h>
#include <X11/Xlocale.h>
#include <X11/cursorfont.h>
#include <X11/extensions/shape.h>
#include <X11/extensions/XShm.h>
#include <Imlib.h>
#include <Fnlib.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <stdarg.h>
#include <string.h>
#include <fcntl.h>
#include <dirent.h>
#include <signal.h>
#include <time.h>
#include <math.h>
#include <pwd.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <sys/stat.h>
#include <sys/resource.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <freetype.h>
#define FILEPATH_LEN_MAX 4096
#define DEFAULT_LINKCOLOR_R 30
#define DEFAULT_LINKCOLOR_G 50
#define DEFAULT_LINKCOLOR_B 160
#define TT_VALID( handle ) ( ( handle ).z != NULL )
#ifndef MAX
#define MAX(a,b) ((a)>(b)?(a):(b))
#endif
typedef struct _efont
{
TT_Engine engine;
TT_Face face;
TT_Instance instance;
TT_Face_Properties properties;
int num_glyph;
TT_Glyph *glyphs;
TT_Raster_Map **glyphs_cached;
int max_descent;
int max_ascent;
}
Efont;
typedef struct _textstate
{
char *fontname;
FnlibStyle style;
FnlibFont *font;
ImlibColor fg_col;
ImlibColor bg_col;
int effect;
Efont *efont;
XFontStruct *xfont;
XFontSet xfontset;
int xfontset_ascent;
int height;
}
TextState;
typedef enum _type
{
IMG,
BR,
FONT,
P,
TEXT,
PAGE
}
Type;
typedef struct _img
{
char *src;
char *src2;
char *src3;
int x, y;
char *link;
int w, h;
}
Img_;
typedef struct _font
{
char *face;
int r, g, b;
}
Font_;
typedef struct _p
{
float align;
}
P_;
typedef struct _object
{
Type type;
void *object;
}
Object;
typedef struct _page
{
char *name;
int count;
Object *obj;
int columns;
int padding;
int linkr, linkg, linkb;
char *background;
}
Page;
typedef struct _link
{
char *name;
int x, y, w, h;
struct _link *next;
}
Link;
void Efont_extents(Efont * f, char *text,
int *font_ascent_return,
int *font_descent_return, int *width_return,
int *max_ascent_return,
int *max_descent_return,
int *lbearing_return, int *rbearing_return);
Efont *Efont_load(char *file, int size);
void Efont_free(Efont * f);
void EFont_draw_string(Display * disp, Drawable win, GC gc,
int x, int y, char *text,
Efont * font, Visual * vis, Colormap cm);
char **TextGetLines(char *text, int *count);
void TextStateLoadFont(TextState * ts);
void TextSize(TextState * ts, char *text,
int *width, int *height, int fsize);
void TextDraw(TextState * ts, Window win, char *text,
int x, int y, int w, int h, int fsize,
int justification);
char *FileExtension(char *file);
void md(char *s);
int exists(char *s);
void mkdirs(char *s);
int isfile(char *s);
int isdir(char *s);
char **ls(char *dir, int *num);
void freestrlist(char **l, int num);
void rm(char *s);
void mv(char *s, char *ss);
void cp(char *s, char *ss);
time_t moddate(char *s);
int filesize(char *s);
int fileinode(char *s);
int filedev(char *s);
void cd(char *s);
char *cwd(void);
int permissions(char *s);
int owner(char *s);
int group(char *s);
char *username(int uid);
char *homedir(int uid);
char *usershell(int uid);
char *atword(char *s, int num);
char *atchar(char *s, char c);
char *getword(char *s, int num);
void word(char *s, int num, char *wd);
int canread(char *s);
int canwrite(char *s);
int canexec(char *s);
char *fileof(char *s);
char *fullfileof(char *s);
char *pathtoexec(char *file);
char *pathtofile(char *file);
void AddPage(Object * obj);
void AddObject(Object * obj);
void BuildObj(Object * obj, char *var, char *param);
int GetNextTag(Object * obj);
char *GetTextUntilTag(void);
int GetObjects(FILE *f);
int FixPage(int p);
int GetPage(char *name);
void GetLinkColors(int page_num, int *r, int *g, int *b);
Link *RenderPage(Window win, int page_num, int w, int h);
extern Display *disp;
extern ImlibData *id;
extern FnlibData *fd;
extern char *docdir;

201
dox/exit1.xpm Normal file
View File

@ -0,0 +1,201 @@
/* XPM */
static char * exit1_xpm[] = {
"16 16 182 2",
" c None",
". c #CECECD",
"+ c #D7D7D5",
"@ c #CFCFCE",
"# c #D0D0CE",
"$ c #CFCECB",
"% c #DCDAD8",
"& c #EEEDEC",
"* c #FAFAFA",
"= c #FEFEFE",
"- c #CECBC7",
"; c #CFCDC9",
"> c #C4C3C0",
", c #D1D1CE",
"' c #CDCDCB",
") c #C6C4BF",
"! c #E7E5E3",
"~ c #FFFFFF",
"{ c #EEEDEB",
"] c #D7D5D1",
"^ c #C8C6C0",
"/ c #C3C0BA",
"( c #AFADA9",
"_ c #CACAC7",
": c #CACAC9",
"< c #CBCBCA",
"[ c #D6D6D4",
"} c #C4C2BD",
"| c #DDDBD8",
"1 c #ADA8A0",
"2 c #ACA8A0",
"3 c #ACA79F",
"4 c #918C86",
"5 c #969590",
"6 c #CBCBC8",
"7 c #D1D0CE",
"8 c #CCCBC6",
"9 c #D2D0CC",
"0 c #494744",
"a c #C8C5C0",
"b c #B3AFA9",
"c c #726F6B",
"d c #9A9892",
"e c #ADACAA",
"f c #D0CFCD",
"g c #E5E3E1",
"h c #E8E7E5",
"i c #B1ADA6",
"j c #484643",
"k c #B8B6B3",
"l c #474643",
"m c #4D4B48",
"n c #CCC9C5",
"o c #A9A59F",
"p c #868581",
"q c #CECECC",
"r c #C9C7C2",
"s c #F6F6F5",
"t c #C3BFB9",
"u c #A59F96",
"v c #8B867E",
"w c #43403D",
"x c #42403C",
"y c #44413D",
"z c #CECBC6",
"A c #B2ADA5",
"B c #A49E95",
"C c #696764",
"D c #C6C5C2",
"E c #BAB9B5",
"F c #ADA8A1",
"G c #A5A098",
"H c #8A867F",
"I c #43413D",
"J c #454340",
"K c #C4C1BC",
"L c #A49F97",
"M c #9D9991",
"N c #5D5C58",
"O c #BBB9B6",
"P c #C3C2BF",
"Q c #F6F5F5",
"R c #A29D95",
"S c #75716C",
"T c #413F3C",
"U c #C2BFBA",
"V c #A19C94",
"W c #88847E",
"X c #676562",
"Y c #C3C3BF",
"Z c #C1C0BB",
"` c #989389",
" . c #67625B",
".. c #393733",
"+. c #413F3B",
"@. c #BDBAB4",
"#. c #393732",
"$. c #B6B2AB",
"%. c #625E57",
"&. c #75736D",
"*. c #C4C3BE",
"=. c #C4C2BF",
"-. c #C7C6C1",
";. c #B0ACA5",
">. c #726D65",
",. c #373531",
"'. c #3A3834",
"). c #BAB7B1",
"!. c #898378",
"~. c #888277",
"{. c #373530",
"]. c #3C3A35",
"^. c #A29F99",
"/. c #514E4A",
"(. c #95928D",
"_. c #C5C3C0",
":. c #C3C3C0",
"<. c #C0BDB9",
"[. c #787369",
"}. c #9D9992",
"|. c #A9A69F",
"1. c #79746A",
"2. c #777268",
"3. c #8C887F",
"4. c #8B8882",
"5. c #62615D",
"6. c #676560",
"7. c #A9A7A2",
"8. c #C1C1BE",
"9. c #C2C2BF",
"0. c #C1C1BF",
"a. c #B5B4B1",
"b. c #AEABA6",
"c. c #807B71",
"d. c #797368",
"e. c #787368",
"f. c #736E63",
"g. c #656056",
"h. c #534F48",
"i. c #474540",
"j. c #65625C",
"k. c #A09D97",
"l. c #B8B7B3",
"m. c #C3C3C1",
"n. c #D4D4D4",
"o. c #D0D1D0",
"p. c #C9C8C6",
"q. c #B8B6B4",
"r. c #B4B2AE",
"s. c #9E9B94",
"t. c #928E86",
"u. c #4C4A45",
"v. c #514F4A",
"w. c #625F5A",
"x. c #827F79",
"y. c #AAA8A3",
"z. c #C2C1BF",
"A. c #D0D0CF",
"B. c #D2D2D1",
"C. c #E2E3E1",
"D. c #E0E0DE",
"E. c #DEDEDB",
"F. c #DAD9D8",
"G. c #D2D1D0",
"H. c #C8C7C4",
"I. c #BDBBB6",
"J. c #BCBAB5",
"K. c #C6C5C1",
"L. c #D4D4D2",
"M. c #DDDDDB",
"N. c #DFDFDD",
"O. c #DEDEDD",
"P. c #DADADA",
"Q. c #D9D9D9",
"R. c #D7D7D7",
"S. c #D8D8D7",
"T. c #D5D5D4",
"U. c #D4D4D3",
"V. c #D6D6D5",
"W. c #D6D6D6",
"X. c #D5D5D5",
"Y. c #D7D8D7",
". . . . . . . . . . . . + + + + ",
". . @ # $ % & * = - ; > , . + + ",
"' ' ' ) ! ~ { ] ^ / / / ( _ : < ",
"[ [ } | ~ - 1 1 2 3 4 4 3 5 6 @ ",
"7 7 8 ~ 9 0 0 a b c 0 0 - d e f ",
"6 6 g h i j j j k l l m n o p q ",
"r r s t u v w w w x y z A B C D ",
"E E ~ F G G H I I J K L L M N O ",
"P P Q R R S x x x T T U V W X Y ",
"Z Z | ` .....+.@.#.#.#.$.%.&.*.",
"=.=.-.;.>.,.'.).!.~.{.].^./.(._.",
":.:.: <.[.}.|.1.[.2.3.4.5.6.7.8.",
"9.9.0.a.b.c.d.e.f.g.h.i.j.k.l.m.",
"n.n.o.p.q.r.s.t.u.v.w.x.y.z.A.B.",
"C.C.D.E.F.G.H.I.J.J.J.K.L.M.N.O.",
"P.P.P.Q.Q.R.S.T.U.U.U.V.W.X.Y.U."};

203
dox/exit2.xpm Normal file
View File

@ -0,0 +1,203 @@
/* XPM */
static char * exit2_xpm[] = {
"16 16 184 2",
" c None",
". c #CECECD",
"+ c #D7D7D5",
"@ c #CFCFCE",
"# c #D0D0CE",
"$ c #CFCECB",
"% c #92908D",
"& c #434241",
"* c #111111",
"= c #010101",
"- c #CFCCC8",
"; c #CFCDC9",
"> c #D2D1CE",
", c #D1D1CE",
"' c #D4D3D2",
") c #CDCDCB",
"! c #C6C4BF",
"~ c #4F4D4B",
"{ c #000000",
"] c #383735",
"^ c #82807C",
"/ c #B1AFA9",
"( c #C4C1BB",
"_ c #CDCBC7",
": c #CACAC7",
"< c #CACAC9",
"[ c #CBCBCA",
"} c #D6D6D4",
"| c #C4C2BD",
"1 c #454340",
"2 c #65625E",
"3 c #ABA69E",
"4 c #ABA79F",
"5 c #ADA8A0",
"6 c #918D86",
"7 c #CAC7C3",
"8 c #CBCBC8",
"9 c #D1D0CE",
"0 c #83807C",
"a c #696763",
"b c #484644",
"c c #C7C4BF",
"d c #B2AEA8",
"e c #73706C",
"f c #494744",
"g c #C3BFBA",
"h c #D0CFCD",
"i c #393836",
"j c #32312F",
"k c #AFABA4",
"l c #474542",
"m c #B7B5B2",
"n c #484643",
"o c #4D4B49",
"p c #CDCAC6",
"q c #B4B0A9",
"r c #D7D6D2",
"s c #CECECC",
"t c #C9C7C2",
"u c #0D0D0C",
"v c #6E6A64",
"w c #A39D94",
"x c #89847C",
"y c #42403C",
"z c #43403D",
"A c #44423E",
"B c #CFCBC7",
"C c #B3AEA6",
"D c #A59F96",
"E c #D7D5D2",
"F c #C6C5C2",
"G c #BAB9B5",
"H c #959089",
"I c #A39E96",
"J c #88847D",
"K c #42403D",
"L c #464440",
"M c #C5C2BD",
"N c #A5A098",
"O c #A8A49C",
"P c #D5D4D0",
"Q c #BBB9B6",
"R c #C3C2BF",
"S c #0D0C0C",
"T c #A09B93",
"U c #74706A",
"V c #413F3B",
"W c #413F3C",
"X c #C3C0BB",
"Y c #A29D95",
"Z c #B0ACA5",
"` c #D5D3D0",
" . c #C3C3BF",
".. c #C1C0BB",
"+. c #312F2C",
"@. c #807B71",
"#. c #656159",
"$. c #393632",
"%. c #403E3A",
"&. c #BDB9B3",
"*. c #393732",
"=. c #B6B2AB",
"-. c #B8B4AD",
";. c #C4C3BE",
">. c #C4C2BF",
",. c #7D7B77",
"'. c #5B5750",
"). c #716C63",
"!. c #373430",
"~. c #3A3733",
"{. c #B9B6B0",
"]. c #888277",
"^. c #898378",
"/. c #373530",
"(. c #3D3A36",
"_. c #C1BEB8",
":. c #B8B5B0",
"<. c #C5C3C0",
"[. c #C3C3C0",
"}. c #53524D",
"|. c #767167",
"1. c #9B9890",
"2. c #A8A49E",
"3. c #777268",
"4. c #787369",
"5. c #8D8880",
"6. c #AFACA6",
"7. c #C8C5C1",
"8. c #AFADA8",
"9. c #A9A7A2",
"0. c #C1C1BE",
"a. c #C2C2BF",
"b. c #C1C1BF",
"c. c #B5B4B1",
"d. c #706D66",
"e. c #7D796F",
"f. c #777166",
"g. c #767166",
"h. c #7C766C",
"i. c #8C877E",
"j. c #A8A59E",
"k. c #C0BDB8",
"l. c #ADAAA4",
"m. c #A09D97",
"n. c #B8B7B3",
"o. c #C3C3C1",
"p. c #D4D4D4",
"q. c #D0D1D0",
"r. c #C9C8C6",
"s. c #B8B6B4",
"t. c #969490",
"u. c #9D9A93",
"v. c #908C84",
"w. c #C3C0BD",
"x. c #BFBCB8",
"y. c #B3B0AA",
"z. c #A5A29C",
"A. c #AAA8A3",
"B. c #C2C1BF",
"C. c #D0D0CF",
"D. c #D2D2D1",
"E. c #E2E3E1",
"F. c #E0E0DE",
"G. c #DEDEDB",
"H. c #DAD9D8",
"I. c #D2D1D0",
"J. c #C8C7C4",
"K. c #BDBBB6",
"L. c #BCBAB5",
"M. c #C6C5C1",
"N. c #D4D4D2",
"O. c #DDDDDB",
"P. c #DFDFDD",
"Q. c #DEDEDD",
"R. c #DADADA",
"S. c #D9D9D9",
"T. c #D7D7D7",
"U. c #D8D8D7",
"V. c #D5D5D4",
"W. c #D4D4D3",
"X. c #D6D6D5",
"Y. c #D6D6D6",
"Z. c #D5D5D5",
"`. c #D7D8D7",
". . . . . . . . . . . . + + + + ",
". . @ # $ % & * = - ; > , ' + + ",
") ) ) ! ~ { ] ^ / ( ( ( _ : < [ ",
"} } | 1 { 2 3 3 4 5 6 6 5 7 8 @ ",
"9 9 0 { a b b c d e f f - g h h ",
"8 8 i j k l l l m n n o p q r s ",
"t t u v w x y y y z A B C D E F ",
"G G { H I I J K K L M N N O P Q ",
"R R S T T U V V W y y X Y Z ` .",
"....+.@.#.$.$.%.&.*.*.*.=.-.! ;.",
">.>.,.'.).!.~.{.].^./.(._.t :.<.",
"[.[.< }.|.1.2.3.3.4.5.6.7.8.9.0.",
"a.a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.",
"p.p.q.r.s.t.u.v.w.x.y.z.A.B.C.D.",
"E.E.F.G.H.I.J.K.L.L.L.M.N.O.P.Q.",
"R.R.R.S.S.T.U.V.W.W.W.X.Y.Z.`.W."};

752
dox/file.c Normal file
View File

@ -0,0 +1,752 @@
#include "dox.h"
char *
FileExtension(char *file)
{
char *p;
p = strrchr(file, '.');
if (p != NULL)
{
return (p + 1);
}
return ("");
}
void
md(char *s)
{
if ((!s) || (!*s))
return;
mkdir(s, S_IRWXU);
return;
}
int
exists(char *s)
{
struct stat st;
if ((!s) || (!*s))
return (0);
if (stat(s, &st) < 0)
return (0);
return (1);
}
void
mkdirs(char *s)
{
char ss[FILEPATH_LEN_MAX];
int i, ii;
i = 0;
ii = 0;
while (s[i])
{
ss[ii++] = s[i];
ss[ii] = 0;
if (s[i] == '/')
{
if (!exists(ss))
md(ss);
else if (!isdir(ss))
return;
}
i++;
}
}
int
isfile(char *s)
{
struct stat st;
if ((!s) || (!*s))
return (0);
if (stat(s, &st) < 0)
return (0);
if (S_ISREG(st.st_mode))
return (1);
return (0);
}
int
isdir(char *s)
{
struct stat st;
if ((!s) || (!*s))
return (0);
if (stat(s, &st) < 0)
return (0);
if (S_ISDIR(st.st_mode))
return (1);
return (0);
}
char **
ls(char *dir, int *num)
{
int i, dirlen;
int done = 0;
DIR *dirp;
char **names;
struct dirent *dp;
if ((!dir) || (!*dir))
return (0);
dirp = opendir(dir);
if (!dirp)
{
*num = 0;
return (NULL);
}
/* count # of entries in dir (worst case) */
for (dirlen = 0; (dp = readdir(dirp)) != NULL; dirlen++);
if (!dirlen)
{
closedir(dirp);
*num = dirlen;
return (NULL);
}
names = (char **)malloc(dirlen * sizeof(char *));
if (!names)
return (NULL);
rewinddir(dirp);
for (i = 0; i < dirlen;)
{
dp = readdir(dirp);
if (!dp)
break;
if ((strcmp(dp->d_name, ".")) && (strcmp(dp->d_name, "..")))
{
names[i] = strdup(dp->d_name);
i++;
}
}
if (i < dirlen)
dirlen = i; /* dir got shorter... */
closedir(dirp);
*num = dirlen;
/* do a simple bubble sort here to alphanumberic it */
while (!done)
{
done = 1;
for (i = 0; i < dirlen - 1; i++)
{
if (strcmp(names[i], names[i + 1]) > 0)
{
char *tmp;
tmp = names[i];
names[i] = names[i + 1];
names[i + 1] = tmp;
done = 0;
}
}
}
return (names);
}
void
freestrlist(char **l, int num)
{
if (!l)
return;
while (num--)
if (l[num])
free(l[num]);
free(l);
return;
}
void
rm(char *s)
{
if ((!s) || (!*s))
return;
unlink(s);
return;
}
void
mv(char *s, char *ss)
{
if ((!s) || (!ss) || (!*s) || (!*ss))
return;
rename(s, ss);
return;
}
void
cp(char *s, char *ss)
{
int i;
FILE *f, *ff;
unsigned char buf[1];
if ((!s) || (!ss) || (!*s) || (!*ss))
return;
if (!exists(s))
return;
i = filesize(s);
f = fopen(s, "r");
if (!f)
return;
ff = fopen(ss, "w");
if (!ff)
{
fclose(f);
return;
}
while (fread(buf, 1, 1, f))
fwrite(buf, 1, 1, ff);
fclose(f);
fclose(ff);
return;
}
time_t
moddate(char *s)
{
struct stat st;
if ((!s) || (!*s))
return (0);
if (!stat(s, &st) < 0)
return (0);
if (st.st_mtime > st.st_ctime)
{
return (st.st_mtime);
}
else
return (st.st_ctime);
return (0);
}
int
filesize(char *s)
{
struct stat st;
if ((!s) || (!*s))
return (0);
if (stat(s, &st) < 0)
return (0);
return ((int)st.st_size);
}
int
fileinode(char *s)
{
struct stat st;
if ((!s) || (!*s))
return (0);
if (stat(s, &st) < 0)
return (0);
return ((int)st.st_ino);
}
int
filedev(char *s)
{
struct stat st;
if ((!s) || (!*s))
return (0);
if (stat(s, &st) < 0)
return (0);
return ((int)st.st_dev);
}
void
cd(char *s)
{
if ((!s) || (!*s))
return;
chdir(s);
return;
}
char *
cwd(void)
{
char *s;
char ss[FILEPATH_LEN_MAX];
getcwd(ss, FILEPATH_LEN_MAX);
s = strdup(ss);
return (s);
}
int
permissions(char *s)
{
struct stat st;
if ((!s) || (!*s))
return (0);
if (!stat(s, &st) < 0)
return (0);
return (st.st_mode);
}
int
owner(char *s)
{
struct stat st;
if ((!s) || (!*s))
return (0);
if (!stat(s, &st) < 0)
return (0);
return (st.st_uid);
}
int
group(char *s)
{
struct stat st;
if ((!s) || (!*s))
return (0);
if (!stat(s, &st) < 0)
return (0);
return (st.st_gid);
}
char *
username(int uid)
{
static int usr_uid = -1;
static char *usr_s = NULL;
char *s;
struct passwd *pwd;
if (usr_uid < 0)
usr_uid = getuid();
if ((uid == usr_uid) && (usr_s))
return strdup(usr_s);
pwd = getpwuid(uid);
if (pwd)
{
s = strdup(pwd->pw_name);
if (uid == usr_uid)
usr_s = strdup(s);
return (s);
}
return (strdup("unknown"));
}
char *
homedir(int uid)
{
static int usr_uid = -1;
static char *usr_s = NULL;
char *s;
struct passwd *pwd;
if (usr_uid < 0)
usr_uid = getuid();
if ((uid == usr_uid) && (usr_s))
return strdup(usr_s);
pwd = getpwuid(uid);
if (pwd)
{
s = strdup(pwd->pw_dir);
if (uid == usr_uid)
usr_s = strdup(s);
return (s);
}
return (strdup("/tmp"));
}
char *
usershell(int uid)
{
static int usr_uid = -1;
static char *usr_s = NULL;
char *s;
struct passwd *pwd;
if (usr_uid < 0)
usr_uid = getuid();
if ((uid == usr_uid) && (usr_s))
return strdup(usr_s);
pwd = getpwuid(uid);
if (pwd)
{
s = strdup(pwd->pw_shell);
if (uid == usr_uid)
usr_s = strdup(s);
return (s);
}
return (strdup("/bin/sh"));
}
char *
atword(char *s, int num)
{
int cnt, i;
if (!s)
return (NULL);
cnt = 0;
i = 0;
while (s[i])
{
if ((s[i] != ' ') && (s[i] != '\t'))
{
if (i == 0)
cnt++;
else if ((s[i - 1] == ' ') || (s[i - 1] == '\t'))
cnt++;
if (cnt == num)
return (&s[i]);
}
i++;
}
return (NULL);
}
char *
atchar(char *s, char c)
{
int i;
if (!s)
return (NULL);
i = 0;
while (s[i] != 0)
{
if (s[i] == c)
return (&s[i]);
i++;
}
return (NULL);
}
char *
getword(char *s, int num)
{
/* *********FIXME**************
* This function is broken but it isn't in use so I'll fix it later
* (DO NOT USE UNTIL FIXED
*/
int cnt, i;
char *start, *finish, *ss, *w;
char *wd = NULL;
if (!s)
return (NULL);
if (!wd)
return (NULL);
if (num <= 0)
{
*wd = 0;
return (NULL);
}
cnt = 0;
i = 0;
start = NULL;
finish = NULL;
ss = NULL;
w = wd;
while (s[i])
{
if ((cnt == num) && ((s[i] == ' ') || (s[i] == '\t')))
{
finish = &s[i];
break;
}
if ((s[i] != ' ') && (s[i] != '\t'))
{
if (i == 0)
{
cnt++;
if (cnt == num)
start = &s[i];
}
else if ((s[i - 1] == ' ') || (s[i - 1] == '\t'))
{
cnt++;
if (cnt == num)
start = &s[i];
}
}
i++;
}
if (cnt == num)
{
if ((start) && (finish))
{
for (ss = start; ss < finish; ss++)
*wd++ = *ss;
}
else if (start)
{
for (ss = start; *ss != 0; ss++)
*wd++ = *ss;
}
*wd = 0;
}
return (wd);
}
void
word(char *s, int num, char *wd)
{
int cnt, i;
char *start, *finish, *ss, *w;
if (!s)
return;
if (!wd)
return;
if (num <= 0)
{
*wd = 0;
return;
}
cnt = 0;
i = 0;
start = NULL;
finish = NULL;
ss = NULL;
w = wd;
while (s[i])
{
if ((cnt == num) && ((s[i] == ' ') || (s[i] == '\t')))
{
finish = &s[i];
break;
}
if ((s[i] != ' ') && (s[i] != '\t'))
{
if (i == 0)
{
cnt++;
if (cnt == num)
start = &s[i];
}
else if ((s[i - 1] == ' ') || (s[i - 1] == '\t'))
{
cnt++;
if (cnt == num)
start = &s[i];
}
}
i++;
}
if (cnt == num)
{
if ((start) && (finish))
{
for (ss = start; ss < finish; ss++)
*wd++ = *ss;
}
else if (start)
{
for (ss = start; *ss != 0; ss++)
*wd++ = *ss;
}
*wd = 0;
}
return;
}
int
canread(char *s)
{
if ((!s) || (!*s))
return (0);
if (!(permissions(s) & (S_IRUSR | S_IRGRP | S_IROTH)))
return (0);
return (1 + access(s, R_OK));
}
int
canwrite(char *s)
{
if ((!s) || (!*s))
return (0);
if (!(permissions(s) & (S_IWUSR | S_IWGRP | S_IWOTH)))
return (0);
return (1 + access(s, W_OK));
}
int
canexec(char *s)
{
if ((!s) || (!*s))
return (0);
if (!(permissions(s) & (S_IXUSR | S_IXGRP | S_IXOTH)))
return (0);
return (1 + access(s, X_OK));
}
char *
fileof(char *s)
{
char ss[1024];
int i, p1, p2;
i = 0;
p1 = -1;
p2 = -1;
for (i = strlen(s) - 1; i >= 0; i--)
{
if ((s[i] == '.') && (p2 < 0) && (p1 < 0))
p2 = i;
if ((s[i] == '/') && (p1 < 0))
p1 = i;
}
if (p2 < 0)
p2 = strlen(s);
if (p1 < 0)
p1 = 0;
for (i = 0; i < (p2 - p1 - 1); i++)
ss[i] = s[p1 + 1 + i];
ss[i] = 0;
return (strdup(ss));
}
char *
fullfileof(char *s)
{
char ss[1024];
int i, p1, p2;
i = 0;
p1 = -1;
for (i = strlen(s) - 1; i >= 0; i--)
{
if ((s[i] == '/') && (p1 < 0))
p1 = i;
}
p2 = strlen(s);
for (i = 0; i < (p2 - p1 - 1); i++)
ss[i] = s[p1 + 1 + i];
ss[i] = 0;
return (strdup(ss));
}
char *
pathtoexec(char *file)
{
char *p, *cp, *ep;
char *s;
int len, exelen;
if (file[0] == '/')
{
if (canexec(file))
return (strdup(file));
}
p = getenv("PATH");
if (!p)
return (strdup(file));
if (!file)
return (NULL);
cp = p;
exelen = strlen(file);
while ((ep = strchr(cp, ':')))
{
len = ep - cp;
s = malloc(len + 1);
if (s)
{
strncpy(s, cp, len);
s[len] = 0;
s = realloc(s, len + 2 + exelen);
strcat(s, "/");
strcat(s, file);
if (canexec(s))
return (s);
free(s);
}
cp = ep + 1;
}
len = strlen(cp);
s = malloc(len + 1);
if (s)
{
strncpy(s, cp, len);
s[len] = 0;
s = realloc(s, len + 2 + exelen);
strcat(s, "/");
strcat(s, file);
if (canexec(s))
return (s);
free(s);
}
return (NULL);
}
char *
pathtofile(char *file)
{
char *p, *cp, *ep;
char *s;
int len, exelen;
if (file[0] == '/')
{
if (exists(file))
return (strdup(file));
}
p = getenv("PATH");
if (!p)
return (strdup(file));
if (!file)
return (NULL);
cp = p;
exelen = strlen(file);
while ((ep = strchr(cp, ':')))
{
len = ep - cp;
s = malloc(len + 1);
if (s)
{
strncpy(s, cp, len);
s[len] = 0;
s = realloc(s, len + 2 + exelen);
strcat(s, "/");
strcat(s, file);
if (exists(s))
return (s);
free(s);
}
cp = ep + 1;
}
len = strlen(cp);
s = malloc(len + 1);
if (s)
{
strncpy(s, cp, len);
s[len] = 0;
s = realloc(s, len + 2 + exelen);
strcat(s, "/");
strcat(s, file);
if (exists(s))
return (s);
free(s);
}
return (NULL);
}

896
dox/format.c Normal file
View File

@ -0,0 +1,896 @@
#include "dox.h"
static int num_pages = 0;
static Page *page = NULL;
static char *fdat_ptr = NULL;
static int fdat_size = 0;
static char *fdat = NULL;
static int fdgetc(void);
static void fdjump(int count);
static int
fdgetc(void)
{
int val;
if (fdat_ptr >= (fdat + fdat_size))
return EOF;
val = (int)(*fdat_ptr);
fdat_ptr++;
return val;
}
static void
fdjump(int count)
{
fdat_ptr += count;
if (fdat_ptr < fdat)
fdat_ptr = fdat;
if (fdat_ptr >= (fdat + fdat_size))
fdat_ptr = (fdat + fdat_size) - 1;
}
void
AddPage(Object * obj)
{
num_pages++;
page = realloc(page, sizeof(Page) * (num_pages));
page[num_pages - 1].name = NULL;
page[num_pages - 1].count = 0;
page[num_pages - 1].obj = NULL;
page[num_pages - 1].columns = 1;
page[num_pages - 1].background = NULL;
page[num_pages - 1].padding = 2;
page[num_pages - 1].linkr = DEFAULT_LINKCOLOR_R;
page[num_pages - 1].linkg = DEFAULT_LINKCOLOR_G;
page[num_pages - 1].linkb = DEFAULT_LINKCOLOR_B;
if ((obj) && (obj->type == PAGE))
{
Page *pg;
pg = (Page *) (obj->object);
if (pg->name)
page[num_pages - 1].name = pg->name;
page[num_pages - 1].columns = pg->columns;
page[num_pages - 1].padding = pg->padding;
page[num_pages - 1].linkr = pg->linkr;
page[num_pages - 1].linkg = pg->linkg;
page[num_pages - 1].linkb = pg->linkb;
if (pg->background)
page[num_pages - 1].background = pg->background;
}
}
void
AddObject(Object * obj)
{
page[num_pages - 1].count++;
page[num_pages - 1].obj =
realloc(page[num_pages - 1].obj,
sizeof(Object) * (page[num_pages - 1].count));
page[num_pages - 1].obj[page[num_pages - 1].count - 1].type =
obj->type;
page[num_pages - 1].obj[page[num_pages - 1].count - 1].object =
obj->object;
}
void
BuildObj(Object * obj, char *var, char *param)
{
static Page *pg = NULL;
static P_ *p = NULL;
static Font_ *fn = NULL;
static Img_ *img = NULL;
switch (obj->type)
{
case IMG:
if (!obj->object)
{
img = obj->object = malloc(sizeof(Img_));
img->src = NULL;
img->src2 = NULL;
img->src3 = NULL;
img->x = 0;
img->y = 0;
img->link = NULL;
img->w = 0;
img->h = 0;
}
if (!strcmp(var, "x"))
img->x = atoi(param);
else if (!strcmp(var, "y"))
img->y = atoi(param);
else if (!strcmp(var, "src"))
img->src = strdup(param);
else if (!strcmp(var, "src2"))
img->src2 = strdup(param);
else if (!strcmp(var, "src3"))
img->src3 = strdup(param);
else if (!strcmp(var, "href"))
img->link = strdup(param);
break;
case BR:
break;
case FONT:
if (!obj->object)
{
fn = obj->object = malloc(sizeof(Font_));
fn->face = NULL;
fn->r = 0;
fn->g = 0;
fn->b = 0;
}
if (!strcmp(var, "face"))
fn->face = strdup(param);
else if (!strcmp(var, "color"))
{
char hex[3] = "00";
if (param[0] == '#')
{
hex[0] = param[1];
hex[1] = param[2];
sscanf(hex, "%x", &(fn->r));
hex[0] = param[3];
hex[1] = param[4];
sscanf(hex, "%x", &(fn->g));
hex[0] = param[5];
hex[1] = param[6];
sscanf(hex, "%x", &(fn->b));
}
}
break;
case P:
if (!obj->object)
{
p = obj->object = malloc(sizeof(P_));
p->align = 0;
}
if (!strcmp(var, "align"))
{
if ((strlen(param) > 0) && (param[strlen(param) - 1] == '%'))
param[strlen(param) - 1] = 0;
p->align = atof(param);
}
break;
case TEXT:
break;
case PAGE:
if (!obj->object)
{
pg = obj->object = malloc(sizeof(Page));
pg->columns = 1;
pg->padding = 1;
pg->name = NULL;
pg->background = NULL;
pg->linkr = DEFAULT_LINKCOLOR_R;
pg->linkg = DEFAULT_LINKCOLOR_G;
pg->linkb = DEFAULT_LINKCOLOR_B;
}
if (!strcmp(var, "columns"))
pg->columns = atoi(param);
else if (!strcmp(var, "padding"))
pg->padding = atoi(param);
else if (!strcmp(var, "name"))
pg->name = strdup(param);
else if (!strcmp(var, "background"))
pg->background = strdup(param);
else if (!strcmp(var, "linkcolor"))
{
char hex[3] = "00";
if (param[0] == '#')
{
hex[0] = param[1];
hex[1] = param[2];
sscanf(hex, "%x", &(pg->linkr));
hex[0] = param[3];
hex[1] = param[4];
sscanf(hex, "%x", &(pg->linkg));
hex[0] = param[5];
hex[1] = param[6];
sscanf(hex, "%x", &(pg->linkb));
}
}
break;
default:
break;
}
}
int
GetNextTag(Object * obj)
{
char s[65536];
int i = 0, wd = 0;
int val;
char intag = 0;
char havobj = 0;
for (;;)
{
val = fdgetc();
if (val == EOF)
return 0;
if (intag)
{
if (val == '>')
intag = 0;
s[i++] = (char)val;
if (s[i - 1] == '\n')
s[i - 1] = ' ';
if (s[i - 1] == '>')
s[i - 1] = ' ';
if (s[i - 1] == ' ')
{
if (i == 1)
i = 0;
else
{
s[i - 1] = 0;
if (!havobj)
{
if (wd == 0)
{
if (!strcmp(s, "page"))
obj->type = PAGE;
else if (!strcmp(s, "img"))
obj->type = IMG;
else if (!strcmp(s, "br"))
obj->type = BR;
else if (!strcmp(s, "font"))
obj->type = FONT;
else if (!strcmp(s, "p"))
obj->type = P;
havobj = 1;
}
i = 0;
}
else
{
char w1[1024];
char w2[1024];
int j = 0;
w1[0] = 0;
w2[0] = 0;
while ((s[j]) && (s[j] != '='))
{
w1[j] = s[j];
j++;
}
w1[j] = 0;
if (j < (int)strlen(s))
strcpy(w2, &(s[j + 1]));
BuildObj(obj, w1, w2);
i = 0;
}
wd++;
}
}
if (!intag)
return 1;
}
if (val == '<')
intag = 1;
}
return 1;
}
char *
GetTextUntilTag(void)
{
char s[65536];
int i = 0;
int val;
for (;;)
{
val = fdgetc();
if (val == EOF)
{
s[i] = 0;
if (strlen(s) < 1)
return NULL;
return strdup(s);
}
s[i++] = (char)val;
if (s[i - 1] == '\n')
s[i - 1] = ' ';
if ((i == 1) && (s[0] == ' '))
i--;
else if (s[i - 1] == '<')
{
s[i - 1] = 0;
fdjump(-1);
if (strlen(s) < 1)
return NULL;
return strdup(s);
}
if ((i > 2) && (s[i - 2] == ' ') && (s[i - 1] == ' '))
i--;
if (i > 65530)
return NULL;
}
return NULL;
}
int
GetObjects(FILE * f)
{
static char have_font = 0;
static char in_para = 0;
Object obj;
char *txt;
char buf[4096];
int count;
fdat = NULL;
fdat_size = 0;
while ((count = fread(buf, 1, 4096, f)) > 0)
{
if (!fdat)
fdat = malloc(count);
else
fdat = realloc(fdat, (fdat_size + count));
memcpy(fdat + fdat_size, buf, count);
fdat_size += count;
}
fdat_ptr = fdat;
if (page)
{
int i;
for (i = 0; i < num_pages; i++)
{
int j;
if (page[i].name)
free(page[i].name);
if (page[i].background)
free(page[i].background);
for (j = 0; j < page[i].count; j++)
{
switch (page[i].obj[j].type)
{
case IMG:
if (((Img_ *)page[i].obj[j].object)->src)
free(((Img_ *)page[i].obj[j].object)->src);
if (((Img_ *)page[i].obj[j].object)->src2)
free(((Img_ *)page[i].obj[j].object)->src2);
if (((Img_ *)page[i].obj[j].object)->src3)
free(((Img_ *)page[i].obj[j].object)->src3);
if (((Img_ *)page[i].obj[j].object)->link)
free(((Img_ *)page[i].obj[j].object)->link);
break;
case BR:
break;
case FONT:
if (((Font_ *)page[i].obj[j].object)->face)
free(((Font_ *)page[i].obj[j].object)->face);
break;
case P:
break;
case TEXT:
break;
case PAGE:
break;
}
if (page[i].obj[j].object)
free(page[i].obj[j].object);
}
if (page[i].obj)
free(page[i].obj);
}
free(page);
num_pages = 0;
page = NULL;
have_font = 0;
in_para = 0;
}
obj.object = NULL;
for (;;)
{
if ((have_font) && (in_para))
{
txt = GetTextUntilTag();
if (txt)
{
obj.type = TEXT;
obj.object = (void *)txt;
}
else
{
if (!GetNextTag(&obj))
{
if (fdat)
free(fdat);
return 0;
}
}
}
else
{
if (!GetNextTag(&obj))
{
if (fdat)
free(fdat);
return 0;
}
}
if (obj.type == PAGE)
{
in_para = 0;
have_font = 0;
AddPage(&obj);
}
else if (page)
AddObject(&obj);
if (obj.type == IMG)
in_para = 0;
if (obj.type == P)
in_para = 1;
if (obj.type == FONT)
have_font = 1;
obj.object = NULL;
}
free(fdat);
}
int
FixPage(int p)
{
if (p < 0)
return 0;
if (p >= num_pages)
return num_pages - 1;
return p;
}
int
GetPage(char *name)
{
int i;
for (i = 0; i < num_pages; i++)
{
if ((page[i].name) && (!strcmp(name, page[i].name)))
return i;
}
return -1;
}
void
GetLinkColors(int page_num, int *r, int *g, int *b)
{
if (page_num < 0)
{
*r = DEFAULT_LINKCOLOR_R;
*g = DEFAULT_LINKCOLOR_G;
*b = DEFAULT_LINKCOLOR_B;
}
else
{
*r = page[page_num].linkr;
*g = page[page_num].linkg;
*b = page[page_num].linkb;
}
}
Link *
RenderPage(Window win, int page_num, int w, int h)
{
Link *ll = NULL;
Page *pg;
TextState ts;
int i, col_w, col_h;
int x, y;
int justification = 0;
int firstp = 1;
ImlibImage *im;
int wastext = 0;
ts.fontname = NULL;
ts.style.orientation = FONT_TO_RIGHT;
ts.style.mode = MODE_WRAP_WORD;
ts.style.justification = 0;
ts.style.spacing = 0;
ts.font = NULL;
ts.fg_col.r = 0;
ts.fg_col.g = 0;
ts.fg_col.b = 0;
ts.bg_col.r = 0;
ts.bg_col.g = 0;
ts.bg_col.b = 0;
ts.effect = 0;
ts.efont = NULL;
ts.xfont = NULL;
ts.xfontset = 0;
ts.xfontset_ascent = 0;
ts.height = 0;
pg = &(page[page_num]);
x = pg->padding;
y = pg->padding;
col_w = ((w - (pg->padding * (pg->columns + 1))) / pg->columns);
col_h = h - (pg->padding * 2);
if (pg->background)
{
char tmp[4096];
sprintf(tmp, "%s/%s", docdir, pg->background);
im = Imlib_load_image(id, tmp);
if (im)
{
Imlib_paste_image(id, im, win, 0, 0, w, h);
Imlib_destroy_image(id, im);
}
}
for (i = 0; i < pg->count; i++)
{
char s[32768], ss[32768], wd[4096], *txt;
Img_ *img;
Font_ *fn;
P_ *p;
int wc, eol, eot;
int link = -1, lx, lw;
switch (pg->obj[i].type)
{
case IMG:
img = pg->obj[i].object;
if (img->src)
{
char tmp[4096];
sprintf(tmp, "%s/%s", docdir, img->src);
im = Imlib_load_image(id, tmp);
if (im)
{
img->w = im->rgb_width;
img->h = im->rgb_height;
Imlib_paste_image(id, im, win, img->x, img->y,
im->rgb_width, im->rgb_height);
Imlib_destroy_image(id, im);
}
if (img->link)
{
Link *l;
l = malloc(sizeof(Link));
l->name = strdup(img->link);
l->x = img->x;
l->y = img->y;
l->w = img->w;
l->h = img->h;
l->next = ll;
ll = l;
}
}
break;
case BR:
if (!wastext)
y += ts.height;
wastext = 0;
break;
case FONT:
fn = pg->obj[i].object;
ts.fontname = NULL;
ts.style.orientation = FONT_TO_RIGHT;
ts.style.mode = MODE_WRAP_WORD;
ts.style.justification = 0;
ts.style.spacing = 0;
if (ts.font)
Fnlib_free_font(fd, ts.font);
ts.font = NULL;
ts.fg_col.r = 0;
ts.fg_col.g = 0;
ts.fg_col.b = 0;
ts.bg_col.r = 0;
ts.bg_col.g = 0;
ts.bg_col.b = 0;
ts.effect = 0;
if (ts.efont)
Efont_free(ts.efont);
ts.efont = NULL;
if (ts.xfont)
XFreeFont(disp, ts.xfont);
ts.xfont = NULL;
if (ts.xfontset)
XFreeFontSet(disp, ts.xfontset);
ts.xfontset = NULL;
ts.xfontset_ascent = 0;
ts.height = 0;
ts.fontname = fn->face;
ts.fg_col.r = fn->r;
ts.fg_col.g = fn->g;
ts.fg_col.b = fn->b;
TextStateLoadFont(&ts);
break;
case P:
p = pg->obj[i].object;
if (p)
justification = (int)((p->align / 100) * 1024);
else
justification = 0;
if (!firstp)
y += ts.height;
else
firstp = 0;
break;
case TEXT:
txt = pg->obj[i].object;
wc = 1;
ss[0] = 0;
s[0] = 0;
eol = 0;
eot = 0;
for (;;)
{
char *txt_disp;
int tw, th, xspace;
int off, j;
int sx, sy, ssx, ssy;
char link_txt[1024];
char link_link[1024];
wd[0] = 0;
word(txt, wc, wd);
if (!wd[0])
eol = 1;
else
{
if (wd[0] == '_')
{
link = strlen(s);
for (j = 1; wd[j] != '('; j++)
wd[j - 1] = wd[j];
wd[j - 1] = 0;
j++;
strcpy(link_link, &(wd[j]));
link_link[strlen(link_link) - 1] = 0;
strcpy(link_txt, wd);
TextSize(&ts, link_txt, &lw, &th, 17);
TextSize(&ts, s, &lx, &th, 17);
}
}
wc++;
eot++;
strcpy(ss, s);
strcat(s, wd);
if (!eol)
strcat(s, " ");
xspace = col_w;
off = 0;
sx = x + off;
sy = y;
ssx = sx + col_w - 1;
ssy = sy + ts.height - 1;
for (j = 0; j < pg->count; j++)
{
if (pg->obj[j].type == IMG)
{
img = pg->obj[j].object;
if ((img->w > 0) && (img->h > 0))
{
int ix, iy, iix, iiy;
ix = img->x;
iy = img->y;
iix = img->x + img->w - 1;
iiy = img->y + img->h - 1;
if ((iy <= ssy) && (iiy >= sy))
{
if ((ix >= sx) && (ix <= ssx))
{
if ((iix >= sx) && (iix <= ssx))
{
if (((ix + iix) / 2) > ((sx + ssx) / 2))
ssx = ix - 1;
else
sx = iix + 1;
}
else
{
ssx = ix - 1;
}
}
else if ((iix >= sx) && (iix <= ssx))
{
sx = iix + 1;
}
}
}
}
}
off = sx - x;
xspace = (ssx - sx) + 1;
if (xspace < 0)
xspace = 0;
TextSize(&ts, s, &tw, &th, 17);
txt_disp = ss;
if (eot == 1)
txt_disp = s;
if (((tw > xspace) || (eol)) && (strlen(txt_disp) > 0))
{
txt_disp[strlen(txt_disp) - 1] = 0;
if ((eot == 1) && (tw > xspace))
{
char p1[4096];
int point = 0, cnt = 0;
while (txt_disp[(point + cnt)])
{
p1[cnt] = txt_disp[point + cnt];
cnt++;
p1[cnt] = 0;
TextSize(&ts, p1, &tw, &th, 17);
if ((tw > xspace) || (!txt_disp[(point + cnt)]))
{
if (txt_disp[(point + cnt)])
{
point = point + cnt - 1;
p1[cnt - 1] = 0;
cnt = 0;
}
else
{
point = point + cnt;
p1[cnt] = 0;
cnt = 0;
}
wastext = 1;
TextDraw(&ts, win, p1, x + off, y,
xspace, 99999, 17, justification);
y += ts.height;
if (y >= (h - (pg->padding + ts.height - (ts.height - ts.xfontset_ascent))))
{
y = pg->padding;
x += col_w + pg->padding;
}
xspace = col_w;
off = 0;
sx = x + off;
sy = y;
ssx = sx + col_w - 1;
ssy = sy + ts.height - 1;
for (j = 0; j < pg->count; j++)
{
if (pg->obj[j].type == IMG)
{
img = pg->obj[j].object;
if ((img->w > 0) && (img->h > 0))
{
int ix,
iy,
iix,
iiy;
ix = img->x;
iy = img->y;
iix = img->x + img->w - 1;
iiy = img->y + img->h - 1;
if ((iy <= ssy) && (iiy >= sy))
{
if ((ix >= sx) && (ix <= ssx))
{
if ((iix >= sx) && (iix <= ssx))
{
if (((ix + iix) / 2) > ((sx + ssx) / 2))
ssx = ix - 1;
else
sx = iix + 1;
}
else
{
ssx = ix - 1;
}
}
else if ((iix >= sx) && (iix <= ssx))
{
sx = iix + 1;
}
}
}
}
}
off = sx - x;
xspace = (ssx - sx) + 1;
if (xspace < 0)
xspace = 0;
}
}
}
else
{
if ((tw > xspace) && (eot != 1))
wc--;
wastext = 1;
TextDraw(&ts, win, txt_disp, x + off, y,
xspace, 99999, 17, justification);
if (link >= 0)
{
int rr, gg, bb;
int r, g, b;
int extra;
GC gc;
XGCValues gcv;
gc = XCreateGC(disp, win, 0, &gcv);
rr = ts.fg_col.r;
gg = ts.fg_col.g;
bb = ts.fg_col.b;
r = ts.fg_col.r = pg->linkr;
g = ts.fg_col.g = pg->linkg;
b = ts.fg_col.b = pg->linkb;
XSetForeground(disp, gc,
Imlib_best_color_match(id, &r, &g, &b));
TextSize(&ts, txt_disp, &tw, &th, 17);
extra = ((xspace - tw) * justification) >> 10;
TextDraw(&ts, win, link_txt, x + off + lx + extra, y,
99999, 99999, 17, 0);
XDrawLine(disp, win, gc,
x + off + lx + extra,
y + ts.xfontset_ascent,
x + off + lx + lw + extra,
y + ts.xfontset_ascent);
ts.fg_col.r = rr;
ts.fg_col.g = gg;
ts.fg_col.b = bb;
link = -1;
XFreeGC(disp, gc);
{
Link *l;
l = malloc(sizeof(Link));
l->name = strdup(link_link);
l->x = x + off + lx + extra;
l->y = y;
l->w = lw;
l->h = ts.height;
l->next = ll;
ll = l;
}
}
y += ts.height;
if (y >= (h - (pg->padding + ts.height - (ts.height - ts.xfontset_ascent))))
{
y = pg->padding;
x += col_w + pg->padding;
}
}
eot = 0;
s[0] = 0;
}
if (eol)
break;
}
break;
default:
break;
}
if (y >= (h - (pg->padding + ts.height - (ts.height - ts.xfontset_ascent))))
{
y = pg->padding;
x += col_w + pg->padding;
}
}
if (ts.font)
Fnlib_free_font(fd, ts.font);
if (ts.efont)
Efont_free(ts.efont);
if (ts.xfont)
XFreeFont(disp, ts.xfont);
if (ts.xfontset)
XFreeFontSet(disp, ts.xfontset);
return ll;
}

280
dox/next1.xpm Normal file
View File

@ -0,0 +1,280 @@
/* XPM */
static char * next1_xpm[] = {
"64 16 261 2",
" c None",
". c #FEFEFE",
"+ c #EBEEE5",
"@ c #3B3C3A",
"# c #DADCD3",
"$ c #D1D3CB",
"% c #D3D6CE",
"& c #D0D2CA",
"* c #CED1CA",
"= c #D2D5CD",
"- c #D5D7CF",
"; c #D0D3CB",
"> c #CCCEC7",
", c #D6D8D0",
"' c #D1D4CC",
") c #D5D7D0",
"! c #D3D6D0",
"~ c #D6D9D1",
"{ c #D4D6CE",
"] c #D7DAD2",
"^ c #D8DBD3",
"/ c #DCDFD6",
"( c #DEE0D8",
"_ c #E1E4DB",
": c #E3E4DD",
"< c #E3E5DD",
"[ c #DFE1DB",
"} c #E1E4DC",
"| c #DFE1D9",
"1 c #DEE0D9",
"2 c #E0E3DB",
"3 c #DBDCD6",
"4 c #DDE0D8",
"5 c #E5E8E0",
"6 c #E2E5DE",
"7 c #939590",
"8 c #0F0F0F",
"9 c #E4E6DE",
"0 c #D6D6D3",
"a c #D7D7D4",
"b c #D5D5D3",
"c c #D6D6D4",
"d c #D8D8D6",
"e c #D5D5D2",
"f c #D4D4D2",
"g c #D2D3D0",
"h c #D1D2CF",
"i c #D4D4D1",
"j c #D3D3D1",
"k c #D9D9D7",
"l c #666666",
"m c #CDCCCB",
"n c #9B9C97",
"o c #535450",
"p c #050504",
"q c #CBCEC7",
"r c #C8C9C6",
"s c #C7C7C5",
"t c #000000",
"u c #C7C6C4",
"v c #C9C9C7",
"w c #C6C6C4",
"x c #CACAC8",
"y c #C9CAC7",
"z c #CAC9C8",
"A c #CDCDCB",
"B c #CAC9C7",
"C c #CCCCC9",
"D c #CFCECC",
"E c #D0CFCE",
"F c #D3D2D1",
"G c #D6D5D3",
"H c #D7D7D5",
"I c #D8D7D6",
"J c #D9DAD7",
"K c #D9DAD8",
"L c #D7D6D4",
"M c #D2D2D0",
"N c #D2D1D0",
"O c #CFCFCD",
"P c #D0D0CD",
"Q c #D6D6D5",
"R c #D3D4D1",
"S c #D4D4D3",
"T c #979993",
"U c #484946",
"V c #020202",
"W c #D2D4CC",
"X c #C4C5C3",
"Y c #C7C7C6",
"Z c #C8C9C7",
"` c #CBCBC8",
" . c #CDCECC",
".. c #CECFCD",
"+. c #D0D0CE",
"@. c #D1D1D0",
"#. c #CCCCCA",
"$. c #CDCDCC",
"%. c #CECECC",
"&. c #D1D1CF",
"*. c #D3D4D2",
"=. c #DADAD8",
"-. c #D8D9D7",
";. c #D7D7D6",
">. c #D3D3D2",
",. c #CACBC9",
"'. c #9C9E98",
"). c #474846",
"!. c #E0E3DA",
"~. c #CFCFCE",
"{. c #CECECD",
"]. c #D0D0CF",
"^. c #D2D3D1",
"/. c #D1D1CE",
"(. c #C9CAC8",
"_. c #C8C8C7",
":. c #CACBC8",
"<. c #C5C5C3",
"[. c #9B9D97",
"}. c #474745",
"|. c #030303",
"1. c #DFE0D9",
"2. c #CECFCC",
"3. c #CCCCCB",
"4. c #CBCBCA",
"5. c #CDCECB",
"6. c #D2D2D1",
"7. c #D8D8D7",
"8. c #92948E",
"9. c #434441",
"0. c #EDEFE7",
"a. c #D1D2D0",
"b. c #FFFFFF",
"c. c #444542",
"d. c #E7EAE1",
"e. c #DCDCDC",
"f. c #DDDDDC",
"g. c #DBDBDA",
"h. c #DBDBDB",
"i. c #D8D9D8",
"j. c #D7D8D6",
"k. c #CDCECD",
"l. c #CBCBC9",
"m. c #CBCBCB",
"n. c #CACAC9",
"o. c #CCCCCC",
"p. c #CECFCE",
"q. c #93958F",
"r. c #E1E3DB",
"s. c #DEDEDD",
"t. c #DFDFDD",
"u. c #E0E0DF",
"v. c #DFDFDE",
"w. c #E2E2E0",
"x. c #DCDCDA",
"y. c #DCDCDB",
"z. c #D9D9D8",
"A. c #949691",
"B. c #E5E8E1",
"C. c #DBDBD9",
"D. c #434442",
"E. c #FDFDFD",
"F. c #B5B5B3",
"G. c #B6B6B4",
"H. c #B7B6B4",
"I. c #B8B8B6",
"J. c #B9B9B6",
"K. c #BAB9B7",
"L. c #B8B7B5",
"M. c #B8B8B5",
"N. c #B9B8B7",
"O. c #B9B9B7",
"P. c #B7B8B6",
"Q. c #B7B7B4",
"R. c #B6B7B4",
"S. c #B7B8B5",
"T. c #BBBAB8",
"U. c #BABAB8",
"V. c #BCBCBA",
"W. c #BDBDBB",
"X. c #BEBEBC",
"Y. c #BCBCB9",
"Z. c #BBBBB9",
"`. c #B7B7B5",
" + c #BFBFBE",
".+ c #B1B2AF",
"++ c #4E4F4D",
"@+ c #DBDDDA",
"#+ c #CCCDCA",
"$+ c #CACAC7",
"%+ c #C6C6C3",
"&+ c #C8C7C4",
"*+ c #C8C7C5",
"=+ c #C9C8C6",
"-+ c #C8C8C6",
";+ c #C8C7C6",
">+ c #C7C6C5",
",+ c #CCCBC9",
"'+ c #CBCAC9",
")+ c #CECDCC",
"!+ c #CDCDCA",
"~+ c #CFCECD",
"{+ c #919291",
"]+ c #50504F",
"^+ c #1A1A1A",
"/+ c #C7C9C5",
"(+ c #8C8D89",
"_+ c #8B8C88",
":+ c #898A86",
"<+ c #8A8B87",
"[+ c #888986",
"}+ c #888985",
"|+ c #8A8B88",
"1+ c #898A87",
"2+ c #8A8A88",
"3+ c #898986",
"4+ c #878884",
"5+ c #858683",
"6+ c #858682",
"7+ c #868783",
"8+ c #848481",
"9+ c #81827E",
"0+ c #82837F",
"a+ c #81827F",
"b+ c #80817D",
"c+ c #7F807D",
"d+ c #7F7F7C",
"e+ c #7E7F7C",
"f+ c #7D7E7B",
"g+ c #7E7E7B",
"h+ c #7E7F7B",
"i+ c #7F807E",
"j+ c #80817E",
"k+ c #3F3F3E",
"l+ c #131313",
"m+ c #E0E2DB",
"n+ c #7B7C78",
"o+ c #4B4B49",
"p+ c #484847",
"q+ c #494A48",
"r+ c #4E4E4C",
"s+ c #4D4D4C",
"t+ c #4D4E4C",
"u+ c #4C4D4B",
"v+ c #4C4C4B",
"w+ c #4D4D4B",
"x+ c #4B4C4A",
"y+ c #4C4C4A",
"z+ c #4B4B4A",
"A+ c #4A4A48",
"B+ c #4A4B49",
"C+ c #494A49",
"D+ c #4A4A49",
"E+ c #3A3A38",
"F+ c #414240",
"G+ c #171717",
"H+ c #151515",
"I+ c #363736",
"J+ c #181818",
"K+ c #161616",
"L+ c #141414",
". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + @ ",
". . # $ % & & $ & * = = - $ ; ; ; > & $ % , % $ = $ = = ' ) % ) ! ~ { ) ] ] ^ ^ ^ ~ ] / / ( _ : < _ [ } | 1 2 2 ( | 3 4 5 6 7 8 ",
". 9 0 a a b b c a a a d 0 0 0 0 0 b b e f b g h i b a a b f j f j f f f j j j f f f f f b b d c k a a d d b l a f f c c m n o p ",
". q r s t t t u v t t t w t x y t y t t t z A B C C D E F G H I I J I K L 0 f f j M N i f M O P N F F f f f l t Q R G S A T U V ",
". W X Y t Z Z t ` t A ...t +.@.t ..#.t A $.%.&.f f *.*.S S S S j j S *.*.R Q =.=.-.Q c ;.c *.c c S S >.>.S l t t j f f ,.'.).V ",
". !.~...t %.%.t {.t ].>.>.t ^.g t O ~.t %.%./.O ~.{.~.~.&.~.@.O O ~./.%.#.#.(.#.(.(._.C y :.y (.y (.l l l l l t t t <.w j [.}.|.",
". 1...+.t 2.&.t @.t ].].].t 2.3.t 2.#.t 3.` #.#.4.5. . .O ~.~.h j S S ;.H S S S S >.f 6.6.S ;.c 7.7.l t t t t t t t t a &.8.9.|.",
". 0.g ^.t +.+.t +.t $.+.+.t 2. .t 2.&.t @.@.S g g ^.&.g a.&.].].a.a.a.S ^.g a.S ^.g R S S S b S b S l t t t t t t t t t b.8.c.|.",
". d.e.f.t e.g.t e.t t e.f.h.t t h.i.j.t S ^.^.@.@.^.@.@.k.l.3.+. . .m.l.n.n.n.n.l.3.o.$.+.+.+.+.p...l t t t t t t t t t b.q.c.|.",
". r.s.t.t u.v.t u.t v.v.u.t w.u.t u.w.t v.v.t.s.s.x.y.x.x.=.g.K K K J K =.=.k a j.b b b R @.M *.0 R l t t t t t t t t b.z.A.c.V ",
". B.` Z t #.x t 3.t 4. .].t +.P t h 2.t #.` l.:.:.l.l. .P O O P @.@.^.+.^.@.^.^.*.*.R M M *.^.].@.f S b.b.b. .t t t b.].C.7 D.|.",
". E.F.F.t G.H.t H.t I.J.K.t L.M.t M.N.t I.I.M.J.O.N.I.I.O.P.O.M.M.Q.I.R.Q.S.I.O.T.T.U.V.W.X.W.V.Y.T.Z.Z.U.Z.l t t b.G.`. +.+++|.",
". @+l.B t l.#+t x t t t $+t $+$+t %+&+t u *+=+x x x &+&+&+-+=+$+v &+;+>+>+u v ;+y x ,+C '+A )+)+)+D #.#+!+)+l t b.~+~+#.H {+]+^+",
". /+(+_+(+_+:+_+(+<+<+<+[+}+<+|+1+2+1+:+3+4+5+6+5+7+5+8+8+9+0+a+0+9+9+a+a+a+0+0+9+0+b+c+c+d+c+d+e+f+f+e+g+h+c+b.c+d+i+j+9+7+k+l+",
"m+n+o+p+q+p+o+r+r+++r+r+r+r+r+r+r+r+s+s+s+r+t+u+u+v+u+w+v+x+y+o+o+o+o+o+o+x+o+x+x+x+x+x+z+A+q+A+z+o+B+B+C+C+B+D+D+B+B+o+E+F+G+H+",
"I+J+G+G+G+G+K+H+H+H+H+K+K+H+H+H+L+K+G+J+J+G+G+K+K+H+H+H+K+K+K+H+H+H+K+H+L+H+K+K+K+K+G+G+G+H+L+l+L+L+L+L+L+L+l+H+H+l+H+H+V l+l+l+"};

286
dox/next2.xpm Normal file
View File

@ -0,0 +1,286 @@
/* XPM */
static char * next2_xpm[] = {
"64 16 267 2",
" c None",
". c #131313",
"+ c #020202",
"@ c #151515",
"# c #141414",
"$ c #171717",
"% c #161616",
"& c #181818",
"* c #363736",
"= c #414240",
"- c #3A3A38",
"; c #4B4B49",
"> c #4A4B49",
", c #4A4A49",
"' c #494A49",
") c #4B4B4A",
"! c #4A4A48",
"~ c #494A48",
"{ c #4B4C4A",
"] c #4C4C4A",
"^ c #4C4C4B",
"/ c #4D4D4B",
"( c #4C4D4B",
"_ c #4D4E4C",
": c #4E4E4C",
"< c #4D4D4C",
"[ c #4E4F4D",
"} c #484847",
"| c #7B7C78",
"1 c #E0E2DB",
"2 c #3F3F3E",
"3 c #868783",
"4 c #81827E",
"5 c #80817E",
"6 c #7F807E",
"7 c #7F7F7C",
"8 c #7F807D",
"9 c #7E7F7B",
"0 c #7E7E7B",
"a c #7E7F7C",
"b c #7D7E7B",
"c c #80817D",
"d c #82837F",
"e c #81827F",
"f c #848481",
"g c #858683",
"h c #858682",
"i c #878884",
"j c #898986",
"k c #898A86",
"l c #898A87",
"m c #8A8A88",
"n c #8A8B88",
"o c #8A8B87",
"p c #888985",
"q c #888986",
"r c #666666",
"s c #8C8D89",
"t c #8B8C88",
"u c #C7C9C5",
"v c #FEFEFE",
"w c #1A1A1A",
"x c #50504F",
"y c #919291",
"z c #D7D7D5",
"A c #000000",
"B c #CDCDCB",
"C c #CCCDCA",
"D c #CFCECC",
"E c #CECDCC",
"F c #CCCBC9",
"G c #CACAC8",
"H c #C9CAC7",
"I c #C8C7C6",
"J c #C9C9C7",
"K c #C7C6C4",
"L c #C7C6C5",
"M c #C8C7C4",
"N c #CACAC7",
"O c #C9C8C6",
"P c #C8C8C6",
"Q c #C8C7C5",
"R c #C7C7C4",
"S c #C6C6C3",
"T c #CBCAC8",
"U c #CCCBC8",
"V c #CBCBC9",
"W c #CAC9C8",
"X c #CAC9C7",
"Y c #DBDDDA",
"Z c #030303",
"` c #B1B2AF",
" . c #BFBFBE",
".. c #B6B6B4",
"+. c #B9B9B7",
"@. c #BBBBB8",
"#. c #BBBBB9",
"$. c #BABAB8",
"%. c #BBBAB8",
"&. c #BCBCB9",
"*. c #BDBDBB",
"=. c #BEBEBC",
"-. c #BCBCBA",
";. c #B8B8B6",
">. c #B7B8B5",
",. c #B7B7B4",
"'. c #B6B7B4",
"). c #B8B8B5",
"!. c #B7B8B6",
"~. c #B9B8B7",
"{. c #B9B9B6",
"]. c #B6B7B5",
"^. c #B8B7B5",
"/. c #BAB9B7",
"(. c #B7B6B4",
"_. c #B6B5B3",
":. c #B5B5B3",
"<. c #FDFDFD",
"[. c #434442",
"}. c #939590",
"|. c #DBDBD9",
"1. c #CFCFCD",
"2. c #CECFCC",
"3. c #D0D0CD",
"4. c #D1D1D0",
"5. c #D2D3D1",
"6. c #D4D4D2",
"7. c #D3D4D2",
"8. c #D2D2D0",
"9. c #D3D4D1",
"0. c #D0D0CE",
"a. c #CDCECC",
"b. c #CACBC8",
"c. c #CBCBC8",
"d. c #CCCCCA",
"e. c #D1D2CF",
"f. c #D1D1CF",
"g. c #C8C9C7",
"h. c #E5E8E1",
"i. c #444542",
"j. c #949691",
"k. c #D9D9D8",
"l. c #CFCFCE",
"m. c #D3D3D1",
"n. c #D5D5D3",
"o. c #D6D6D3",
"p. c #D7D8D6",
"q. c #D7D7D4",
"r. c #D9D9D7",
"s. c #DADAD8",
"t. c #D9DAD8",
"u. c #D9DAD7",
"v. c #DBDBDA",
"w. c #DCDCDA",
"x. c #DCDCDB",
"y. c #DEDEDD",
"z. c #DFDFDD",
"A. c #DFDFDE",
"B. c #E0E0DE",
"C. c #E2E2E0",
"D. c #E0E0DF",
"E. c #E1E3DB",
"F. c #93958F",
"G. c #CECECD",
"H. c #CCCCCB",
"I. c #CCCCCC",
"J. c #CECFCD",
"K. c #CECFCE",
"L. c #CDCDCC",
"M. c #CACAC9",
"N. c #CBCBCB",
"O. c #CDCECD",
"P. c #D4D4D3",
"Q. c #D8D9D8",
"R. c #DBDBDB",
"S. c #DADADA",
"T. c #FFFFFF",
"U. c #DCDCDC",
"V. c #E7EAE1",
"W. c #92948E",
"X. c #D3D3D2",
"Y. c #D2D3D0",
"Z. c #D1D2D0",
"`. c #D0D0CF",
" + c #EDEFE7",
".+ c #434441",
"++ c #D6D6D4",
"@+ c #D8D8D7",
"#+ c #D7D7D6",
"$+ c #D2D2D1",
"%+ c #CDCECB",
"&+ c #CBCBCA",
"*+ c #DFE0D9",
"=+ c #474745",
"-+ c #9B9D97",
";+ c #C5C5C3",
">+ c #C7C7C5",
",+ c #C9CAC8",
"'+ c #CCCCC9",
")+ c #C8C8C7",
"!+ c #CECECC",
"~+ c #D1D1CE",
"{+ c #CCCDCB",
"]+ c #E0E3DA",
"^+ c #474846",
"/+ c #9C9E98",
"(+ c #CACBC9",
"_+ c #D6D6D5",
":+ c #D8D9D7",
"<+ c #C7C7C6",
"[+ c #C4C5C3",
"}+ c #D2D4CC",
"|+ c #484946",
"1+ c #979993",
"2+ c #D6D5D3",
"3+ c #D3D2D1",
"4+ c #D2D1D0",
"5+ c #D4D4D1",
"6+ c #D7D6D4",
"7+ c #D8D7D6",
"8+ c #D0CFCE",
"9+ c #C9C8C7",
"0+ c #C6C6C4",
"a+ c #C6C5C4",
"b+ c #C8C9C6",
"c+ c #CBCEC7",
"d+ c #050504",
"e+ c #535450",
"f+ c #9B9C97",
"g+ c #CDCCCB",
"h+ c #D8D8D6",
"i+ c #D5D5D2",
"j+ c #E4E6DE",
"k+ c #0F0F0F",
"l+ c #E2E5DE",
"m+ c #E5E8E0",
"n+ c #DDE0D8",
"o+ c #DBDCD6",
"p+ c #DFE1D9",
"q+ c #DEE0D8",
"r+ c #E0E3DB",
"s+ c #DEE0D9",
"t+ c #E1E4DC",
"u+ c #DFE1DB",
"v+ c #E1E4DB",
"w+ c #E3E5DD",
"x+ c #E3E4DD",
"y+ c #DCDFD6",
"z+ c #D7DAD2",
"A+ c #D6D9D1",
"B+ c #D8DBD3",
"C+ c #D5D7D0",
"D+ c #D4D6CE",
"E+ c #D3D6D0",
"F+ c #D3D6CE",
"G+ c #D1D4CC",
"H+ c #D2D5CD",
"I+ c #D1D3CB",
"J+ c #D6D8D0",
"K+ c #D0D2CA",
"L+ c #CCCEC7",
"M+ c #D0D3CB",
"N+ c #D5D7CF",
"O+ c #CED1CA",
"P+ c #DADCD3",
"Q+ c #3B3C3A",
"R+ c #EBEEE5",
". . . + @ @ . @ @ . # # # # # # . # @ $ $ $ % % % % @ # @ % @ @ @ % % % @ @ @ % % $ $ & & $ % # @ @ @ % % @ @ @ @ % $ $ $ $ & * ",
"@ $ = - ; > > , , > ' ' > > ; ) ! ~ ! ) { { { { { ; { ; ; ; ; ; ; ] { ^ / ( ^ ( ( _ : < < < : : : : : : : : [ : : ; } ~ } ; | 1 ",
". 2 3 4 5 6 7 8 8 8 9 0 a b b a 7 8 7 8 8 c d 4 d d e e e 4 4 d e d 4 f f g 3 g h g i j k l m l n o p q o o r s t k t s t s u v ",
"w x y z A A A B B A A A C A D E A E A A A F G H I J K L L I M J N O P M M M G G G O Q K R M S P N N N N T U r A V C V W X V Y v ",
"Z [ ` .A ..+.A @.A #.$.#.A %.&.A *.=.A -.$.%.%.+.;.>.,.'.;.,.).).+.!.+.;.;.~.+.{.).;.;.+.~.).].).^.;./.{.;.r A A (..._.:.:.<.v ",
"Z [.}.|.A 1.1.A 2.A 3.4.5.A 6.4.A 5.7.A 8.9.7.7.5.5.4.5.0.5.4.4.3.1.1.3.a.V V b.b.V c.d.2.2.e.f.3.0.r r r r r A A A d.H g.c.h.v ",
"+ i.j.k.A l.f.A m.A n.6.7.A 9.o.A 8.4.A n.n.n.p.q.r.s.s.t.u.t.t.t.v.s.w.w.x.w.y.y.z.A.A.B.C.D.D.D.C.r A A A A A A A A z.z.y.E.v ",
"Z i.F.G.A H.I.A J.A 0.0.K.A J.K.A 0.0.A L.I.H.V M.M.M.M.V N.a.a.0.H.V O.4.4.5.4.4.5.5.P.n.p.Q.R.S.v.r A A A A A A A A A T.U.V.v ",
"Z i.W.X.A X.P.A f.A A Y.P.Y.A A P.n.P.A P.9.Y.5.P.Z.Y.5.P.Z.Z.Z.`.`.f.Z.Y.f.5.Y.Y.P.4.4.4.f.2.J.a.2.r A A A A A A A A A T.Y. +v ",
"Z .+W.f.A X.n.A p.A z q.++A @+@+A #+P.A $+6.X.P.P.P.P.z #+P.P.m.e.l.l.1.a.a.%+&+d.d.c.H.&+d.2.2.H.2.r A A A A A A A A T.0.J.*+v ",
"Z =+-+m.A ;+;+A >+A c.,+,+A ,+H A H b.A '+)+,+,+d.,+d.d.!+~+l.1.1.4.l.f.l.l.G.l.1.~+!+!+C l.1.l.Y.5.Z.T.T.T.G.A A A T.{+J.l.]+v ",
"+ ^+/+(+A 6.m.A X.A P.X.X.A P.++A 7.++A ++_+:+s.s._+9.7.7.P.m.m.P.P.P.P.7.7.6.6.f.!+L.B L.d.J.J.4.0.0.J.a.B r A A T.g.<+<+[+}+v ",
"+ |+1+B A 2+9.A 2+A A A 6.A 3+4+A 1.8.A 5+4+8.m.6.6.o.6+t.7+u.7+7+z 2+3+8+D '+'+X B W W 9+9+H H H G M 0+0+;+r A T.a+L >+>+b+c+v ",
"d+e+f+g+++++6.6.q.q.n.h+h+q.q.r.++h+n.n.6.6.6.6.6.m.m.m.6.6.6.m.6.m.6.n.q.q.n.5+e.Y.n.6.i+n.n.o.o.o.o.o.h+q.q.T.++n.n.q.q.o.j+v ",
"k+}.l+m+n+o+p+q+r+r+s+p+t+u+v+w+x+v+q+y+y+z+A+B+B+B+z+z+C+D+A+E+C+F+C+G+H+H+I+H+I+F+J+F+I+K+L+M+M+M+I+N+H+H+O+K+I+K+K+F+I+P+v v ",
"Q+R+v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v "};

279
dox/prev1.xpm Normal file
View File

@ -0,0 +1,279 @@
/* XPM */
static char * prev1_xpm[] = {
"64 16 260 2",
" c None",
". c #FEFEFE",
"+ c #EBEEE5",
"@ c #3B3C3A",
"# c #DADCD3",
"$ c #D1D3CB",
"% c #D3D6CE",
"& c #D0D2CA",
"* c #CED1CA",
"= c #D2D5CD",
"- c #D5D7CF",
"; c #D0D3CB",
"> c #CCCEC7",
", c #D6D8D0",
"' c #D1D4CC",
") c #D5D7D0",
"! c #D3D6D0",
"~ c #D6D9D1",
"{ c #D4D6CE",
"] c #D7DAD2",
"^ c #D8DBD3",
"/ c #DCDFD6",
"( c #DEE0D8",
"_ c #E1E4DB",
": c #E3E4DD",
"< c #E3E5DD",
"[ c #DFE1DB",
"} c #E1E4DC",
"| c #DFE1D9",
"1 c #DEE0D9",
"2 c #E0E3DB",
"3 c #DBDCD6",
"4 c #DDE0D8",
"5 c #E5E8E0",
"6 c #E2E5DE",
"7 c #939590",
"8 c #0F0F0F",
"9 c #E4E6DE",
"0 c #D6D6D3",
"a c #D7D7D4",
"b c #D5D5D3",
"c c #D6D6D4",
"d c #666666",
"e c #D8D8D6",
"f c #D5D5D2",
"g c #D4D4D2",
"h c #D2D3D0",
"i c #D1D2CF",
"j c #D4D4D1",
"k c #D3D3D1",
"l c #D9D9D7",
"m c #CDCCCB",
"n c #9B9C97",
"o c #535450",
"p c #050504",
"q c #CBCEC7",
"r c #C8C9C6",
"s c #C7C7C5",
"t c #C7C6C5",
"u c #C6C5C4",
"v c #000000",
"w c #FFFFFF",
"x c #C5C5C3",
"y c #C6C6C4",
"z c #C8C7C4",
"A c #CACAC8",
"B c #C9CAC7",
"C c #CAC9C8",
"D c #CCCCC9",
"E c #CFCECC",
"F c #D7D7D5",
"G c #D8D7D6",
"H c #D9DAD7",
"I c #D9DAD8",
"J c #D2D2D0",
"K c #D2D1D0",
"L c #D0D0CD",
"M c #D3D4D1",
"N c #D6D5D3",
"O c #D6D6D5",
"P c #D4D4D3",
"Q c #CDCDCB",
"R c #979993",
"S c #484946",
"T c #020202",
"U c #D2D4CC",
"V c #C4C5C3",
"W c #C7C7C6",
"X c #C8C9C7",
"Y c #CDCECC",
"Z c #CECFCD",
"` c #D0D0CE",
" . c #D1D1D0",
".. c #CCCCCA",
"+. c #CDCDCC",
"@. c #D1D1CF",
"#. c #D3D4D2",
"$. c #DADAD8",
"%. c #D7D7D6",
"&. c #D3D3D2",
"*. c #CACBC9",
"=. c #9C9E98",
"-. c #474846",
";. c #E0E3DA",
">. c #CFCFCE",
",. c #CCCDCB",
"'. c #CECECD",
"). c #D1D2D0",
"!. c #D2D3D1",
"~. c #CCCDCA",
"{. c #CECECC",
"]. c #CFCFCD",
"^. c #C9CAC8",
"/. c #C8C8C7",
"(. c #CACBC8",
"_. c #CBCBC9",
":. c #CBCBC8",
"<. c #9B9D97",
"[. c #474745",
"}. c #030303",
"|. c #DFE0D9",
"1. c #CECFCC",
"2. c #CCCCCB",
"3. c #CBCBCA",
"4. c #D2D2D1",
"5. c #D8D8D7",
"6. c #D7D8D6",
"7. c #92948E",
"8. c #434441",
"9. c #EDEFE7",
"0. c #D0D0CF",
"a. c #444542",
"b. c #E7EAE1",
"c. c #DCDCDC",
"d. c #DDDDDC",
"e. c #DBDBDA",
"f. c #DADADA",
"g. c #DBDBDB",
"h. c #CACAC9",
"i. c #CCCCCC",
"j. c #CECFCE",
"k. c #93958F",
"l. c #E1E3DB",
"m. c #DEDEDD",
"n. c #DFDFDD",
"o. c #E2E2E0",
"p. c #E0E0DF",
"q. c #E0E0DE",
"r. c #DFDFDE",
"s. c #DCDCDA",
"t. c #DCDCDB",
"u. c #D9D9D8",
"v. c #949691",
"w. c #E5E8E1",
"x. c #DBDBD9",
"y. c #434442",
"z. c #FDFDFD",
"A. c #B5B5B3",
"B. c #B6B5B3",
"C. c #B6B6B4",
"D. c #B7B6B4",
"E. c #B8B8B6",
"F. c #B9B9B6",
"G. c #BAB9B7",
"H. c #B8B7B5",
"I. c #B8B8B5",
"J. c #B6B7B5",
"K. c #B9B8B7",
"L. c #B9B9B7",
"M. c #B7B8B6",
"N. c #B7B7B4",
"O. c #B6B7B4",
"P. c #B7B8B5",
"Q. c #BBBAB8",
"R. c #BABAB8",
"S. c #BDBDBB",
"T. c #BEBEBC",
"U. c #BCBCBA",
"V. c #BCBCB9",
"W. c #BBBBB9",
"X. c #BBBBB8",
"Y. c #B7B7B5",
"Z. c #BFBFBE",
"`. c #B1B2AF",
" + c #4E4F4D",
".+ c #DBDDDA",
"++ c #CAC9C7",
"@+ c #CCCBC8",
"#+ c #CBCAC8",
"$+ c #CACAC7",
"%+ c #C8C8C6",
"&+ c #C7C7C4",
"*+ c #C7C6C4",
"=+ c #C8C7C5",
"-+ c #C9C8C6",
";+ c #C9C9C7",
">+ c #C8C7C6",
",+ c #CCCBC9",
"'+ c #CECDCC",
")+ c #CDCDCA",
"!+ c #CFCECD",
"~+ c #919291",
"{+ c #50504F",
"]+ c #1A1A1A",
"^+ c #C7C9C5",
"/+ c #8C8D89",
"(+ c #8B8C88",
"_+ c #898A86",
":+ c #8A8B87",
"<+ c #888986",
"[+ c #888985",
"}+ c #8A8B88",
"|+ c #898A87",
"1+ c #8A8A88",
"2+ c #898986",
"3+ c #878884",
"4+ c #858683",
"5+ c #858682",
"6+ c #868783",
"7+ c #848481",
"8+ c #81827E",
"9+ c #82837F",
"0+ c #81827F",
"a+ c #80817D",
"b+ c #7F807D",
"c+ c #7F7F7C",
"d+ c #7E7F7C",
"e+ c #7D7E7B",
"f+ c #7E7E7B",
"g+ c #7E7F7B",
"h+ c #7F807E",
"i+ c #80817E",
"j+ c #3F3F3E",
"k+ c #131313",
"l+ c #E0E2DB",
"m+ c #7B7C78",
"n+ c #4B4B49",
"o+ c #484847",
"p+ c #494A48",
"q+ c #4E4E4C",
"r+ c #4D4D4C",
"s+ c #4D4E4C",
"t+ c #4C4D4B",
"u+ c #4C4C4B",
"v+ c #4D4D4B",
"w+ c #4B4C4A",
"x+ c #4C4C4A",
"y+ c #4B4B4A",
"z+ c #4A4A48",
"A+ c #4A4B49",
"B+ c #494A49",
"C+ c #4A4A49",
"D+ c #3A3A38",
"E+ c #414240",
"F+ c #171717",
"G+ c #151515",
"H+ c #363736",
"I+ c #181818",
"J+ c #161616",
"K+ c #141414",
". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + @ ",
". . # $ % & & $ & * = = - $ ; ; ; > & $ % , % $ = $ = = ' ) % ) ! ~ { ) ] ] ^ ^ ^ ~ ] / / ( _ : < _ [ } | 1 2 2 ( | 3 4 5 6 7 8 ",
". 9 0 a a b b c d a a e 0 0 0 0 0 b b f g b h i j b a a b g k g k g g g k k k g g g g g b b e c l a a e e b a a g g c c m n o p ",
". q r s s t u d v w x y y z A B B v v v C C v v v D E v v v F v G H v I v 0 g v v J K v g J v L K v v g g g M N O M N P Q R S T ",
". U V W W X d v v w Q Y Z ` ` .Z v ..+.v +.v @.g v #.v P P P v k k v #.v M v $.$.v O v %.c v c v P P &.&.P &.&.&.k g g *.=.-.T ",
". ;.>.Z ,.d v v v '.d d d ).!.h >.v >.~.v {.v ].>.v >.v @.>. .v ].>.v {.v ..v ..^.v /.v B (.v ^.v ^._.^.^.:.W s y x x y k <.[.}.",
". |.Z ` d v v v v v v v v w 1.2.1.v ..3.v :.v ..3.v Y v ].>.>.v k P v %.v P v P P v g v 4.P v c v 5.%.c a F 6.6.5.b &.a @.7.8.}.",
". 9.h d v v v v v v v v v w 1.Y Z v @. .v .v h h v @.v ).@.0.v ).).v P v h v P !.v M v P P v P b v h P h k ).@.g P &.P &.7.a.}.",
". b.c.d.v v v v v v v v v w e.f.g.v v v P !.v v v !. .v v _.2.` v Y v _.v h.v h._.v i.v ` ` v ` j.Z v j.` ` 0.Z i.i.2.>.'.k.a.}.",
". l.m.n.n.v v v v v v v v w o.p.p.v o.q.r.r.v m.v s.t.v s.$.e.I v I v I v $.v a 6.v b v M .v #.0 M v #.g b P k ).@.>.@.u.v.a.T ",
". w.:.X B ..v v v w w w w w ` L @.v 1.1...:.v (.v _._.v L ].].L v .v ` v .v !.#.v M v J #.v 0. .g v !. .L Y 1.L ].].0.x.7 y.}.",
". z.A.A.B.C.D.v v w E.F.G.E.H.I.J.v K.L.E.E.v F.L.v E.v L.M.L.I.v N.v O.v P.v L.Q.v R.v S.T.v U.V.Q.v W.R.W.R.X.G.L.C.Y.Z.`. +}.",
". .+_.++C _.~._.v w @+#+$+$+$+$+%+v z &+*+=+v A A v z v v v -+$+;+v >+t v *+;+v v A ,+D v v '+'+v v ..~.)+'+!+Q Q !+!+..F ~+{+]+",
". ^+/+(+/+(+_+(+w w :+:+<+[+:+}+|+1+|+_+2+3+4+5+4+6+4+7+7+8+9+0+9+8+8+0+0+0+9+9+8+9+a+b+b+c+b+c+d+e+e+d+f+g+b+b+b+c+h+i+8+6+j+k+",
"l+m+n+o+p+o+n+q+q+ +q+q+q+q+q+q+q+q+r+r+r+q+s+t+t+u+t+v+u+w+x+n+n+n+n+n+n+w+n+w+w+w+w+w+y+z+p+z+y+n+A+A+B+B+A+C+C+A+A+n+D+E+F+G+",
"H+I+F+F+F+F+J+G+G+G+G+J+J+G+G+G+K+J+F+I+I+F+F+J+J+G+G+G+J+J+J+G+G+G+J+G+K+G+J+J+J+J+F+F+F+G+K+k+K+K+K+K+K+K+k+G+G+k+G+G+T k+k+k+"};

283
dox/prev2.xpm Normal file
View File

@ -0,0 +1,283 @@
/* XPM */
static char * prev2_xpm[] = {
"64 16 264 2",
" c None",
". c #131313",
"+ c #020202",
"@ c #151515",
"# c #141414",
"$ c #171717",
"% c #161616",
"& c #181818",
"* c #363736",
"= c #414240",
"- c #3A3A38",
"; c #4B4B49",
"> c #4A4B49",
", c #4A4A49",
"' c #494A49",
") c #4B4B4A",
"! c #4A4A48",
"~ c #494A48",
"{ c #4B4C4A",
"] c #4C4C4A",
"^ c #4C4C4B",
"/ c #4D4D4B",
"( c #4C4D4B",
"_ c #4D4E4C",
": c #4E4E4C",
"< c #4D4D4C",
"[ c #4E4F4D",
"} c #484847",
"| c #7B7C78",
"1 c #E0E2DB",
"2 c #3F3F3E",
"3 c #868783",
"4 c #81827E",
"5 c #80817E",
"6 c #7F807E",
"7 c #7F7F7C",
"8 c #7F807D",
"9 c #666666",
"0 c #7E7F7B",
"a c #7E7E7B",
"b c #7E7F7C",
"c c #7D7E7B",
"d c #80817D",
"e c #82837F",
"f c #81827F",
"g c #848481",
"h c #858683",
"i c #858682",
"j c #878884",
"k c #898986",
"l c #898A86",
"m c #898A87",
"n c #8A8A88",
"o c #8A8B88",
"p c #8A8B87",
"q c #888985",
"r c #888986",
"s c #8C8D89",
"t c #8B8C88",
"u c #C7C9C5",
"v c #FEFEFE",
"w c #1A1A1A",
"x c #50504F",
"y c #919291",
"z c #D7D7D5",
"A c #CCCCCA",
"B c #CFCECD",
"C c #000000",
"D c #FFFFFF",
"E c #CECDCC",
"F c #CDCDCA",
"G c #CCCDCA",
"H c #CFCECC",
"I c #CCCCC9",
"J c #CCCBC9",
"K c #C9C9C7",
"L c #C7C6C4",
"M c #C8C7C4",
"N c #CACAC7",
"O c #C9C8C6",
"P c #CACAC8",
"Q c #C8C7C5",
"R c #C7C7C4",
"S c #C8C8C6",
"T c #CBCAC8",
"U c #CCCBC8",
"V c #CBCBC9",
"W c #CAC9C8",
"X c #CAC9C7",
"Y c #DBDDDA",
"Z c #030303",
"` c #B1B2AF",
" . c #BFBFBE",
".. c #B7B7B5",
"+. c #B6B6B4",
"@. c #BBBBB9",
"#. c #BABAB8",
"$. c #BBBAB8",
"%. c #BCBCB9",
"&. c #BCBCBA",
"*. c #BEBEBC",
"=. c #BDBDBB",
"-. c #B9B9B7",
";. c #B7B8B5",
">. c #B6B7B4",
",. c #B8B8B6",
"'. c #B7B7B4",
"). c #B8B8B5",
"!. c #B9B9B6",
"~. c #B9B8B7",
"{. c #B6B7B5",
"]. c #B8B7B5",
"^. c #BAB9B7",
"/. c #B7B6B4",
"(. c #B6B5B4",
"_. c #B6B5B3",
":. c #B5B5B3",
"<. c #FDFDFD",
"[. c #434442",
"}. c #939590",
"|. c #DBDBD9",
"1. c #D0D0CF",
"2. c #CDCECC",
"3. c #D4D4D3",
"4. c #D4D4D2",
"5. c #D1D1D0",
"6. c #D3D4D2",
"7. c #D2D2D0",
"8. c #D3D4D1",
"9. c #D2D3D1",
"0. c #D0D0CE",
"a. c #D0D0CD",
"b. c #CFCFCD",
"c. c #CACBC8",
"d. c #CBCBC8",
"e. c #CECFCC",
"f. c #D1D1CF",
"g. c #CBCBCA",
"h. c #CCCCCB",
"i. c #C9CAC7",
"j. c #C8C9C7",
"k. c #E5E8E1",
"l. c #444542",
"m. c #949691",
"n. c #D9D9D8",
"o. c #D6D6D3",
"p. c #D5D5D3",
"q. c #D7D8D6",
"r. c #D7D7D4",
"s. c #DADAD8",
"t. c #D9DAD8",
"u. c #D9DAD7",
"v. c #DBDBDA",
"w. c #DCDCDA",
"x. c #DCDCDB",
"y. c #DEDEDD",
"z. c #DFDFDE",
"A. c #E0E0DE",
"B. c #E2E2E0",
"C. c #E0E0DF",
"D. c #E1E1DF",
"E. c #DFDFDD",
"F. c #E1E3DB",
"G. c #93958F",
"H. c #CECFCD",
"I. c #CECFCE",
"J. c #CCCCCC",
"K. c #CACAC9",
"L. c #CBCBCB",
"M. c #CDCECD",
"N. c #DBDBDB",
"O. c #DADADA",
"P. c #DDDDDC",
"Q. c #DCDCDC",
"R. c #DDDDDD",
"S. c #E7EAE1",
"T. c #92948E",
"U. c #D3D3D2",
"V. c #D1D2D0",
"W. c #D2D3D0",
"X. c #CDCDCC",
"Y. c #D1D1CE",
"Z. c #EDEFE7",
"`. c #434441",
" + c #D8D8D7",
".+ c #D6D6D4",
"++ c #D2D2D1",
"@+ c #D7D7D6",
"#+ c #D3D3D1",
"$+ c #CFCFCE",
"%+ c #DFE0D9",
"&+ c #474745",
"*+ c #9B9D97",
"=+ c #C6C6C4",
"-+ c #C5C5C3",
";+ c #C9CAC8",
">+ c #C8C8C7",
",+ c #CECECC",
"'+ c #CECECD",
")+ c #CCCDCB",
"!+ c #E0E3DA",
"~+ c #474846",
"{+ c #9C9E98",
"]+ c #CACBC9",
"^+ c #D6D6D5",
"/+ c #CDCDCB",
"(+ c #C7C7C6",
"_+ c #C4C5C3",
":+ c #D2D4CC",
"<+ c #484946",
"[+ c #979993",
"}+ c #D6D5D3",
"|+ c #D3D2D1",
"1+ c #D2D1D0",
"2+ c #D4D4D1",
"3+ c #D8D7D6",
"4+ c #C6C5C4",
"5+ c #C7C6C5",
"6+ c #C7C7C5",
"7+ c #C8C9C6",
"8+ c #CBCEC7",
"9+ c #050504",
"0+ c #535450",
"a+ c #9B9C97",
"b+ c #CDCCCB",
"c+ c #D8D8D6",
"d+ c #D9D9D7",
"e+ c #D1D2CF",
"f+ c #D5D5D2",
"g+ c #E4E6DE",
"h+ c #0F0F0F",
"i+ c #E2E5DE",
"j+ c #E5E8E0",
"k+ c #DDE0D8",
"l+ c #DBDCD6",
"m+ c #DFE1D9",
"n+ c #DEE0D8",
"o+ c #E0E3DB",
"p+ c #DEE0D9",
"q+ c #E1E4DC",
"r+ c #DFE1DB",
"s+ c #E1E4DB",
"t+ c #E3E5DD",
"u+ c #E3E4DD",
"v+ c #DCDFD6",
"w+ c #D7DAD2",
"x+ c #D6D9D1",
"y+ c #D8DBD3",
"z+ c #D5D7D0",
"A+ c #D4D6CE",
"B+ c #D3D6D0",
"C+ c #D3D6CE",
"D+ c #D1D4CC",
"E+ c #D2D5CD",
"F+ c #D1D3CB",
"G+ c #D6D8D0",
"H+ c #D0D2CA",
"I+ c #CCCEC7",
"J+ c #D0D3CB",
"K+ c #D5D7CF",
"L+ c #CED1CA",
"M+ c #DADCD3",
"N+ c #3B3C3A",
"O+ c #EBEEE5",
". . . + @ @ . @ @ . # # # # # # . # @ $ $ $ % % % % @ # @ % @ @ @ % % % @ @ @ % % $ $ & & $ % # @ @ @ % % @ @ @ @ % $ $ $ $ & * ",
"@ $ = - ; > > , , > ' ' > > ; ) ! ~ ! ) { { { { { ; { ; ; ; ; ; ; ] { ^ / ( ^ ( ( _ : < < < : : : : : : : : [ : : ; } ~ } ; | 1 ",
". 2 3 4 5 6 7 8 9 8 0 a b c c b 7 8 7 8 8 d e 4 e e f f f 4 4 e f e 4 g g h 3 h i h j k l m n m o p q r p p p s t l t s t s u v ",
"w x y z A B B 9 C D E F G A H E E C C C I J C C C K L C C C M C N O C M C M P C C O Q C R M C S N C C N T U J P V G V W X V Y v ",
"Z [ ` ...+.9 C C D @.#.@.@.$.%.&.C *.=.C #.C $.-.C ;.C >.,.'.C ).-.C -.C ,.C -.!.C ,.C -.~.C {.C ].,.^.!.,././.(./.+._.:.:.<.v ",
"Z [.}.|.1.9 C C C 2.9 9 9 3.4.5.1.C 6.7.C 8.C 6.9.C 5.C 0.9.5.C a.b.C a.C V C c.c.C d.C e.e.C f.C 0.0.1.2.g.h.h.d.P A i.j.d.k.v ",
"+ l.m.n.9 C C C C C C C C D 8.o.6.C 5.8.C p.C q.r.C s.C t.u.t.C t.v.C w.C x.C y.y.C z.C A.B.C C.C B.D.C.z.z.C.C.A.z.C.E.E.y.F.v ",
"Z l.G.9 C C C C C C C C C D H.I.0.C 0.0.C J.C V K.C K.C V L.2.C 0.h.C M.C 5.C 5.5.C 9.C p.q.C N.O.C N.P.Q.Q.Q.Q.R.v.Q.N.P.Q.S.v ",
"Z l.T.U.C C C C C C C C C D 3.p.3.C C C 3.8.C C C V.W.C C V.V.V.C 1.C V.C f.C W.W.C 5.C 5.f.C H.2.e.C 0.0.X.Y.0.b.0.0.9.9.W.Z.v ",
"Z `.T.f.r.C C C C C C C C D + +.+C 3.++++4.C 3.C 3.3.C @+3.3.#+C $+C b.C 2.C g.A C d.C g.A C e.h.e.C 1.1.1.7.5.5.f.e.b.0.H.%+v ",
"Z &+*+#+=+-+C C C D D D D D ;+i.;+C c.i.I >+C ;+C ;+A C ,+Y.$+b.C 5.C f.C $+C $+b.C ,+C G $+C $+W.9.C U.U.1.'+'+)+,+,+)+H.$+!+v ",
"+ ~+{+]+4.4.#+C C D 3.U.U.3.3..+.+C .+@+.+^+C s.s.C 8.C 6.3.#+#+C 3.C 3.C 6.C 4.f.C X.C X.A C H.5.0.C H.2./+d.d.S j.j.(+(+_+:+v ",
"+ <+[+/+3.}+8.^+C D 4.4.4.|+|+1+a.C 7.4.2+1+C #+4.C o.C C C u.3+3+C }+|+C H I C C /+W W C C i.i.C C M =+=+-+Q K L 4+5+6+6+7+8+v ",
"9+0+a+b+.+.+4.4.D D p.c+c+r.r.d+.+c+p.p.4.4.4.4.4.#+#+#+4.4.4.#+4.#+4.p.r.r.p.2+e+W.p.4.f+p.p.o.o.o.o.o.c+r.r.r..+p.p.r.r.o.g+v ",
"h+}.i+j+k+l+m+n+o+o+p+m+q+r+s+t+u+s+n+v+v+w+x+y+y+y+w+w+z+A+x+B+z+C+z+D+E+E+F+E+F+C+G+C+F+H+I+J+J+J+F+K+E+E+L+H+F+H+H+C+F+M+v v ",
"N+O+v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v v "};

420
dox/text.c Normal file
View File

@ -0,0 +1,420 @@
#include "dox.h"
char **
TextGetLines(char *text, int *count)
{
int i, j, k;
char **list = NULL;
*count = 0;
i = 0;
k = 0;
if (!text)
return NULL;
*count = 1;
while (text[i])
{
j = i;
while ((text[j]) && (text[j] != '\n'))
j++;
k++;
list = realloc(list, sizeof(char *) * k);
list[k - 1] = malloc(sizeof(char) * (j - i + 1));
strncpy(list[k - 1], &(text[i]), (j - i));
list[k - 1][j - i] = 0;
i = j;
if (text[i] == '\n')
i++;
}
*count = k;
return list;
}
void
TextStateLoadFont(TextState * ts)
{
if ((ts->font) || (ts->efont) || (ts->xfont) || (ts->xfontset))
return;
if (!ts->fontname)
return;
if ((!ts->font) && (!ts->efont))
ts->font = Fnlib_load_font(fd, ts->fontname);
if ((!ts->font) && (!ts->efont))
{
char s[4096], w[4046], *dup, *ss;
dup = NULL;
dup = strdup(ts->fontname);
ss = strchr(dup, '/');
if (ss)
{
*ss = ' ';
word(dup, 1, w);
sprintf(s, "%s/%s.ttf", docdir, w);
word(dup, 2, w);
ts->efont = Efont_load(s, atoi(w));
if (ts->efont)
{
int as, ds;
Efont_extents(ts->efont, " ", &as, &ds, NULL, NULL, NULL, NULL, NULL);
ts->xfontset_ascent = as;
ts->height = as + ds;
}
}
if (dup)
free(dup);
}
if ((!ts->font) && (!ts->efont))
{
if ((!ts->xfont) && (strchr(ts->fontname, ',') == NULL))
{
ts->xfont = XLoadQueryFont(disp, ts->fontname);
if (ts->xfont)
{
ts->xfontset_ascent = ts->xfont->ascent;
ts->height = ts->xfont->ascent + ts->xfont->descent;
}
}
else if (!ts->xfontset)
{
int i, missing_cnt, font_cnt;
int descent;
char **missing_list, *def_str, **fn;
XFontStruct **fs;
ts->xfontset = XCreateFontSet(disp, ts->fontname, &missing_list,
&missing_cnt, &def_str);
if (missing_cnt)
{
XFreeStringList(missing_list);
return;
}
if (!ts->xfontset)
return;
font_cnt = XFontsOfFontSet(ts->xfontset, &fs, &fn);
ts->xfontset_ascent = 0;
for (i = 0; i < font_cnt; i++)
ts->xfontset_ascent = MAX(fs[i]->ascent, ts->xfontset_ascent);
descent = 0;
for (i = 0; i < font_cnt; i++)
descent = MAX(fs[i]->descent, descent);
ts->height = ts->xfontset_ascent + descent;
}
}
return;
}
void
TextSize(TextState * ts, char *text,
int *width, int *height, int fsize)
{
char **lines;
int i, num_lines;
*width = 0;
*height = 0;
lines = TextGetLines(text, &num_lines);
if (!lines)
return;
if (!ts)
return;
TextStateLoadFont(ts);
if (ts->font)
{
for (i = 0; i < num_lines; i++)
{
int high, wid, dummy;
Fnlib_measure(fd, ts->font, 0, 0, 999999, 999999,
0, 0, fsize, &ts->style, (unsigned char *)lines[i],
0, 0, &dummy, &dummy, &wid, &high, &dummy,
&dummy, &dummy, &dummy);
*height += high;
if (wid > *width)
*width = wid;
}
}
else if (ts->efont)
{
for (i = 0; i < num_lines; i++)
{
int ascent, descent, wid;
Efont_extents(ts->efont, lines[i], &ascent, &descent, &wid,
NULL, NULL, NULL, NULL);
*height += ascent + descent;
if (wid > *width)
*width = wid;
}
}
else if (ts->xfontset)
{
for (i = 0; i < num_lines; i++)
{
XRectangle ret1, ret2;
XmbTextExtents(ts->xfontset, lines[i], strlen(lines[i]), &ret1, &ret2);
*height += ret2.height;
if (ret2.width > *width)
*width = ret2.width;
}
}
else if ((ts->xfont) && (ts->xfont->min_byte1 == 0) &&
(ts->xfont->max_byte1 == 0))
{
for (i = 0; i < num_lines; i++)
{
int wid;
wid = XTextWidth(ts->xfont, lines[i], strlen(lines[i]));
*height += ts->xfont->ascent + ts->xfont->descent;
if (wid > *width)
*width = wid;
}
}
else if ((ts->xfont))
{
for (i = 0; i < num_lines; i++)
{
int wid;
wid = XTextWidth16(ts->xfont, (XChar2b *) lines[i],
strlen(lines[i]) / 2);
*height += ts->xfont->ascent + ts->xfont->descent;
if (wid > *width)
*width = wid;
}
}
freestrlist(lines, num_lines);
return;
}
void
TextDraw(TextState * ts, Window win, char *text,
int x, int y, int w, int h, int fsize,
int justification)
{
char **lines;
int i, num_lines;
int xx, yy;
XGCValues gcv;
static GC gc = 0;
int r, g, b;
lines = TextGetLines(text, &num_lines);
if (!lines)
return;
if (!ts)
return;
TextStateLoadFont(ts);
xx = x;
yy = y;
if (!gc)
gc = XCreateGC(disp, win, 0, &gcv);
if (ts->font)
{
for (i = 0; i < num_lines; i++)
{
int high, wid, dummy;
Fnlib_measure(fd, ts->font, 0, 0, 999999, 999999,
0, 0, fsize, &ts->style, (unsigned char *)lines[i],
0, 0, &dummy, &dummy, &wid, &high, &dummy,
&dummy, &dummy, &dummy);
if ((ts->style.orientation == FONT_TO_UP) ||
(ts->style.orientation == FONT_TO_DOWN))
fsize = w;
xx = x + (((w - wid) * justification) >> 10);
Fnlib_draw(fd, ts->font, win, 0, xx, yy, w, h,
0, 0, fsize, &ts->style, (unsigned char *)lines[i]);
yy += high;
}
}
else if (ts->efont)
{
for (i = 0; i < num_lines; i++)
{
int ascent, descent, wid;
Efont_extents(ts->efont, lines[i], &ascent, &descent, &wid,
NULL, NULL, NULL, NULL);
if (i == 0)
yy += ascent;
xx = x + (((w - wid) * justification) >> 10);
if (ts->effect == 1)
{
r = ts->bg_col.r;
g = ts->bg_col.g;
b = ts->bg_col.b;
XSetForeground(disp, gc, Imlib_best_color_match(id, &r, &g, &b));
EFont_draw_string(disp, win, gc, xx + 1, yy + 1,
lines[i], ts->efont, Imlib_get_visual(id),
Imlib_get_colormap(id));
}
else if (ts->effect == 2)
{
r = ts->bg_col.r;
g = ts->bg_col.g;
b = ts->bg_col.b;
XSetForeground(disp, gc, Imlib_best_color_match(id, &r, &g, &b));
EFont_draw_string(disp, win, gc, xx - 1, yy,
lines[i], ts->efont, Imlib_get_visual(id),
Imlib_get_colormap(id));
EFont_draw_string(disp, win, gc, xx + 1, yy,
lines[i], ts->efont, Imlib_get_visual(id),
Imlib_get_colormap(id));
EFont_draw_string(disp, win, gc, xx, yy - 1,
lines[i], ts->efont, Imlib_get_visual(id),
Imlib_get_colormap(id));
EFont_draw_string(disp, win, gc, xx, yy + 1,
lines[i], ts->efont, Imlib_get_visual(id),
Imlib_get_colormap(id));
}
r = ts->fg_col.r;
g = ts->fg_col.g;
b = ts->fg_col.b;
XSetForeground(disp, gc, Imlib_best_color_match(id, &r, &g, &b));
EFont_draw_string(disp, win, gc, xx, yy,
lines[i], ts->efont, Imlib_get_visual(id),
Imlib_get_colormap(id));
yy += ascent + descent;
}
}
else if (ts->xfontset)
{
for (i = 0; i < num_lines; i++)
{
XRectangle ret1, ret2;
XmbTextExtents(ts->xfontset, lines[i], strlen(lines[i]), &ret1, &ret2);
if (i == 0)
yy += ts->xfontset_ascent;
xx = x + (((w - ret2.width) * justification) >> 10);
if (ts->effect == 1)
{
r = ts->bg_col.r;
g = ts->bg_col.g;
b = ts->bg_col.b;
XSetForeground(disp, gc, Imlib_best_color_match(id, &r, &g, &b));
XmbDrawString(disp, win, ts->xfontset, gc, xx + 1, yy + 1,
lines[i], strlen(lines[i]));
}
else if (ts->effect == 2)
{
r = ts->bg_col.r;
g = ts->bg_col.g;
b = ts->bg_col.b;
XSetForeground(disp, gc, Imlib_best_color_match(id, &r, &g, &b));
XmbDrawString(disp, win, ts->xfontset, gc, xx - 1, yy,
lines[i], strlen(lines[i]));
XmbDrawString(disp, win, ts->xfontset, gc, xx + 1, yy,
lines[i], strlen(lines[i]));
XmbDrawString(disp, win, ts->xfontset, gc, xx, yy - 1,
lines[i], strlen(lines[i]));
XmbDrawString(disp, win, ts->xfontset, gc, xx, yy + 1,
lines[i], strlen(lines[i]));
}
r = ts->fg_col.r;
g = ts->fg_col.g;
b = ts->fg_col.b;
XSetForeground(disp, gc, Imlib_best_color_match(id, &r, &g, &b));
XmbDrawString(disp, win, ts->xfontset, gc, xx, yy,
lines[i], strlen(lines[i]));
yy += ret2.height;
}
}
else if ((ts->xfont) && (ts->xfont->min_byte1 == 0) &&
(ts->xfont->max_byte1 == 0))
{
XSetFont(disp, gc, ts->xfont->fid);
for (i = 0; i < num_lines; i++)
{
int wid;
wid = XTextWidth(ts->xfont, lines[i], strlen(lines[i]));
if (i == 0)
yy += ts->xfont->ascent;
xx = x + (((w - wid) * justification) >> 10);
if (ts->effect == 1)
{
r = ts->bg_col.r;
g = ts->bg_col.g;
b = ts->bg_col.b;
XSetForeground(disp, gc, Imlib_best_color_match(id, &r, &g, &b));
XDrawString(disp, win, gc, xx + 1, yy + 1,
lines[i], strlen(lines[i]));
}
else if (ts->effect == 2)
{
r = ts->bg_col.r;
g = ts->bg_col.g;
b = ts->bg_col.b;
XSetForeground(disp, gc, Imlib_best_color_match(id, &r, &g, &b));
XDrawString(disp, win, gc, xx - 1, yy,
lines[i], strlen(lines[i]));
XDrawString(disp, win, gc, xx + 1, yy,
lines[i], strlen(lines[i]));
XDrawString(disp, win, gc, xx, yy - 1,
lines[i], strlen(lines[i]));
XDrawString(disp, win, gc, xx, yy + 1,
lines[i], strlen(lines[i]));
}
r = ts->fg_col.r;
g = ts->fg_col.g;
b = ts->fg_col.b;
XSetForeground(disp, gc, Imlib_best_color_match(id, &r, &g, &b));
XDrawString(disp, win, gc, xx, yy,
lines[i], strlen(lines[i]));
yy += ts->xfont->ascent + ts->xfont->descent;
}
}
else if ((ts->xfont))
{
XSetFont(disp, gc, ts->xfont->fid);
for (i = 0; i < num_lines; i++)
{
int wid;
wid = XTextWidth16(ts->xfont, (XChar2b *) lines[i],
strlen(lines[i]) / 2);
if (i == 0)
yy += ts->xfont->ascent;
xx = x + (((w - wid) * justification) >> 10);
if (ts->effect == 1)
{
r = ts->bg_col.r;
g = ts->bg_col.g;
b = ts->bg_col.b;
XSetForeground(disp, gc, Imlib_best_color_match(id, &r, &g, &b));
XDrawString16(disp, win, gc, xx + 1, yy + 1,
(XChar2b *) lines[i], strlen(lines[i]) / 2);
}
else if (ts->effect == 2)
{
r = ts->bg_col.r;
g = ts->bg_col.g;
b = ts->bg_col.b;
XSetForeground(disp, gc, Imlib_best_color_match(id, &r, &g, &b));
XDrawString16(disp, win, gc, xx - 1, yy,
(XChar2b *) lines[i], strlen(lines[i]) / 2);
XDrawString16(disp, win, gc, xx + 1, yy,
(XChar2b *) lines[i], strlen(lines[i]) / 2);
XDrawString16(disp, win, gc, xx, yy - 1,
(XChar2b *) lines[i], strlen(lines[i]) / 2);
XDrawString16(disp, win, gc, xx, yy + 1,
(XChar2b *) lines[i], strlen(lines[i]) / 2);
}
r = ts->fg_col.r;
g = ts->fg_col.g;
b = ts->fg_col.b;
XSetForeground(disp, gc, Imlib_best_color_match(id, &r, &g, &b));
XDrawString16(disp, win, gc, xx, yy,
(XChar2b *) lines[i], strlen(lines[i]) / 2);
yy += ts->xfont->ascent + ts->xfont->descent;
}
}
freestrlist(lines, num_lines);
return;
}

0
dox/timestamp.h Normal file
View File

259
dox/title.xpm Normal file
View File

@ -0,0 +1,259 @@
/* XPM */
static char * title_xpm[] = {
"368 16 240 2",
" c None",
". c #D2D2D0",
"+ c #D0D0CE",
"@ c #D1D1CF",
"# c #CFCFCD",
"$ c #CFCFCC",
"% c #CECECC",
"& c #CECECB",
"* c #CDCDCB",
"= c #CCCCCA",
"- c #CBCBC9",
"; c #CBCBC8",
"> c #CCCCC9",
", c #CCCBC9",
"' c #CDCDCA",
") c #CBCBC7",
"! c #C8C8C5",
"~ c #C9C9C6",
"{ c #C9C9C7",
"] c #CECDCA",
"^ c #CDCCC9",
"/ c #D0D0CD",
"( c #D2D2CF",
"_ c #D3D3D0",
": c #D3D3D1",
"< c #D4D4D1",
"[ c #D6D6D3",
"} c #D4D4D2",
"| c #D6D6D4",
"1 c #D7D7D5",
"2 c #D8D8D6",
"3 c #D9D9D7",
"4 c #D6D6D5",
"5 c #DCDCDA",
"6 c #DEDEDC",
"7 c #DDDDDB",
"8 c #DEDDDB",
"9 c #DADAD8",
"0 c #DBDBD9",
"a c #DCDCD9",
"b c #DDDCDA",
"c c #DDDDDA",
"d c #DAD9D7",
"e c #D9D9D6",
"f c #D8D7D5",
"g c #D7D7D4",
"h c #D7D6D4",
"i c #D5D4D2",
"j c #D5D4D1",
"k c #D3D2D0",
"l c #D4D3CF",
"m c #D6D6D2",
"n c #D8D8D5",
"o c #DBDAD8",
"p c #D9D8D6",
"q c #D6D5D3",
"r c #D5D5D2",
"s c #D5D5D3",
"t c #D4D3D1",
"u c #D1D0CE",
"v c #CACAC7",
"w c #CCCCC8",
"x c #D7D6D3",
"y c #DADAD7",
"z c #D6D5D4",
"A c #D5D4D3",
"B c #979795",
"C c #979695",
"D c #959493",
"E c #D2D1CF",
"F c #D3D2D1",
"G c #949492",
"H c #D4D3D2",
"I c #D8D7D6",
"J c #989796",
"K c #D7D6D5",
"L c #999897",
"M c #D9D8D7",
"N c #989896",
"O c #D2D1D0",
"P c #D4D3D0",
"Q c #D1D1CE",
"R c #D2D1CE",
"S c #D1D0CF",
"T c #CFCECD",
"U c #D0CFCD",
"V c #CFCECC",
"W c #D0CFCC",
"X c #D1D0CD",
"Y c #CECDCC",
"Z c #CECDCB",
"` c #CFCECB",
" . c #CDCCCA",
".. c #9C9C99",
"+. c #000000",
"@. c #999997",
"#. c #969693",
"$. c #949491",
"%. c #D7D7D3",
"&. c #DCDCDB",
"*. c #DFDFDD",
"=. c #DEDEDB",
"-. c #DFDFDC",
";. c #E1E1DF",
">. c #E0E0DD",
",. c #E1E1E0",
"'. c #E0E0DE",
"). c #DBDBD8",
"!. c #939290",
"~. c #FFFFFF",
"{. c #949391",
"]. c #C0C0C0",
"^. c #91918F",
"/. c #949392",
"(. c #989795",
"_. c #D7D7D6",
":. c #D0CFCE",
"<. c #CCCBCA",
"[. c #DBDAD7",
"}. c #DCDBD9",
"|. c #DCDBDA",
"1. c #DBDAD9",
"2. c #DAD9D8",
"3. c #9E9E9C",
"4. c #9F9F9D",
"5. c #9D9D9B",
"6. c #9D9D9A",
"7. c #9C9C9A",
"8. c #9B9B99",
"9. c #9E9E9B",
"0. c #DBDBDA",
"a. c #DDDDDC",
"b. c #E0E0DF",
"c. c #939391",
"d. c #939291",
"e. c #969593",
"f. c #9F9E9C",
"g. c #DFDEDD",
"h. c #A1A19F",
"i. c #DEDDDC",
"j. c #9D9C9B",
"k. c #9D9C9A",
"l. c #9A9A98",
"m. c #DDDCDB",
"n. c #D4D4D3",
"o. c #D5D5D4",
"p. c #D3D2CF",
"q. c #CAC9C8",
"r. c #CAC9C7",
"s. c #CDCCCB",
"t. c #CFCFCE",
"u. c #929291",
"v. c #999998",
"w. c #979796",
"x. c #9C9C9B",
"y. c #9D9D9C",
"z. c #A0A09F",
"A. c #9E9E9D",
"B. c #DADAD9",
"C. c #D9D9D8",
"D. c #DFDFDE",
"E. c #E1E1E1",
"F. c #DEDEDD",
"G. c #D3D3D2",
"H. c #D8D8D7",
"I. c #D2D2D1",
"J. c #D1D1D0",
"K. c #E0E0E0",
"L. c #D0D0CF",
"M. c #989897",
"N. c #E0DFDE",
"O. c #9A9A99",
"P. c #DFDFDF",
"Q. c #A2A2A1",
"R. c #A2A2A2",
"S. c #949493",
"T. c #D3D3D3",
"U. c #969694",
"V. c #D7D7D7",
"W. c #D6D6D6",
"X. c #D5D5D5",
"Y. c #DADADA",
"Z. c #D9D9D9",
"`. c #DDDDDD",
" + c #DCDCDC",
".+ c #DEDEDE",
"++ c #DBDBDB",
"@+ c #E2E2E1",
"#+ c #E2E2E2",
"$+ c #E4E4E2",
"%+ c #E3E3E2",
"&+ c #E3E3E1",
"*+ c #E5E5E3",
"=+ c #E5E5E2",
"-+ c #E6E7E5",
";+ c #E2E2E0",
">+ c #E4E4E3",
",+ c #E4E4E1",
"'+ c #E5E5E4",
")+ c #E4E5E3",
"!+ c #CECECD",
"~+ c #CCCCCB",
"{+ c #CDCDCC",
"]+ c #D2D2D2",
"^+ c #D4D4D4",
"/+ c #D6D5D5",
"(+ c #D1D1D1",
"_+ c #D0D0D0",
":+ c #DCDBDB",
"<+ c #E6E6E4",
"[+ c #E7E8E6",
"}+ c #D8D8D8",
"|+ c #CCCDCA",
"1+ c #CACAC8",
"2+ c #CCCBC8",
"3+ c #CBCAC8",
"4+ c #C8C8C6",
"5+ c #C6C6C3",
"6+ c #C8C7C4",
"7+ c #C7C7C4",
"8+ c #C7C6C4",
"9+ c #C8C7C5",
"0+ c #C9C8C6",
"a+ c #C8C7C6",
"b+ c #C7C6C5",
"c+ c #C9CAC7",
"d+ c #CBCAC9",
"e+ c #CDCECB",
"f+ c #D8D9D7",
"g+ c #DDDCDC",
"h+ c #C5C5C2",
"i+ c #C5C6C3",
"j+ c #C4C4C2",
"k+ c #C3C3C1",
"l+ c #C2C1C0",
"m+ c #C4C3C1",
"n+ c #C2C1BF",
"o+ c #C3C2C0",
"p+ c #D2D3D0",
"q+ c #D1D2CF",
". + . . @ # $ # # % % & * = - ; > > = ; ; - - > > , ' > & ' ' ' = > ) ) ! ! ! ! ~ ! ! ! ~ { ) ' ] ^ & / / / $ / ( _ : @ ( . _ _ @ < [ [ [ < } | 1 2 1 3 2 1 | 4 2 2 5 5 6 6 7 8 8 9 3 0 5 0 a 7 b b 6 5 c 0 9 d 3 2 2 e | | f g [ h i f f [ i j k l [ [ [ m n o o o o f [ f n n h h e d p f e g f q i r r i r i s t . u & & $ $ & / & * ' ' % ' ; v ; ; v { v ; ; - ; w ' ' % = & $ / / / # $ + / / + # % % $ + : . i g 1 x 1 1 n n 2 3 3 1 3 9 y y 9 3 3 2 1 g 2 3 2 n 2 9 3 1 1 1 2 e n 2 f 1 r < z [ r < . : . @ @ @ @ @ . : : @ @ : _ < : : : . . + . . @ # $ # # % % & * = - ; > > = ; ; - - > > , ' > & ' ' ' = > ) ) ! ! ! ! ~ ! ! ! ~ { ) ' ] ^ & / / / $ / ( _ : @ ( . _ _ @ < [ [ [ < } | 1 2 1 3 2 1 | 4 2 2 5 5 6 6 7 8 8 9 3 0 5 0 a 7 b b 6 5 c 0 ",
"A B C D ( E k F : G H H i i q I 1 J [ z K L z A : t k t } < A } A h g M 2 2 I 2 M p f g z N K } h p d p p h z z s k O q < P k E Q u R E F z K h M h q f z q i k k k E O _ } } A z | K K | I 1 1 p p 1 3 n h g q K K g q r q | | z } < : < < . i [ [ [ < } | 1 2 1 3 2 1 | 4 2 2 5 0 7 7 5 b 5 3 2 3 9 3 e 3 f p 3 M 9 3 2 p 1 z K i t t H F F @ @ + u R R t t H t t q K I I p h I h q q H } q K s A | | h q s A z q K z 1 2 z I h 2 f | K p p f f K z s O k R u u S S S S t k H t S S T U V U U W % U U X u U U T U ] Y V V U Z ` U U Y .V u O k F A | z H ( E k F : : H H i i q I 1 K [ z K I z A : t k t } < A } A h g M 2 2 I 2 M p f g z 1 K } h p d p p h z z s k O q < P k E Q u R E F z K h M h q f z q i k k k E O _ } } A z | K K | I 1 1 p p 1 3 n h ",
"0 ..+.+.+.3 3 2 2 @.+.| s [ r < r #.+.: } $.+.< < : : @ @ . . : s s } } . s r s s s < s s $.+.[ : . _ } _ _ @ ( @ < : : : s : < : g g g %.r } } } [ s r r | | s : } : Q + / + . . Q Q . . @ < _ _ : _ < r | [ [ g 1 1 q | 1 | i H q } < : k ( E R E F z K h M h q f z q i k k k E k < s s z K 1 I I 2 3 3 3 o 0 0 5 &.7 6 6 7 c 7 5 5 5 a a c a a 5 a 0 0 5 a 5 9 y c a a 7 7 7 5 6 *.*.7 7 7 5 a 6 =.*.*.6 *.-.-.*.;.>.,.;.*.6 *.7 6 6 =.6 7 6 6 *.'.*.*.*.*.6 6 7 c 6 *.7 7 7 6 7 *.7 5 0 0 9 0 9 3 ).).).0 9 9 0 9 3 9 5 7 6 7 5 7 7 7 a a 0 0 5 0 ).).0 e 3 3 2 2 2 e | s [ r < r r [ : } _ < < < : : @ @ . . : s s } } . s r s s s < s s _ : [ : . _ } _ _ @ ( @ < : : : s : < : g g g %.r } } } [ s r r | | s : } : Q + / + . . Q Q . . @ < _ _ : _ < r | ",
": !.+.~.~.~.. F k {.+.].( k @ U u ^.+.~.!./.+.~.E u E . E t F E O S S S F S ( k : s : [ B (.+.~.q | [ | K z A K K H : F H [ K K g 1 M 4 4 1 3 d M e K 1 I p p 2 1 I K 1 f 1 [ h 2 _.I I I z I K K I I d 1 K z | I K 4 [ } r } r } } } | } i : g g g %.r } } } [ s r r | | s : } : ( @ Q @ : : . . : : F < i q | r q A A < t i } A q : O :.:.u Q :.Q / + + u / + U U # Z % * <.- .= ; , <.= = .] Z U W V $ / + u @ : H _ H H H A r 2 z z | 1 x q q z z 1 1 h A H z z q h K 1 f [.o }.|.1.1.o 2.f | | i s q 1 s H k k : t } r q t q i i H H i F k _ : E O : } : . F k k E ( ( k @ U u + :.S E F H } E u E . E t F E O S S S F S ( k : s : [ | h h g q | [ | K z A K K H : F H [ K K g 1 M 4 4 1 3 d M e K 1 I p p 2 1 I K 1 f 1 [ h 2 _.I I I z I K K I I d 1 K ",
"5 3.+.~.5 3.3.7 7 4.+.~.+.5 5.5.5 6.+.~.9 +.+.+.3.7 5 7.8.0 9 7.6.a ..).0 a 5.a 5 6.9.c 6 +.+.+.=.6 6 c 7 7 a a 7 7 5 7 0 6 6 7 6 a 7 5 7 7 0 0 &.7 5 7 5 0 0.0 7 a.a.&.&.0 0.9 3 3 3 3 3 | r | 1 n y n n n f 1 | s | s A K K q s A s g 1 1 g 1 M 4 4 1 3 d M e K 1 I p p 2 1 I K 1 f 1 [ h 1 4 K K K q q s s A s s } . @ @ @ @ @ + / Q + @ _ } : : : _ < : } : } s s r } 1 2 2 9 0 7 7 7 7 5 5 0 5 6 6 7 *.6 *.*.*.'.;.b.'.'.*.'.*.;.6 7 7 6 6 7 7 c 7 7 *.*.6 -.*.c c 6 c c 7 7 5 =.0 a 5 c 5 0 0 3 2 2 2 2 3 3 2 e e 2 3 2 9 9 0 5 5 7 6 6 6 7 7 5 7 7 5 5 7 7 7 7 6 5 5 5 5 5 5 5 a 0 5 9 3 ).5 7 7 5 0 9 0 9 0 a a ).).0 a 5 a 5 a c c 6 =.*.=.=.6 6 c 7 7 a a 7 7 5 7 0 6 6 7 6 a 7 5 7 7 0 0 &.7 5 7 5 0 0.0 7 a.a.&.&.0 0.9 3 3 3 3 3 | r | 1 n y n n n ",
"< c.+.+.S !.+.+.S d.+.].A ].r +.+.D +.+.1 e.+.].~.+.|.f.+.+.g.h.+.+.i.+.5 j.1.+.9 k.+.+.M l.+.~.~.|.|.|.0 m.a.0 m.&.&.i.5 5 7 7 7 m.}.&.|.9 I K K z F F O O F O n.A K F H } n.o.A s 4 I K _.4 z I s H A K 9 d M M p p 3 p p 2.9 9 0 9 7 6 7 6 a 7 5 7 7 0 0 &.7 5 7 5 0 0.0 7 a.a.&.&.0 0.9 9 9 9 2.2.1 [ 1 h 1 2 p I K f 2.9 2 p 9 3 3 1.1.|.1.1.1.2.2.3 1.1.b o |.|.1.3 3 2 M p K q s h z s h z h K 2 1.1.1.2.2.1 K H k k k k p.k E u S k E U :.+ U U U U k O @ u :.+ :.T Y & Z Z Z % V T U u V W V T Z , q.q.r.<.s.Z V s.V V U u u u F t t O } } < . . O S E i k S O O t A } r } H H A A 1 i | | p 2.|.8 6 g.g.'.g.b.i.7 5 |.1.9 9 }.|.0 M 3 o }.}.|.|.|.0 m.a.0 m.&.&.i.5 5 7 7 7 m.}.&.|.9 I K K z F F O O F O n.A K F H } n.o.A s 4 I K _.4 z I s H A K 9 ",
"t.u.+.~.~.u.+.].+.C +.].+.v.+.w.+.].+.].+.v.+.].+.x.+.y.+.].+.8.+.].+.7.+.h.+.z.+.A.+.].+.A.+.~.&.0.0.0.B.0.0.0 5 5 0.C.&.7 D.b.,.E.;.*.F.0 &.&.&.0 9 9 5 5 &.0 &.&.0.0.B.0.5 B.B.0.B.B.B.0.0.&.7 7 5 5 5 0.0.B.1.0 B.2.B.C.1.1.0.m.0 5 7 7 7 m.}.&.|.9 I K K z F F O O F O n.A K F H : G.n.H : n.s n.o.o.} s : F A h 2 _.e 2.H.3 3 H.H.H.2 4 | | _.o.s s s H G.. I.F O . . I.n.} G.n.< F } : _ + / Q O . G.: : : : o.| o.4 1 1 4 o.o.4 1 3 3 3 0.a.a.a.D.F.D.*.*.b.6 6 &.&.0 5 a.7 a.&.&.5 6 7 c B.2 H.2 _.1 _._._._.1 o.o.| 1 n.. : I.I.I.@ @ @ t.t.J.J.. . J.: : s z 4 _._.H.4 4 s o.s o.| H.5 5 0.0.&.&.&.&.9 9 &.B.0.0 a.'.'.D.a.a.F.a.0.a.a.&.&.0.0.0.B.0.0.0 5 5 0.C.&.7 D.b.,.E.;.*.F.0 &.&.&.0 9 9 5 5 &.0 &.&.0.0.B.0.5 B.B.0.B.B.B.0.0.&.7 7 5 5 5 0.",
"_.w.+.~.g w.+.].+.].+.].+.].+.].+.].+.].+.].+.].+.].+.].+.].+.].+.].+.].+.].+.].+.].+.].+.].+.~.n.: I.: @ @ + # # + J.@ I.: n.1 o.n.I.G.I.} } I.I.I.: n.G.n.G.s | | 4 | 4 } : J.G.I.: : G.r | _._.H.0 0 0 0 a 0 B.C.H.3 C.3 B.0 0 C.0.5 F.D.b.K.'.*.F.0 &.&.&.0 9 9 5 5 &.0 &.&.0.0.B.0.5 B.B.B.B.C.B.0.B.0.0 0.0 0.0 0 0 y 4 4 4 | 1 _.| s s n.: . I.G.G.} _ . J.: . t.+ + + J.@ L.@ G.I.. I.I.: I.G.I.: . I.I.I.L.+ J.} } : I.I.I.: G.n.. I.n.: I.I.. : . J.J.I.n.n.s : @ . . L.. : s } s } n.: n.s n.: } . } I.. . I.I.: } n.o.} n.| _.s _.4 1 _._.4 o.| g 4 1 4 H.0.0.B.B.9 _.n _.| g g 3 2 _.1 3 3 C._.C.1 1 _.2 | n.n.: n.I.: I.r : : _ : : : n.: I.: @ @ + # # + J.@ I.: n.1 o.n.I.G.I.} } I.I.I.: n.G.n.G.s | | 4 | 4 } : J.G.I.: : G.r | _._.H.0 0 0 0 ",
"4 M.+.~.2 v.+.].+.].+.].+.].+.].+.].+.].+.].+.].+.+.+.].+.].+.].+.].+.].+.].+.+.+.].+.].+.].+.~.F.a.6 F.D.D.D.7 5 6 a.F.6 a.F.*.*.'.D.6 D.6 7 a.5 5 0.0.2 2 4 4 1 2 2 9 2 9 B.2.3 H.C.0 9 H.3 B.0 0 C.H.C.0 0.9 B.3 H.1 | } : I.G.: G.} o.1 o.o.G.} G.} } I.I.I.: n.G.n.G.s | | 4 | 4 } : I.G.G.t } n.r | _.2 3 9 9 9 2 3 2 C.d B.B.9 1.0 C.3 3 2.C.C.0 a.0.C.0 0 0.&.&.&.&.&.B.0.5 F.6 *.6 D.D.b.D.b.b.;.,.b.6 7 '.N.,.6 7 m.1.0 B.C.B.0 9 C.C.B.B.C.B.5 B.B.B._.4 1 1 _.C.C.H.H.C.2 H.H.C.C.B.3 3 _.| 1 C.H._._._.C.2 3 _.B.9 0 C.9 9 C.9 B.H._.1 4 _.1 | 2 H.H.3 _._._.| | n.| | i n.o.} i i } s o.o.1 _._.3 9 0 0.F.6 &.&.&.&.0.5 B.B.&.F.a.D.D.F.a.6 F.D.D.D.7 5 6 a.F.6 a.F.*.*.'.D.6 D.6 7 a.5 5 0.0.2 2 4 4 1 2 2 9 2 9 B.2.3 H.C.0 9 H.3 B.0 0 C.H.C.0 ",
"3 O.+.~._.w.+.].+.].+.].+.].+.].+.].+.].+.].+.].+.~.~.].+.].+.].+.].+.].+.].+.~.~.].+.].+.].+.~.9 0.9 9 C.H.0 0.B.0.B.0 H.C.9 H.2 _.H.C.C.3 9 B.0 &.0 0 0 B.B.3 0 0 H.2 3 B.B.C.1 4 | } s n.1 o.n.} o._.4 _._._.H.C.B.0 0.0 0 7 &.a.7 a.6 F.*.*.D.6 D.6 7 a.5 5 0.0.2 2 4 4 1 2 2 9 H.0 0.1.9 B.0.5 0 B.9 B.0.5 0 &.&.5 7 B.0.5 5 5 0.0.0 0 5 0 0 ).0 &.&.7 &.5 7 &.0.0.5 0 0 B.B.3 3 3 0.0.&.0.0.&.&.0.B.B.C.C.3 3 C.5 &.0.0.&.a.a.0.0.0.6 &.7 a.&.9 9 9 B.0 &.a.F.a.6 D.7 F.'.'.D.*.*.0.a.F.F.0.&.a.a.F.&.7 '.b.*.7 F.F.&.0.C.&.C.3 2 H.3 3 0 B.B.3 C.C._._.4 _.2 o._._.1 | o.4 | 3 C.9 B.0.9 9 B.y 9 C.2 _._.C.H.H.B.C.3 H.B.C.3 0 0.0.0.5 0.5 0.9 0.9 9 C.H.0 0.B.0.B.0 H.C.9 H.2 _.H.C.C.3 9 B.0 &.0 0 0 B.B.3 0 0 H.2 3 B.B.C.1 4 | } s n.1 o.n.} o._.4 _.",
"P.Q.+.].D.R.+.].+.].+.].+.~.+.].+.].+.].+.].+.~.+.].o.S.+.].+.].+.].+.].+.~.+.].T.U.+.].+.].+.~.V.W._._.V.4 o.o.n.W.4 4 X.H._.C.H.Y.Z.0.0.0.a.&.a.`.0.0.0.0. +F..+D..+D..+`.`.D.`.`.&.&.0.&.0.0.0.0.&.7 6 F.&.0.0 0 0.C.0.5 0.0.0 0 C.C.9 H.2 _.H.C.C.3 9 B.0 &.0 0 0 B.B.3 0 0 H.2 3 B.B.C.1 4 1 o.| 4 2 _._.2 H.C.0.0 &. +a.a.D.D..+D.F..+6 F.a.5 5 Y.0.5 7 5 0.B.9 2 C.B.Y.++++++&. +Y. + + +&.0.0.B.0. +F.F.a.a.&.++5 5 5 ++&.5 7 ++ +&. +F.`.*.D.F.F.F.`.*.F.*.*.*.D.F.6 a.a.`.D.D.D.D.K.E.E.@+@+E.E.E.@+@+@+,.E.E.E.E.@+#+#+$+%+%+#+,.P.P..+P.P.,.P.K.D.E.P.P.K.K.b.P.b..+K.`.&.B.C.3 3 H.2 3 2 2 o.G.n.1 o.s G.: I.I.I.I.I.G.T.s 1 1 _._.W.4 V.W._._.V.4 o.o.n.W.4 4 X.H._.C.H.Y.Z.0.0.0.a.&.a.`.0.0.0.0. +F..+D..+D..+`.`.D.`.`.&.&.0.&.0.0.0.0.&.7 6 F.",
"@+&++.+.+.$++.~.+.~.+.~.+.~.$++.+.~.+.~.+.~.+.~.,.+.+.*.+.~.+.~.+.~.+.~.+.~.a.+.+.o +.~.+.~.+.~.B.B.0 }.0.9 C.H._.H.H.9 H.C.C.9 H.H.0 B.0.7 5 &.a.F.D.D.D.b.,.b.;.b.,.@+@+*+=+=+*+-+-+*+%+*+*+%+%+&+@+&+E.;+@+,.*.a.`.5 1.B.C.Z.3 H.V.C.H.B.C.Y.Z.0.0.0.a.&.a.`.0.0.0.0. +F..+D..+D..+`.`.D.F..+F.F.6 D.*.F.D.'.;.;.;+@+@+;+K.&+$+@+@+@+E.E.E.@+E.@+%+E.E.E.E.E.E.@+,.,.,.,.&+&+%+%+@+@+,.,.,.,.,.b.,.,.E.;.D.,.b.D.D.F.6 6 a.D.D.D.*.D.a.a.&.B.B.0.0.0.B.9 C.H.C.C.3 3 B.C.C.H.3 2 0 0.3 3 C.0.3 5 5 6 F.F.D.,.b.,.@+E.E.,.b.E.E.@+%+@+%+%+%+$+$+&+@+&+%+$+%+$+$+$+%+%+$+$+*+$+$+$+*+$+%+%+&+@+@+;.,.;.;.*.D.F.F.F.6 F.*.*.6 5 a.o 1.o 9 H.3 B.5 9 B.B.0 }.0.9 C.H._.H.H.9 H.C.C.9 H.H.0 B.0.7 5 &.a.F.D.D.D.b.,.b.;.b.,.@+@+*+=+=+*+-+-+*+%+*+*+%+%+&+@+&+E.;+",
": J.: ~.~.~.n.~.G.~._.~._.].@.2 +.~.} ~.G.~.: ~.G.o.~.~.4 ~.H.~.C.~.H.~.H.~.C.C.~.~.2 ~.H.~.2 ~.B.C.H.1 o.| 1 4 | _._.4 4 s | | _.9 3 9 9 9 1 _.4 _.1 | o.| n.1 _.2 2 2 2 2 H.3 4 o.} s G.: : : o.1 4 n.| | o.4 s | | 4 | | o.o.| 1 4 _.H.3 _._.9 B.0.7 5 &.a.F.D.D.D.b.;.b.;.b.,.@+@+>+$+,+$+'+)+%+@+&+@+;.,.D.,.;.,.D.;.;+E.b.,.,.D.*.*.*.6 a.&.0.B.5 B.B.3 2 2 H.1 1 o.} I.J.@ I.I.. } J.t.+ + + t.!+% !+% ~+* ~+~+{+% % % # # # t.+ + % + !+t.t.+ @ J.. . L.J.L.J.. G.I.. @ L.@ + @ : n.s 1 _.H._.1 H._.s 1 4 s G.} . . . . @ . I.} } s } : } : : J.: } . : n.n.G.o._._._.1 2 2 | | } : G.: : G.G.o.1 | 4 1 H.H.C._.H.2 H.H.C.C.3 2 2 C.H.1 2 9 B.C.H.1 o.| 1 4 | _._.4 4 s | | _.9 3 9 9 9 1 _.4 _.1 | o.| n.1 _.2 2 2 2 2 H.3 4 o.} s G.: : : o.1 4 n.| | ",
"++++++Y.C.C.B.B.B.0.0.B.B.C.+.+.1 ~.G.G.G.I.J.J.J.]+G.n.4 4 4 4 4 4 H._._._._.W.4 n.^+n.]+I.n.: G.n.o.G.n.n.n.T.} ^+4 X._.W.H._._.H.4 4 4 /+o.n.T.o.n.n.n.G.(+J.J._+J.t.L.I.I.n.G.I.^+G.G.I.]+(++ S L.@ J.I.I.G.H n.n.o.4 4 1 H.H._._.| 1 1 H.9 3 9 9 9 1 _.4 _.1 | o.| n.1 _.2 2 2 2 2 H.C._.4 s 1 X.4 _._.H.0.&.&. +a.0.a.`.&.F.P.D.P..+b.,.,.E.,.D.P.b.P.P.P.F.F.F.F..+D.a.Y.&.a.a.`.D.,.K.P.b.P.`.`.D..+a.&.C.H.Y.Y.C.B.0.B.Y.B.B.B.C.2.2.C.++Y.C.Y.B.B.&.&.&.&.B.++D.D.F.`.&.0.B.B.C.B.B.0.a.7 &. +`. +`.0.B.B.0.:+5 &.++0.&.&.5 1.B.|.&. +a.a.++++++Y.C.C.B.B.B.0.0.B.B.C.H._.1 z G.G.G.I.J.J.J.]+G.n.4 4 4 4 4 4 H._._._._.W.4 n.^+n.]+I.n.: G.n.o.G.n.n.n.T.} ^+4 X._.W.H._._.H.4 4 4 /+o.n.T.o.n.n.n.G.(+J.J._+J.t.L.I.I.n.G.I.^+G.G.I.]+(++ S L.@ J.I.",
"5 5 5 &.&.F.F.F.b.'.D.'.;.,.@+~.~.E.$+*+<+-+-+<+<+<+-+-+[+-+-+*+=+*+*+*+=+$+&+@+%+%+$+%+%+%+$+@+@+@+,.,.,.'.*.;.,.E.E.b.b.;.b.F.F.D.F.F.F.b.'.6 F.F.a.F.F.b.,.,.b.&.F.&.&.7 0.0.B.0.&.F.F.F.F.F.b.b.a.b.D.F.a.9 B.B.B.C.B.}+2 V.H.H.C.H.C.H.H.H._.4 4 /+o.n.T.o.n.n.n.G.(+I.I.(+I.L.J.n.n.4 o.o._._.V._.}+}+H.C.C.0 0.7 &.a.7 a.*.F.D.6 *.6 a.F.F.D.F.6 6 a.a.F.F.'.6 '.'.F.6 F.D.*.D.F.*.b.b.D.F.*.*.D.D.F.*.*.'.D.,.D.F.a.a.a.7 6 6 a.6 *.6 *.D.b.;.b.b.b.;.b.E.*.*.b.'.b.,.b.*.*.F.6 7 a.5 0 B.3 9 5 5 5 B.0 0 5 7 a.a.a.*.*.*.b.b.b.*.*.F.6 7 &.5 5 5 &.&.F.F.F.b.'.D.'.;.,.@+@+E.E.$+*+<+-+-+<+<+<+-+-+[+-+-+*+=+*+*+*+=+$+&+@+%+%+$+%+%+%+$+@+@+@+,.,.,.'.*.;.,.E.E.b.b.;.b.F.F.D.F.F.F.b.'.6 F.F.a.F.F.b.,.,.b.&.F.&.&.7 0.0.B.0.&.F.F.F.F.F.b.b.a.b.D.F.",
"- r.q.- |+- 1+, 2+3+v v v v 4+5+6+7+8+9+0+1+1+1+6+6+6+4+0+v { 6+a+b+b+8+{ a+c+1+, > d+* Y Y Y V = |+' Y T * * T T = d+d+= |+* Y % % U ~+~+e+S S :.+ * e+% U :.U !+U T T T T |+* # # U U U % U T T u u G.F F t o._.I f+3 3 5 5 +g+a.a.*.F.m.a.F.a.F.F.b.'.6 F.F.a.F.F.b.,.,.b.&.i.&.0.5 B.B.H.C.C.B.C.H.4 1 2 1 } } @ # e+' ] > . .c+{ 8+8+6+4+8+4+7+7+7+a+7+9+6+6+7+h+i+j+k+l+m+k+n+o+k+k+k+m+h+h+6+6+8+7+0+c+v ; * % > % % % U % p+U U / @ u U U U :.@ @ u T * U U U X S @ E q q h K q q q A O / u Y T T q+# * d+> |+, = & T <.T * ' <.<.' d+3+- - r.q.- |+- 1+, 2+3+v v v v 4+5+6+7+8+9+0+1+1+1+6+6+6+4+0+v { 6+a+b+b+8+{ a+c+1+, > d+* Y Y Y V = |+' Y T * * T T = d+d+= |+* Y % % U ~+~+e+S S :.+ * e+% U :.U !+U T T T T |+* # # U U U % U T T u u G.F F "};

889
dox/ttfont.c Normal file
View File

@ -0,0 +1,889 @@
#include "dox.h"
typedef struct _efont_color_tab EfontColorTable;
struct _efont_color_tab
{
Colormap cmap;
XColor list[256];
unsigned char match[8][8][8];
};
/*static EfontColorTable *color_tab = NULL; */
static unsigned char alpha_lut[5] =
{0, 64, 128, 192, 255};
static unsigned char bounded_palette[9] =
{0, 1, 2, 3, 4, 4, 4, 4, 4};
static TT_Raster_Map *
create_font_raster(int width, int height)
{
TT_Raster_Map *rmap;
rmap = malloc(sizeof(TT_Raster_Map));
rmap->width = (width + 3) & -4;
rmap->rows = height;
rmap->flow = TT_Flow_Down;
rmap->cols = rmap->width;
rmap->size = rmap->rows * rmap->width;
rmap->bitmap = malloc(rmap->size);
memset(rmap->bitmap, 0, rmap->size);
return rmap;
}
static TT_Raster_Map *
duplicate_raster(TT_Raster_Map * rmap)
{
TT_Raster_Map *new_rmap;
new_rmap = malloc(sizeof(TT_Raster_Map));
*new_rmap = *rmap;
new_rmap->bitmap = malloc(new_rmap->size);
memcpy(new_rmap->bitmap, rmap->bitmap, new_rmap->size);
return new_rmap;
}
static void
clear_raster(TT_Raster_Map * rmap)
{
memset(rmap->bitmap, 0, rmap->size);
}
static void
destroy_font_raster(TT_Raster_Map * rmap)
{
free(rmap->bitmap);
free(rmap);
}
static TT_Raster_Map *
calc_size(Efont * f, int *width, int *height, char *text)
{
int i, upm, ascent, descent, pw, ph;
TT_Instance_Metrics imetrics;
TT_Glyph_Metrics gmetrics;
TT_Raster_Map *rtmp;
TT_Get_Instance_Metrics(f->instance, &imetrics);
upm = f->properties.header->Units_Per_EM;
ascent = (f->properties.horizontal->Ascender * imetrics.y_ppem) / upm;
descent = (f->properties.horizontal->Descender * imetrics.y_ppem) / upm;
if (descent < 0)
descent = -descent;
pw = 0;
ph = ((f->max_ascent) - f->max_descent) / 64;
for (i = 0; text[i]; i++)
{
unsigned char j = text[i];
if (!TT_VALID(f->glyphs[j]))
continue;
TT_Get_Glyph_Metrics(f->glyphs[j], &gmetrics);
if (i == 0)
{
pw += ((-gmetrics.bearingX) / 64);
}
if (text[i + 1] == 0)
{
pw += (gmetrics.bbox.xMax / 64);
}
else
pw += gmetrics.advance / 64;
}
*width = pw;
*height = ph;
rtmp = create_font_raster(imetrics.x_ppem + 32, imetrics.y_ppem + 32);
rtmp->flow = TT_Flow_Up;
return rtmp;
}
static void
render_text(TT_Raster_Map * rmap, TT_Raster_Map * rchr, Efont * f, char *text,
int *xor, int *yor)
{
TT_Glyph_Metrics metrics;
TT_Instance_Metrics imetrics;
TT_F26Dot6 x, y, xmin, ymin, xmax, ymax;
int i, ioff, iread;
char *off, *read, *_off, *_read;
int x_offset, y_offset;
unsigned char j;
TT_Raster_Map *rtmp;
TT_Get_Instance_Metrics(f->instance, &imetrics);
j = text[0];
TT_Get_Glyph_Metrics(f->glyphs[j], &metrics);
x_offset = (-metrics.bearingX) / 64;
y_offset = -(f->max_descent / 64);
*xor = x_offset;
*yor = rmap->rows - y_offset;
rtmp = NULL;
for (i = 0; text[i]; i++)
{
j = text[i];
if (!TT_VALID(f->glyphs[j]))
continue;
TT_Get_Glyph_Metrics(f->glyphs[j], &metrics);
xmin = metrics.bbox.xMin & -64;
ymin = metrics.bbox.yMin & -64;
xmax = (metrics.bbox.xMax + 63) & -64;
ymax = (metrics.bbox.yMax + 63) & -64;
if (f->glyphs_cached[j])
rtmp = f->glyphs_cached[j];
else
{
rtmp = rchr;
clear_raster(rtmp);
TT_Get_Glyph_Pixmap(f->glyphs[j], rtmp, -xmin, -ymin);
f->glyphs_cached[j] = duplicate_raster(rtmp);
}
/* Blit-or the resulting small pixmap into the biggest one */
/* We do that by hand, and provide also clipping. */
xmin = (xmin >> 6) + x_offset;
ymin = (ymin >> 6) + y_offset;
xmax = (xmax >> 6) + x_offset;
ymax = (ymax >> 6) + y_offset;
/* Take care of comparing xmin and ymin with signed values! */
/* This was the cause of strange misplacements when Bit.rows */
/* was unsigned. */
if (xmin >= (int)rmap->width ||
ymin >= (int)rmap->rows ||
xmax < 0 ||
ymax < 0)
continue;
/* Note that the clipping check is performed _after_ rendering */
/* the glyph in the small bitmap to let this function return */
/* potential error codes for all glyphs, even hidden ones. */
/* In exotic glyphs, the bounding box may be larger than the */
/* size of the small pixmap. Take care of that here. */
if (xmax - xmin + 1 > rtmp->width)
xmax = xmin + rtmp->width - 1;
if (ymax - ymin + 1 > rtmp->rows)
ymax = ymin + rtmp->rows - 1;
/* set up clipping and cursors */
iread = 0;
if (ymin < 0)
{
iread -= ymin * rtmp->cols;
ioff = 0;
ymin = 0;
}
else
ioff = (rmap->rows - ymin - 1) * rmap->cols;
if (ymax >= rmap->rows)
ymax = rmap->rows - 1;
if (xmin < 0)
{
iread -= xmin;
xmin = 0;
}
else
ioff += xmin;
if (xmax >= rmap->width)
xmax = rmap->width - 1;
_read = (char *)rtmp->bitmap + iread;
_off = (char *)rmap->bitmap + ioff;
for (y = ymin; y <= ymax; y++)
{
read = _read;
off = _off;
for (x = xmin; x <= xmax; x++)
{
*off = bounded_palette[*off | *read];
off++;
read++;
}
_read += rtmp->cols;
_off -= rmap->cols;
}
x_offset += metrics.advance / 64;
}
}
static void
merge_text_16(XImage * xim, TT_Raster_Map * rmap, int offset_x, int offset_y,
unsigned long col)
{
int x, y, tmp;
unsigned char *ptr;
unsigned char cr, cg, cb, a, r, g, b, nr, ng, nb;
unsigned long pixel;
cr = (col >> 8) & 0xf8;
cg = (col >> 3) & 0xfc;
cb = (col << 3) & 0xf8;
for (y = 0; y < xim->height; y++)
{
ptr = (unsigned char *)rmap->bitmap + offset_x + ((y + offset_y) * rmap->cols);
for (x = 0; x < xim->width; x++)
{
if ((a = alpha_lut[*ptr]) > 0)
{
if (a < 255)
{
pixel = XGetPixel(xim, x, y);
r = (pixel >> 8) & 0xf8;
g = (pixel >> 3) & 0xfc;
b = (pixel << 3) & 0xf8;
tmp = (cr - r) * a;
nr = r + ((tmp + (tmp >> 8) + 0x80) >> 8);
tmp = (cg - g) * a;
ng = g + ((tmp + (tmp >> 8) + 0x80) >> 8);
tmp = (cb - b) * a;
nb = b + ((tmp + (tmp >> 8) + 0x80) >> 8);
pixel = ((nr & 0xf8) << 8) | ((ng & 0xfc) << 3) | ((nb & 0xf8) >> 3);
XPutPixel(xim, x, y, pixel);
}
else
XPutPixel(xim, x, y, col);
}
ptr++;
}
}
}
static void
merge_text_15(XImage * xim, TT_Raster_Map * rmap, int offset_x, int offset_y,
unsigned long col)
{
int x, y, tmp;
unsigned char *ptr;
unsigned char cr, cg, cb, a, r, g, b, nr, ng, nb;
unsigned long pixel;
cr = (col >> 7) & 0xf8;
cg = (col >> 2) & 0xf8;
cb = (col << 3) & 0xf8;
for (y = 0; y < xim->height; y++)
{
ptr = (unsigned char *)rmap->bitmap + offset_x + ((y + offset_y) * rmap->cols);
for (x = 0; x < xim->width; x++)
{
if ((a = alpha_lut[*ptr]) > 0)
{
if (a < 255)
{
pixel = XGetPixel(xim, x, y);
r = (pixel >> 7) & 0xf8;
g = (pixel >> 2) & 0xf8;
b = (pixel << 3) & 0xf8;
tmp = (cr - r) * a;
nr = r + ((tmp + (tmp >> 8) + 0x80) >> 8);
tmp = (cg - g) * a;
ng = g + ((tmp + (tmp >> 8) + 0x80) >> 8);
tmp = (cb - b) * a;
nb = b + ((tmp + (tmp >> 8) + 0x80) >> 8);
pixel = ((nr & 0xf8) << 7) | ((ng & 0xf8) << 2) | ((nb & 0xf8) >> 3);
XPutPixel(xim, x, y, pixel);
}
else
XPutPixel(xim, x, y, col);
}
ptr++;
}
}
}
static void
merge_text_24(XImage * xim, TT_Raster_Map * rmap, int offset_x, int offset_y,
unsigned long col)
{
int x, y, tmp;
unsigned char *ptr;
unsigned char cr, cg, cb, a, r, g, b, nr, ng, nb;
unsigned long pixel;
cr = (col >> 16) & 0xff;
cg = (col >> 8) & 0xff;
cb = col & 0xff;
for (y = 0; y < xim->height; y++)
{
ptr = (unsigned char *)rmap->bitmap + offset_x + ((y + offset_y) * rmap->cols);
for (x = 0; x < xim->width; x++)
{
if ((a = alpha_lut[*ptr]) > 0)
{
if (a < 255)
{
pixel = XGetPixel(xim, x, y);
r = (pixel >> 16) & 0xff;
g = (pixel >> 8) & 0xff;
b = pixel & 0xff;
tmp = (cr - r) * a;
nr = r + ((tmp + (tmp >> 8) + 0x80) >> 8);
tmp = (cg - g) * a;
ng = g + ((tmp + (tmp >> 8) + 0x80) >> 8);
tmp = (cb - b) * a;
nb = b + ((tmp + (tmp >> 8) + 0x80) >> 8);
pixel = ((nr << 16) | (ng << 8) | (nb));
XPutPixel(xim, x, y, pixel);
}
else
XPutPixel(xim, x, y, col);
}
ptr++;
}
}
}
/*
* static void
* merge_text_8(XImage * xim, TT_Raster_Map * rmap, int offset_x, int offset_y,
* unsigned long col, Colormap cm)
* {
* int x, y, tmp;
* unsigned char *ptr;
* unsigned char a, r, g, b, nr, ng, nb;
* unsigned long pixel;
*
* for (y = 0; y < xim->height; y++)
* {
* ptr = (unsigned char *)rmap->bitmap + offset_x + ((y + offset_y) * rmap->cols);
* for (x = 0; x < xim->width; x++)
* {
* if ((a = alpha_lut[*ptr]) > 0)
* {
* pixel = XGetPixel(xim, x, y);
* r = (pixel >> 8) & 0xf8;
* g = (pixel >> 3) & 0xfc;
* b = (pixel << 3) & 0xf8;
*
* tmp = (255 - r) * a;
* nr = r + ((tmp + (tmp >> 8) + 0x80) >> 8);
* tmp = (255 - g) * a;
* ng = g + ((tmp + (tmp >> 8) + 0x80) >> 8);
* tmp = (255 - b) * a;
* nb = b + ((tmp + (tmp >> 8) + 0x80) >> 8);
* pixel = ((nr & 0xf8) << 8) | ((ng & 0xfc) << 3) | ((nb & 0xf8) >> 3);
* XPutPixel(xim, x, y, pixel);
* }
* ptr++;
* }
* }
* col = 0;
* cm = 0;
* }
*/
static void
merge_text_1(XImage * xim, TT_Raster_Map * rmap, int offset_x, int offset_y,
unsigned long col)
{
int x, y;
unsigned char *ptr;
for (y = 0; y < xim->height; y++)
{
ptr = (unsigned char *)rmap->bitmap + offset_x + ((y + offset_y) * rmap->cols);
for (x = 0; x < xim->width; x++)
{
if (alpha_lut[*ptr] > 2)
XPutPixel(xim, x, y, col);
ptr++;
}
}
}
static char x_error = 0;
static void
handle_x_error(Display * d, XErrorEvent * ev)
{
d = NULL;
ev = NULL;
x_error = 1;
}
void
EFont_draw_string(Display * disp, Drawable win, GC gc, int x, int y, char *text,
Efont * font, Visual * vis, Colormap cm)
{
XImage *xim;
XShmSegmentInfo shminfo;
int width, height, w, h, inx, iny, clipx, clipy, rx, ry;
XWindowAttributes xatt, ratt;
TT_Raster_Map *rmap, *rtmp;
unsigned long col;
XGCValues gcv;
static char shm_checked = 0, shm = 1;
XErrorHandler erh = NULL;
Window chld;
char is_pixmap = 0;
inx = 0;
iny = 0;
rtmp = calc_size(font, &w, &h, text);
rmap = create_font_raster(w, h);
render_text(rmap, rtmp, font, text, &inx, &iny);
XGrabServer(disp);
erh = XSetErrorHandler((XErrorHandler) handle_x_error);
x_error = 0;
XGetWindowAttributes(disp, win, &xatt);
XFlush(disp);
if (x_error)
{
x_error = 0;
is_pixmap = 1;
XGetGeometry(disp, win, &chld, &rx, &rx,
(unsigned int *)&xatt.width, (unsigned int *)&xatt.height,
(unsigned int *)&rx, (unsigned int *)&xatt.depth);
XFlush(disp);
if (x_error)
{
destroy_font_raster(rmap);
destroy_font_raster(rtmp);
XUngrabServer(disp);
XFlush(disp);
XSetErrorHandler((XErrorHandler) erh);
return;
}
}
XSetErrorHandler((XErrorHandler) erh);
if (!is_pixmap)
{
XGetWindowAttributes(disp, xatt.root, &ratt);
XTranslateCoordinates(disp, win, xatt.root, 0, 0, &rx, &ry, &chld);
if ((xatt.map_state != IsViewable) &&
(xatt.backing_store == NotUseful))
{
destroy_font_raster(rmap);
destroy_font_raster(rtmp);
XUngrabServer(disp);
XFlush(disp);
return;
}
}
XGetGCValues(disp, gc, GCForeground, &gcv);
col = gcv.foreground;
clipx = 0;
clipy = 0;
x = x - inx;
y = y - iny;
width = xatt.width - x;
height = xatt.height - y;
if (width > w)
width = w;
if (height > h)
height = h;
if (!is_pixmap)
{
if ((rx + x + width) > ratt.width)
width = ratt.width - (rx + x);
if ((ry + y + height) > ratt.height)
height = ratt.height - (ry + y);
}
if (x < 0)
{
clipx = -x;
width += x;
x = 0;
}
if (y < 0)
{
clipy = -y;
height += y;
y = 0;
}
if (!is_pixmap)
{
if ((rx + x) < 0)
{
clipx -= (rx + x);
width += (rx + x);
x = -rx;
}
if ((ry + y) < 0)
{
clipy -= (ry + y);
height += (ry + y);
y = -ry;
}
}
if ((width <= 0) || (height <= 0))
{
destroy_font_raster(rmap);
destroy_font_raster(rtmp);
XUngrabServer(disp);
XFlush(disp);
return;
}
if (shm)
{
if (!shm_checked)
{
erh = XSetErrorHandler((XErrorHandler) handle_x_error);
}
xim = XShmCreateImage(disp, vis, xatt.depth, ZPixmap, NULL,
&shminfo, width, height);
if (!shm_checked)
{
XSync(disp, False);
if (x_error)
{
shm = 0;
XDestroyImage(xim);
xim = XGetImage(disp, win, x, y, width, height, 0xffffffff, ZPixmap);
XSetErrorHandler((XErrorHandler) erh);
shm_checked = 1;
}
else
{
shminfo.shmid = shmget(IPC_PRIVATE, xim->bytes_per_line *
xim->height, IPC_CREAT | 0666);
if (shminfo.shmid < 0)
{
shm = 0;
XDestroyImage(xim);
xim = XGetImage(disp, win, x, y, width, height, 0xffffffff, ZPixmap);
XSetErrorHandler((XErrorHandler) erh);
shm_checked = 1;
}
else
{
shminfo.shmaddr = xim->data = shmat(shminfo.shmid, 0, 0);
shminfo.readOnly = False;
XShmAttach(disp, &shminfo);
}
}
}
else
{
shminfo.shmid = shmget(IPC_PRIVATE, xim->bytes_per_line *
xim->height, IPC_CREAT | 0666);
if (shminfo.shmid < 0)
{
shm = 0;
XDestroyImage(xim);
xim = XGetImage(disp, win, x, y, width, height, 0xffffffff, ZPixmap);
XSetErrorHandler((XErrorHandler) erh);
shm_checked = 1;
}
else
{
shminfo.shmaddr = xim->data = shmat(shminfo.shmid, 0, 0);
shminfo.readOnly = False;
XShmAttach(disp, &shminfo);
}
}
if (!shm_checked)
{
XSync(disp, False);
if (x_error)
{
shm = 0;
XDestroyImage(xim);
xim = XGetImage(disp, win, x, y, width, height, 0xffffffff, ZPixmap);
shm_checked = 1;
}
XSetErrorHandler((XErrorHandler) erh);
shm_checked = 1;
}
}
else
xim = XGetImage(disp, win, x, y, width, height, 0xffffffff, ZPixmap);
if (shm)
XShmGetImage(disp, win, xim, x, y, 0xffffffff);
XUngrabServer(disp);
XFlush(disp);
if (xatt.depth == 16)
{
XVisualInfo xvi, *xvir;
int num;
xvi.visualid = XVisualIDFromVisual(vis);;
xvir = XGetVisualInfo(disp, VisualIDMask, &xvi, &num);
if (xvir)
{
if (xvir->red_mask != 0xf800)
xatt.depth = 15;
XFree(xvir);
}
}
if (xatt.depth == 16)
merge_text_16(xim, rmap, clipx, clipy, col);
else if ((xatt.depth == 24) || (xatt.depth == 32))
merge_text_24(xim, rmap, clipx, clipy, col);
/* else if (xatt.depth == 8)
* merge_text_8(xim, rmap, clipx, clipy, cm, col); */
else if (xatt.depth == 15)
merge_text_15(xim, rmap, clipx, clipy, col);
else if (xatt.depth <= 8)
merge_text_1(xim, rmap, clipx, clipy, col);
if (shm)
XShmPutImage(disp, win, gc, xim, 0, 0, x, y,
width, height, False);
else
XPutImage(disp, win, gc, xim, 0, 0, x, y, width, height);
destroy_font_raster(rmap);
destroy_font_raster(rtmp);
if (shm)
{
XSync(disp, False);
XShmDetach(disp, &shminfo);
shmdt(shminfo.shmaddr);
shmctl(shminfo.shmid, IPC_RMID, 0);
}
XDestroyImage(xim);
cm = 0;
}
void
Efont_free(Efont * f)
{
int i;
if (!f)
return;
TT_Done_Instance(f->instance);
TT_Close_Face(f->face);
for (i = 0; i < 256; i++)
{
if (f->glyphs_cached[i])
destroy_font_raster(f->glyphs_cached[i]);
if (!TT_VALID(f->glyphs[i]))
TT_Done_Glyph(f->glyphs[i]);
}
free(f->glyphs);
free(f->glyphs_cached);
free(f);
}
Efont *
Efont_load(char *file, int size)
{
TT_Error error;
TT_CharMap char_map;
TT_Glyph_Metrics metrics;
static TT_Engine engine;
static char have_engine = 0;
int dpi = 96;
Efont *f;
unsigned short i, n, code, load_flags;
unsigned short num_glyphs = 0, no_cmap = 0;
unsigned short platform, encoding;
if (!have_engine)
{
error = TT_Init_FreeType(&engine);
if (error)
return NULL;
have_engine = 1;
}
f = malloc(sizeof(Efont));
f->engine = engine;
error = TT_Open_Face(f->engine, file, &f->face);
if (error)
{
free(f);
/* fprintf(stderr, "Unable to open font\n"); */
return NULL;
}
error = TT_Get_Face_Properties(f->face, &f->properties);
if (error)
{
TT_Close_Face(f->face);
free(f);
/* fprintf(stderr, "Unable to get face properties\n"); */
return NULL;
}
error = TT_New_Instance(f->face, &f->instance);
if (error)
{
TT_Close_Face(f->face);
free(f);
/* fprintf(stderr, "Unable to create instance\n"); */
return NULL;
}
TT_Set_Instance_Resolutions(f->instance, dpi, dpi);
TT_Set_Instance_CharSize(f->instance, size * 64);
n = f->properties.num_CharMaps;
for (i = 0; i < n; i++)
{
TT_Get_CharMap_ID(f->face, i, &platform, &encoding);
if ((platform == 3 && encoding == 1) ||
(platform == 0 && encoding == 0))
{
TT_Get_CharMap(f->face, i, &char_map);
break;
}
}
if (i == n)
{
no_cmap = 1;
num_glyphs = f->properties.num_Glyphs;
TT_Done_Instance(f->instance);
TT_Close_Face(f->face);
free(f);
/* fprintf(stderr, "Sorry, but this font doesn't contain any Unicode mapping table\n"); */
return NULL;
}
f->num_glyph = 256;
f->glyphs = (TT_Glyph *) malloc(256 * sizeof(TT_Glyph));
memset(f->glyphs, 0, 256 * sizeof(TT_Glyph));
f->glyphs_cached = (TT_Raster_Map **) malloc(256 * sizeof(TT_Raster_Map *));
memset(f->glyphs_cached, 0, 256 * sizeof(TT_Raster_Map *));
load_flags = TTLOAD_SCALE_GLYPH | TTLOAD_HINT_GLYPH;
f->max_descent = 0;
f->max_ascent = 0;
for (i = 0; i < 256; ++i)
{
if (TT_VALID(f->glyphs[i]))
continue;
if (no_cmap)
{
code = (i - ' ' + 1) < 0 ? 0 : (i - ' ' + 1);
if (code >= num_glyphs)
code = 0;
}
else
code = TT_Char_Index(char_map, i);
TT_New_Glyph(f->face, &f->glyphs[i]);
TT_Load_Glyph(f->instance, f->glyphs[i], code, load_flags);
TT_Get_Glyph_Metrics(f->glyphs[i], &metrics);
if ((metrics.bbox.yMin & -64) < f->max_descent)
f->max_descent = (metrics.bbox.yMin & -64);
if (((metrics.bbox.yMax + 63) & -64) > f->max_ascent)
f->max_ascent = ((metrics.bbox.yMax + 63) & -64);
}
return f;
}
void
Efont_extents(Efont * f, char *text, int *font_ascent_return,
int *font_descent_return, int *width_return,
int *max_ascent_return, int *max_descent_return,
int *lbearing_return, int *rbearing_return)
{
int i, upm, ascent, descent, pw;
TT_Instance_Metrics imetrics;
TT_Glyph_Metrics gmetrics;
if (!f)
return;
TT_Get_Instance_Metrics(f->instance, &imetrics);
upm = f->properties.header->Units_Per_EM;
ascent = (f->properties.horizontal->Ascender * imetrics.y_ppem) / upm;
descent = (f->properties.horizontal->Descender * imetrics.y_ppem) / upm;
if (ascent < 0)
ascent = -ascent;
if (descent < 0)
descent = -descent;
pw = 0;
for (i = 0; text[i]; i++)
{
unsigned char j = text[i];
if (!TT_VALID(f->glyphs[j]))
continue;
TT_Get_Glyph_Metrics(f->glyphs[j], &gmetrics);
if (i == 0)
{
if (lbearing_return)
*lbearing_return = ((-gmetrics.bearingX) / 64);
}
if (text[i + 1] == 0)
{
if (rbearing_return)
*rbearing_return = ((gmetrics.bbox.xMax - gmetrics.advance) / 64);
}
pw += gmetrics.advance / 64;
}
if (font_ascent_return)
*font_ascent_return = ascent;
if (font_descent_return)
*font_descent_return = descent;
if (width_return)
*width_return = pw;
if (max_ascent_return)
*max_ascent_return = f->max_ascent;
if (max_descent_return)
*max_descent_return = f->max_descent;
}
/*
* int
* main( int argc, char **argv)
* {
* Display *disp;
* Efont *f;
* GC gc;
* XGCValues gcv;
* Window win;
* int i;
*
* disp=XOpenDisplay(NULL);
* XSync(disp, False);
* srand(time(NULL));
* win = XCreateSimpleWindow(disp, DefaultRootWindow(disp), 0, 0, 640, 480, 0,
* 0, 0);
* XMapWindow(disp, win);
* XSync(disp, False);
*
* gcv.subwindow_mode = IncludeInferiors;
* gc = XCreateGC(disp, win, GCSubwindowMode, &gcv);
* for (;;)
* {
* for (i = 3; i < argc; i++)
* {
* XSetForeground(disp, gc, rand()<<16 | rand());
* f = Efont_load(argv[i], atoi(argv[1]));
* if (f)
* EFont_draw_string(disp, win, gc, 20, (atoi(argv[1])/10) * (i-2), argv[2],
* f,
* DefaultVisual(disp, DefaultScreen(disp)),
* DefaultColormap(disp, DefaultScreen(disp)));
* Efont_free(f);
* f = NULL;
* }
* }
* return 0;
* }
*/

88
e.spec Normal file
View File

@ -0,0 +1,88 @@
# Note that this is NOT a relocatable package
%define ver 0.16.devel.3
%define rel 1
%define prefix /usr
Summary: The Enlightenment window manager.
Name: enlightenment
Version: %ver
Release: %rel
Copyright: GPL
Group: User Interface/Desktops
Source: ftp://www.rasterman.com/pub/enlightenment/enlightenment-%{ver}.tar.gz
BuildRoot: /tmp/e-%{ver}-root
Packager: The Rasterman <raster@redhat.com>
URL: http://www.rasterman.com/
Requires: imlib >= 1.9
Requires: fnlib >= 0.4
Requires: freetype >= 1.1
Requires: esound >= 0.2.7
Docdir: %{prefix}/doc
%description
Enlightenment is a window manager for the X Window System that
is designed to be powerful, extensible, configurable and
pretty darned good looking! It is one of the more graphically
intense window managers.
Enlightenment goes beyond managing windows by providing a useful
and appealing graphical shell from which to work. It is open
in design and instead of dictating a policy, allows the user to
define their own policy, down to every last detail.
This package will install the Enlightenment window manager.
%changelog
%prep
%setup
%build
# Optimize that damned code all the way
if [ ! -z "`echo -n ${RPM_OPT_FLAGS} | grep pentium`" ]; then
if [ ! -z "`which egcs`" ]; then
CC="egcs"
else
if [ ! -z "`which pgcc`" ]; then
CC="pgcc"
fi
fi
CFLAGS="${RPM_OPT_FLAGS}"
else
CFLAGS="${RPM_OPT_FLAGS}"
fi
if [ ! -f configure ]; then
CFLAGS="$RPM_OPT_FLAGS" ./autogen.sh --prefix=%prefix --enable-fsstd
else
CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%prefix --enable-fsstd
fi
make
%install
rm -rf $RPM_BUILD_ROOT
make prefix=$RPM_BUILD_ROOT%{prefix} install
cd $RPM_BUILD_ROOT%{prefix}/
chown -R 0.0 *
%clean
rm -rf $RPM_BUILD_ROOT
%post
%postun
%files
%defattr(-, root, root)
%{prefix}/share/enlightenment/*
%{prefix}/bin/*
%doc AUTHORS
%doc COPYING
%doc INSTALL
%doc README
%doc FAQ
%doc TODO

5
eesh/.cvsignore Normal file
View File

@ -0,0 +1,5 @@
Makefile
Makefile.in
eesh
.deps
*.da

256
eesh/E.h Normal file
View File

@ -0,0 +1,256 @@
/*****************************************************************************/
/* Enlightenment - The Window Manager that dares to do what others don't */
/*****************************************************************************/
/* Copyright (C) 1997 - 1999 Carsten Haitzler (The Rasterman) */
/* */
/* This program and utilites is free software; you can redistribute it */
/* and/or modify it under the terms of the License shown in COPYING */
/* */
/* This software 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. */
/*****************************************************************************/
#include "econfig.h"
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xproto.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <stdarg.h>
#include <string.h>
#include <fcntl.h>
#include <dirent.h>
#include <signal.h>
#include <time.h>
#include <math.h>
#include <pwd.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <sys/stat.h>
#include <sys/resource.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include "econfig.h"
#ifndef ENLIGHTENMENT_ROOT
#define ENLIGHTENMENT_ROOT "/usr/local/enlightenment"
#endif
#define ENLIGHTENMENT_SYSTEM_CONFIG ENLIGHTENMENT_ROOT"/system_config"
#define ENLIGHTENMENT_SYSTEM_THEMES ENLIGHTENMENT_ROOT"/themes"
#define ENLIGHTENMENT_SYSTEM_BGS ENLIGHTENMENT_ROOT"/backgrounds"
#define LIST_FINDBY_NAME 0
#define LIST_FINDBY_ID 1
#define LIST_FINDBY_BOTH 2
#define LIST_FINDBY_NONE 3
#define LIST_TYPE_COUNT 18
#define LIST_TYPE_ANY 0
#define LIST_TYPE_CLIENT 1
typedef struct _list
{
int type;
char *name;
int id;
void *item;
struct _list *next;
}
List;
typedef struct _client
{
char *name;
Window win;
char *msg;
char *clientname;
char *version;
char *author;
char *email;
char *web;
char *address;
char *info;
Pixmap pmap;
}
Client;
typedef struct _root
{
Window win;
Visual *vis;
int depth;
Colormap cmap;
int scr;
int w, h;
Window focuswin;
}
Root;
int EExit(void *code);
void *Emalloc(int size);
void *Erealloc(void *ptr, int size);
void Efree(void *ptr);
void *FindItem(char *name, int id, int find_by, int type);
void AddItem(void *item, char *name, int id, int type);
void *RemoveItem(char *name, int id, int find_by, int type);
void **ListItemType(int *num, int type);
char **ListItems(int *num, int type);
void **ListItemTypeID(int *num, int type, int id);
void SetupX(void);
void CommsSetup(void);
void CommsFindCommsWindow(void);
void CommsSend(Client * c, char *s);
char *CommsGet(Client ** c, XEvent * ev);
Client *MakeClient(Window win);
void ListFreeClient(void *ptr);
void DeleteClient(Client * c);
void HandleComms(XEvent * ev);
#if defined(__FILE__) && defined(__LINE__)
#define Efree(x) \
{ \
if (x) \
__Efree(x); \
else \
Alert("%s:%d: Attempt to free a NULL pointer\n", __FILE__, __LINE__); \
}
#define Emalloc(x) \
__Emalloc(x)
#define Erealloc(x, y) \
__Erealloc(x, y)
#else
#define Efree(x) \
{ \
if (x) \
__Efree(x); \
else \
Alert("??:??: Attempt to free a NULL pointer\n"); \
}
#define Emalloc(x) \
__Emalloc(x)
#define Erealloc(x, y) \
__Erealloc(x, y)
#endif
void *__Emalloc(int size);
void *__Erealloc(void *ptr, int size);
void __Efree(void *ptr);
char *duplicate(char *s);
#define FILEPATH_LEN_MAX 4096
/* This turns on E's internal stack tracking system for coarse debugging */
/* and being able to trace E for profiling/optimisation purposes (which */
/* believe it or not I'm actually doing) */
/* #define DEBUG 1 */
#ifdef DEBUG
extern int call_level;
extern int debug_level;
#endif
#ifdef DEBUG
#define EDBUG(l,x) \
{ \
int i_call_level; \
if (l<debug_level) \
{ \
for(i_call_level=0;i_call_level<call_level;i_call_level++) \
putchar('-'); \
printf(" %8x %s\n",(unsigned int)time(NULL),x); \
fflush(stdout); \
} \
call_level++; \
}
#else
#define EDBUG(l,x) \
;
#endif
#ifdef DEBUG
#define EDBUG_RETURN(x) \
{ \
/* int i_call_level; */\
call_level--; \
/* for(i_call_level=0;i_call_level<call_level;i_call_level++) */\
/* putchar('-'); */\
/* putchar('\n'); */\
return (x); \
}
#define EDBUG_RETURN_ \
{ \
/* int i_call_level; */\
call_level--; \
/* for(i_call_level=0;i_call_level<call_level;i_call_level++) */\
/* putchar('-'); */\
/* putchar('\n'); */\
return; \
}
#else
#define EDBUG_RETURN(x) \
{ \
return (x); \
}
#define EDBUG_RETURN_ \
{ \
return; \
}
#endif
void Alert(char *fmt,...);
void InitStringList(void);
void AssignIgnoreFunction(int (*FunctionToAssign) (void *), void *params);
void AssignRestartFunction(int (*FunctionToAssign) (void *), void *params);
void AssignExitFunction(int (*FunctionToAssign) (void *), void *params);
void AssignTitleText(char *text);
void AssignIgnoreText(char *text);
void AssignRestartText(char *text);
void AssignExitText(char *text);
void md(char *s);
int exists(char *s);
void mkdirs(char *s);
int isfile(char *s);
int isdir(char *s);
char **ls(char *dir, int *num);
void freestrlist(char **l, int num);
void rm(char *s);
void mv(char *s, char *ss);
void cp(char *s, char *ss);
time_t moddate(char *s);
int filesize(char *s);
void cd(char *s);
char *cwd(void);
int permissions(char *s);
int owner(char *s);
int group(char *s);
char *username(int uid);
char *homedir(int uid);
char *usershell(int uid);
char *atword(char *s, int num);
char *atchar(char *s, char c);
void word(char *s, int num, char *wd);
int canread(char *s);
int canwrite(char *s);
int canexec(char *s);
char *fileof(char *s);
char *fullfileof(char *s);
char *pathtoexec(char *file);
char *pathtofile(char *file);
void EDisplayMemUse(void);
extern Display *disp;
extern List lists;
extern Window comms_win;
extern Window my_win;
extern Root root;

40
eesh/Makefile.am Normal file
View File

@ -0,0 +1,40 @@
if FSSTD
bindir = @bindir@
ENLIGHTENMENT_ROOT=$(pkglibdir)
else
bindir=$(prefix)/enlightenment/bin
ENLIGHTENMENT_ROOT=$(prefix)/enlightenment
endif
bin_PROGRAMS = eesh
eesh_SOURCES = \
E.h \
comms.c \
globals.c \
lists.c \
main.c \
setup.c \
memory.c \
file.c \
alert.c
LDADD = $(X_PRE_LIBS) $(X_LIBS) -lX11 $(X_EXTRA_LIBS) -lm
INCLUDES=-I$(top_srcdir) $(IMLIB_CFLAGS) -I$(includedir) -I..
DEFS=-DENLIGHTENMENT_ROOT=\"@ENLIGHTENMENT_ROOT@\"
#install-exec-local:
# if [ x@USE_FSSTD@ = "xno" ]; then \
# ../mkinstalldirs $(exec_prefix)/bin; \
# for i in $(bin_PROGRAMS); do \
# rm -f $(exec_prefix)/bin/$$i; \
# $(LN_S) $(bindir)/$$i $(exec_prefix)/bin/$$i; \
# done; \
# fi
uninstall-local:
for i in $(bin_PROGRAMS); do \
rm -f $(exec_prefix)/bin/$$i; \
done

116
eesh/alert.c Normal file
View File

@ -0,0 +1,116 @@
#include "E.h"
static void ShowAlert(char *text);
static int (*IgnoreFunction) (void *) = NULL;
static void *IgnoreParams = NULL;
static char *IgnoreText = NULL;
static int (*RestartFunction) (void *) = NULL;
static void *RestartParams = NULL;
static char *RestartText = NULL;
static int (*ExitFunction) (void *) = NULL;
static void *ExitParams = NULL;
static char *ExitText = NULL;
static char *TitleText = NULL;
int call_level;
int debug_level;
void
Alert(char *fmt,...)
{
char text[10240];
va_list ap;
EDBUG(7, "Alert");
va_start(ap, fmt);
#ifdef __USE_GNU
vsnprintf(text, 10240, fmt, ap);
#else
vsprintf(text, fmt, ap);
#endif
va_end(ap);
ShowAlert(text);
EDBUG_RETURN_;
}
void
InitStringList(void)
{
char *debug_str;
call_level = 0;
debug_level = 0;
debug_str = getenv("EDBUG");
if (debug_str)
debug_level = atoi(debug_str);
}
void
AssignTitleText(char *text)
{
if (TitleText)
Efree(TitleText);
TitleText = NULL;
TitleText = duplicate(text);
}
void
AssignIgnoreText(char *text)
{
if (IgnoreText)
Efree(IgnoreText);
IgnoreText = NULL;
IgnoreText = duplicate(text);
}
void
AssignRestartText(char *text)
{
if (RestartText)
Efree(RestartText);
RestartText = NULL;
RestartText = duplicate(text);
}
void
AssignExitText(char *text)
{
if (ExitText)
Efree(ExitText);
ExitText = NULL;
ExitText = duplicate(text);
}
void
AssignIgnoreFunction(int (*FunctionToAssign) (void *), void *params)
{
IgnoreFunction = FunctionToAssign;
IgnoreParams = params;
}
void
AssignRestartFunction(int (*FunctionToAssign) (void *), void *params)
{
RestartFunction = FunctionToAssign;
RestartParams = params;
}
void
AssignExitFunction(int (*FunctionToAssign) (void *), void *params)
{
ExitFunction = FunctionToAssign;
ExitParams = params;
}
static void
ShowAlert(char *text)
{
EDBUG(8, "ShowAlert");
if (!text)
EDBUG_RETURN_;
fprintf(stderr, text);
fflush(stderr);
EDBUG_RETURN_;
}

237
eesh/comms.c Normal file
View File

@ -0,0 +1,237 @@
#include "E.h"
char waitonly;
void
CommsSetup()
{
EDBUG(5, "CommsSetup");
my_win = XCreateSimpleWindow(disp, root.win, -100, -100, 5, 5, 0, 0, 0);
EDBUG_RETURN_;
}
void
CommsFindCommsWindow()
{
unsigned char *s;
Atom a, ar;
unsigned long num, after;
int format;
Window rt;
int dint;
unsigned int duint;
EDBUG(6, "CommsFindCommsWindow");
a = XInternAtom(disp, "ENLIGHTENMENT_COMMS", True);
if (a != None)
{
s = NULL;
XGetWindowProperty(disp, root.win, a, 0, 14, False, AnyPropertyType, &ar,
&format, &num, &after, &s);
if (s)
{
sscanf((char *)s, "%*s %x", (unsigned int *)&comms_win);
XFree(s);
}
else
(comms_win = 0);
if (comms_win)
{
if (!XGetGeometry(disp, comms_win, &rt, &dint, &dint,
&duint, &duint, &duint, &duint))
comms_win = 0;
s = NULL;
if (comms_win)
{
XGetWindowProperty(disp, comms_win, a, 0, 14, False,
AnyPropertyType, &ar, &format, &num, &after,
&s);
if (s)
XFree(s);
else
comms_win = 0;
}
}
}
if (comms_win)
XSelectInput(disp, comms_win,
StructureNotifyMask | SubstructureNotifyMask);
EDBUG_RETURN_;
}
void
CommsSend(Client * c, char *s)
{
char ss[21];
int i, j, k, len;
XEvent ev;
Atom a;
EDBUG(5, "CommsSend");
if ((!s) || (!c))
EDBUG_RETURN_;
len = strlen(s);
a = XInternAtom(disp, "ENL_MSG", True);
ev.xclient.type = ClientMessage;
ev.xclient.serial = 0;
ev.xclient.send_event = True;
ev.xclient.window = c->win;
ev.xclient.message_type = a;
ev.xclient.format = 8;
for (i = 0; i < len + 1; i += 12)
{
sprintf(ss, "%8x", (int)my_win);
for (j = 0; j < 12; j++)
{
ss[8 + j] = s[i + j];
if (!s[i + j])
j = 12;
}
ss[20] = 0;
for (k = 0; k < 20; k++)
ev.xclient.data.b[k] = ss[k];
XSendEvent(disp, c->win, False, 0, (XEvent *) & ev);
}
EDBUG_RETURN_;
}
char *
CommsGet(Client ** c, XEvent * ev)
{
char s[13], s2[9], *msg, st[32];
int i;
Window win;
Client *cl;
EDBUG(5, "CommsGet");
if ((!ev) || (!c))
EDBUG_RETURN(NULL);
if (ev->type != ClientMessage)
EDBUG_RETURN(NULL);
s[12] = 0;
s2[8] = 0;
msg = NULL;
for (i = 0; i < 8; i++)
s2[i] = ev->xclient.data.b[i];
for (i = 0; i < 12; i++)
s[i] = ev->xclient.data.b[i + 8];
sscanf(s2, "%x", (int *)&win);
cl = (Client *) FindItem(NULL, win, LIST_FINDBY_ID, LIST_TYPE_CLIENT);
if (!cl)
{
cl = MakeClient(win);
if (!cl)
EDBUG_RETURN(NULL);
sprintf(st, "%8x", (int)win);
cl->name = duplicate(st);
AddItem((void *)cl, st, cl->win, LIST_TYPE_CLIENT);
XSelectInput(disp, win, StructureNotifyMask | SubstructureNotifyMask);
}
if (cl->msg)
{
/* append text to end of msg */
cl->msg = Erealloc(cl->msg, strlen(cl->msg) + strlen(s) + 1);
if (!cl->msg)
EDBUG_RETURN(NULL);
strcat(cl->msg, s);
}
else
{
/* new msg */
cl->msg = Emalloc(strlen(s) + 1);
if (!cl->msg)
EDBUG_RETURN(NULL);
strcpy(cl->msg, s);
}
if (strlen(s) < 12)
{
msg = cl->msg;
cl->msg = NULL;
*c = cl;
}
EDBUG_RETURN(msg);
}
Client *
MakeClient(Window win)
{
Client *c;
EDBUG(6, "MakeClient");
c = Emalloc(sizeof(Client));
if (!c)
EDBUG_RETURN(NULL);
c->name = NULL;
c->win = win;
c->msg = NULL;
c->clientname = NULL;
c->version = NULL;
c->author = NULL;
c->email = NULL;
c->web = NULL;
c->address = NULL;
c->info = NULL;
c->pmap = 0;
EDBUG_RETURN(c);
}
void
ListFreeClient(void *ptr)
{
Client *c;
EDBUG(6, "ListFreeClient");
c = (Client *) ptr;
if (!c)
EDBUG_RETURN_;
if (c->name)
Efree(c->name);
if (c->msg)
Efree(c->msg);
if (c->clientname)
Efree(c->clientname);
if (c->version)
Efree(c->version);
if (c->author)
Efree(c->author);
if (c->email)
Efree(c->email);
if (c->web)
Efree(c->web);
if (c->address)
Efree(c->address);
if (c->info)
Efree(c->info);
Efree(c);
EDBUG_RETURN_;
}
void
DeleteClient(Client * c)
{
Client *cc;
EDBUG(6, "DeleteClient");
cc = RemoveItem(NULL, c->win, LIST_FINDBY_ID, LIST_TYPE_CLIENT);
ListFreeClient(cc);
EDBUG_RETURN_;
}
void
HandleComms(XEvent * ev)
{
Client *c;
char *s;
EDBUG(4, "HandleComms");
s = CommsGet(&c, ev);
if (!s)
EDBUG_RETURN_;
printf("%s\n", s);
fflush(stdout);
if (waitonly)
exit(0);
Efree(s);
EDBUG_RETURN_;
}

642
eesh/file.c Normal file
View File

@ -0,0 +1,642 @@
#include "E.h"
void
md(char *s)
{
EDBUG(9, "md");
if ((!s) || (!*s))
EDBUG_RETURN_;
mkdir(s, S_IRWXU);
EDBUG_RETURN_;
}
int
exists(char *s)
{
struct stat st;
EDBUG(9, "exists");
if ((!s) || (!*s))
EDBUG_RETURN(0);
if (stat(s, &st) < 0)
EDBUG_RETURN(0);
EDBUG_RETURN(1);
}
void
mkdirs(char *s)
{
char ss[FILEPATH_LEN_MAX];
int i, ii;
i = 0;
ii = 0;
while (s[i])
{
ss[ii++] = s[i];
ss[ii] = 0;
if (s[i] == '/')
{
if (!exists(ss))
md(ss);
else if (!isdir(ss))
return;
}
i++;
}
}
int
isfile(char *s)
{
struct stat st;
EDBUG(9, "isfile");
if ((!s) || (!*s))
EDBUG_RETURN(0);
if (stat(s, &st) < 0)
EDBUG_RETURN(0);
if (S_ISREG(st.st_mode))
EDBUG_RETURN(1);
EDBUG_RETURN(0);
}
int
isdir(char *s)
{
struct stat st;
EDBUG(9, "isdir");
if ((!s) || (!*s))
EDBUG_RETURN(0);
if (stat(s, &st) < 0)
EDBUG_RETURN(0);
if (S_ISDIR(st.st_mode))
EDBUG_RETURN(1);
EDBUG_RETURN(0);
}
char **
ls(char *dir, int *num)
{
int i, dirlen;
int done = 0;
DIR *dirp;
char **names;
struct dirent *dp;
EDBUG(9, "ls");
if ((!dir) || (!*dir))
EDBUG_RETURN(0);
dirp = opendir(dir);
if (!dirp)
{
*num = 0;
EDBUG_RETURN(NULL);
}
/* count # of entries in dir (worst case) */
for (dirlen = 0; (dp = readdir(dirp)) != NULL; dirlen++);
if (!dirlen)
{
closedir(dirp);
*num = dirlen;
EDBUG_RETURN(NULL);
}
/* load up the entries, now that we know how many to make */
names = (char **)Emalloc(dirlen * sizeof(char *));
if (!names)
EDBUG_RETURN(NULL);
rewinddir(dirp);
for (i = 0; i < dirlen;)
{
dp = readdir(dirp);
if (!dp)
break;
names[i] = (char *)Emalloc(strlen(dp->d_name) + 1);
if (!names)
EDBUG_RETURN(NULL);
strcpy(names[i], dp->d_name);
i++;
}
if (i < dirlen)
dirlen = i; /* dir got shorter... */
closedir(dirp);
*num = dirlen;
/* do a simple bubble sort here to alphanumberic it */
while (!done)
{
done = 1;
for (i = 0; i < dirlen - 2; i++)
{
if (strcmp(names[i], names[i + 1]) < 0)
{
char *temp;
temp = names[i];
names[i] = names[i + 1];
names[i + 1] = temp;
done = 0;
}
}
}
EDBUG_RETURN(names);
}
void
freestrlist(char **l, int num)
{
EDBUG(9, "freestrlist");
if (!l)
EDBUG_RETURN_;
while (num--)
if (l[num])
Efree(l[num]);
Efree(l);
EDBUG_RETURN_;
}
void
rm(char *s)
{
EDBUG(9, "rm");
if ((!s) || (!*s))
EDBUG_RETURN_;
unlink(s);
EDBUG_RETURN_;
}
void
mv(char *s, char *ss)
{
EDBUG(9, "mv");
if ((!s) || (!ss) || (!*s) || (!*ss))
EDBUG_RETURN_;
rename(s, ss);
EDBUG_RETURN_;
}
void
cp(char *s, char *ss)
{
int i;
FILE *f, *ff;
unsigned char buf[1];
EDBUG(9, "cp");
if ((!s) || (!ss) || (!*s) || (!*ss))
EDBUG_RETURN_;
if (!exists(s))
EDBUG_RETURN_;
i = filesize(s);
f = fopen(s, "r");
if (!f)
EDBUG_RETURN_;
ff = fopen(ss, "w");
if (!ff)
{
fclose(f);
EDBUG_RETURN_;
}
while (fread(buf, 1, 1, f))
fwrite(buf, 1, 1, ff);
fclose(f);
fclose(ff);
EDBUG_RETURN_;
}
time_t
moddate(char *s)
{
struct stat st;
EDBUG(9, "moddate");
if ((!s) || (!*s))
EDBUG_RETURN(0);
if (!stat(s, &st) < 0)
EDBUG_RETURN(0);
if (st.st_mtime > st.st_ctime)
{
EDBUG_RETURN(st.st_mtime);
}
else
EDBUG_RETURN(st.st_ctime);
EDBUG_RETURN(0);
}
int
filesize(char *s)
{
struct stat st;
EDBUG(9, "filesize");
if ((!s) || (!*s))
EDBUG_RETURN(0);
if (stat(s, &st) < 0)
EDBUG_RETURN(0);
EDBUG_RETURN((int)st.st_size);
}
void
cd(char *s)
{
EDBUG(9, "cd");
if ((!s) || (!*s))
EDBUG_RETURN_;
chdir(s);
EDBUG_RETURN_;
}
char *
cwd(void)
{
char *s;
char ss[FILEPATH_LEN_MAX];
EDBUG(9, "cwd");
getcwd(ss, FILEPATH_LEN_MAX);
s = duplicate(ss);
EDBUG_RETURN(s);
}
int
permissions(char *s)
{
struct stat st;
EDBUG(9, "permissions");
if ((!s) || (!*s))
EDBUG_RETURN(0);
if (!stat(s, &st) < 0)
EDBUG_RETURN(0);
EDBUG_RETURN(st.st_mode);
}
int
owner(char *s)
{
struct stat st;
EDBUG(9, "owner");
if ((!s) || (!*s))
EDBUG_RETURN(0);
if (!stat(s, &st) < 0)
EDBUG_RETURN(0);
EDBUG_RETURN(st.st_uid);
}
int
group(char *s)
{
struct stat st;
EDBUG(9, "group");
if ((!s) || (!*s))
EDBUG_RETURN(0);
if (!stat(s, &st) < 0)
EDBUG_RETURN(0);
EDBUG_RETURN(st.st_gid);
}
char *
username(int uid)
{
char *s;
struct passwd *pwd;
EDBUG(9, "username");
pwd = getpwuid(uid);
if (pwd)
{
s = duplicate(pwd->pw_name);
/* Efree(pwd); */
EDBUG_RETURN(s);
}
EDBUG_RETURN(duplicate("unknown"));
}
char *
homedir(int uid)
{
char *s;
struct passwd *pwd;
EDBUG(9, "homedir");
pwd = getpwuid(uid);
if (pwd)
{
s = duplicate(pwd->pw_dir);
/* Efree(pwd); */
EDBUG_RETURN(s);
}
EDBUG_RETURN(duplicate("/tmp"));
}
char *
usershell(int uid)
{
char *s;
struct passwd *pwd;
EDBUG(9, "usershell");
pwd = getpwuid(uid);
if (pwd)
{
s = duplicate(pwd->pw_shell);
/* Efree(pwd); */
EDBUG_RETURN(s);
}
EDBUG_RETURN(duplicate("/bin/sh"));
}
char *
atword(char *s, int num)
{
int cnt, i;
EDBUG(9, "atword");
if (!s)
EDBUG_RETURN(NULL);
cnt = 0;
i = 0;
while (s[i])
{
if ((s[i] != ' ') && (s[i] != '\t'))
{
if (i == 0)
cnt++;
else if ((s[i - 1] == ' ') || (s[i - 1] == '\t'))
cnt++;
if (cnt == num)
EDBUG_RETURN(&s[i]);
}
i++;
}
EDBUG_RETURN(NULL);
}
char *
atchar(char *s, char c)
{
int i;
EDBUG(9, "atchar");
if (!s)
EDBUG_RETURN(NULL);
i = 0;
while (s[i] != 0)
{
if (s[i] == c)
EDBUG_RETURN(&s[i]);
i++;
}
EDBUG_RETURN(NULL);
}
void
word(char *s, int num, char *wd)
{
int cnt, i;
char *start, *finish, *ss, *w;
EDBUG(9, "word");
if (!s)
EDBUG_RETURN_;
if (!wd)
EDBUG_RETURN_;
if (num <= 0)
{
*wd = 0;
EDBUG_RETURN_;
}
cnt = 0;
i = 0;
start = NULL;
finish = NULL;
ss = NULL;
w = wd;
while (s[i])
{
if ((cnt == num) && ((s[i] == ' ') || (s[i] == '\t')))
{
finish = &s[i];
break;
}
if ((s[i] != ' ') && (s[i] != '\t'))
{
if (i == 0)
{
cnt++;
if (cnt == num)
start = &s[i];
}
else if ((s[i - 1] == ' ') || (s[i - 1] == '\t'))
{
cnt++;
if (cnt == num)
start = &s[i];
}
}
i++;
}
if (cnt == num)
{
if ((start) && (finish))
{
for (ss = start; ss < finish; ss++)
*wd++ = *ss;
}
else if (start)
{
for (ss = start; *ss != 0; ss++)
*wd++ = *ss;
}
*wd = 0;
}
EDBUG_RETURN_;
}
int
canread(char *s)
{
EDBUG(9, "canread");
if ((!s) || (!*s))
EDBUG_RETURN(0);
EDBUG_RETURN(1 + access(s, R_OK));
}
int
canwrite(char *s)
{
EDBUG(9, "canwrite");
if ((!s) || (!*s))
EDBUG_RETURN(0);
EDBUG_RETURN(1 + access(s, W_OK));
}
int
canexec(char *s)
{
EDBUG(9, "canexec");
if ((!s) || (!*s))
EDBUG_RETURN(0);
EDBUG_RETURN(1 + access(s, X_OK));
}
char *
fileof(char *s)
{
char ss[1024];
int i, p1, p2;
EDBUG(9, "fileof");
i = 0;
p1 = -1;
p2 = -1;
for (i = strlen(s) - 1; i >= 0; i--)
{
if ((s[i] == '.') && (p2 < 0) && (p1 < 0))
p2 = i;
if ((s[i] == '/') && (p1 < 0))
p1 = i;
}
if (p2 < 0)
p2 = strlen(s);
if (p1 < 0)
p1 = 0;
for (i = 0; i < (p2 - p1 - 1); i++)
ss[i] = s[p1 + 1 + i];
ss[i] = 0;
EDBUG_RETURN(duplicate(ss));
}
char *
fullfileof(char *s)
{
char ss[1024];
int i, p1, p2;
EDBUG(9, "fullfileof");
i = 0;
p1 = -1;
for (i = strlen(s) - 1; i >= 0; i--)
{
if ((s[i] == '/') && (p1 < 0))
p1 = i;
}
p2 = strlen(s);
for (i = 0; i < (p2 - p1 - 1); i++)
ss[i] = s[p1 + 1 + i];
ss[i] = 0;
EDBUG_RETURN(duplicate(ss));
}
char *
pathtoexec(char *file)
{
char *p, *cp, *ep;
char *s;
int len, exelen;
EDBUG(9, "pathtoexec");
if (file[0] == '/')
{
if (canexec(file))
EDBUG_RETURN(duplicate(file));
}
p = getenv("PATH");
if (!p)
EDBUG_RETURN(duplicate(file));
if (!file)
EDBUG_RETURN(NULL);
cp = p;
exelen = strlen(file);
while ((ep = strchr(cp, ':')))
{
len = ep - cp;
s = Emalloc(len + 1);
if (s)
{
strncpy(s, cp, len);
s[len] = 0;
s = Erealloc(s, len + 2 + exelen);
strcat(s, "/");
strcat(s, file);
if (canexec(s))
EDBUG_RETURN(s);
Efree(s);
}
cp = ep + 1;
}
len = strlen(cp);
s = Emalloc(len + 1);
if (s)
{
strncpy(s, cp, len);
s[len] = 0;
s = Erealloc(s, len + 2 + exelen);
strcat(s, "/");
strcat(s, file);
if (canexec(s))
EDBUG_RETURN(s);
Efree(s);
}
EDBUG_RETURN(NULL);
}
char *
pathtofile(char *file)
{
char *p, *cp, *ep;
char *s;
int len, exelen;
EDBUG(9, "pathtofile");
if (file[0] == '/')
{
if (exists(file))
EDBUG_RETURN(duplicate(file));
}
p = getenv("PATH");
if (!p)
EDBUG_RETURN(duplicate(file));
if (!file)
EDBUG_RETURN(NULL);
cp = p;
exelen = strlen(file);
while ((ep = strchr(cp, ':')))
{
len = ep - cp;
s = Emalloc(len + 1);
if (s)
{
strncpy(s, cp, len);
s[len] = 0;
s = Erealloc(s, len + 2 + exelen);
strcat(s, "/");
strcat(s, file);
if (exists(s))
EDBUG_RETURN(s);
Efree(s);
}
cp = ep + 1;
}
len = strlen(cp);
s = Emalloc(len + 1);
if (s)
{
strncpy(s, cp, len);
s[len] = 0;
s = Erealloc(s, len + 2 + exelen);
strcat(s, "/");
strcat(s, file);
if (exists(s))
EDBUG_RETURN(s);
Efree(s);
}
EDBUG_RETURN(NULL);
}

7
eesh/globals.c Normal file
View File

@ -0,0 +1,7 @@
#include "E.h"
Display *disp;
List lists;
Window comms_win;
Window my_win;
Root root;

290
eesh/lists.c Normal file
View File

@ -0,0 +1,290 @@
#include "E.h"
void *
FindItem(char *name, int id, int find_by, int type)
{
List *ptr;
EDBUG(6, "FindItem");
ptr = lists.next;
if (find_by == LIST_FINDBY_NAME)
{
while (ptr)
{
if ((ptr->type == type) && (!strcmp(name, ptr->name)))
EDBUG_RETURN(ptr->item);
ptr = ptr->next;
}
}
else if (find_by == LIST_FINDBY_ID)
{
while (ptr)
{
if ((ptr->type == type) && (ptr->id == id))
EDBUG_RETURN(ptr->item);
ptr = ptr->next;
}
}
else if (find_by == LIST_FINDBY_BOTH)
{
while (ptr)
{
if ((ptr->type == type) && (!strcmp(name, ptr->name)) && (ptr->id == id))
EDBUG_RETURN(ptr->item);
ptr = ptr->next;
}
}
else if (find_by == LIST_FINDBY_NONE)
{
while (ptr)
{
if ((ptr->type == type))
EDBUG_RETURN(ptr->item);
ptr = ptr->next;
}
}
EDBUG_RETURN(NULL);
}
void
AddItem(void *item, char *name, int id, int type)
{
List *ptr;
EDBUG(6, "AddItem");
ptr = Emalloc(sizeof(List));
if (!ptr)
EDBUG_RETURN_;
ptr->item = item;
ptr->name = duplicate(name);
ptr->id = id;
ptr->type = type;
ptr->next = lists.next;
lists.next = ptr;
EDBUG_RETURN_;
}
void *
RemoveItem(char *name, int id, int find_by, int type)
{
List *ptr, *pptr;
void *p;
EDBUG(6, "RemoveItem");
pptr = NULL;
ptr = lists.next;
if (find_by == LIST_FINDBY_NAME)
{
while (ptr)
{
if ((ptr->type == type) && (!strcmp(name, ptr->name)))
{
if (pptr)
pptr->next = ptr->next;
else
lists.next = ptr->next;
p = ptr->item;
if (ptr->name)
Efree(ptr->name);
Efree(ptr);
EDBUG_RETURN(p);
}
pptr = ptr;
ptr = ptr->next;
}
}
else if (find_by == LIST_FINDBY_ID)
{
while (ptr)
{
if ((ptr->type == type) && (ptr->id == id))
{
if (pptr)
pptr->next = ptr->next;
else
lists.next = ptr->next;
p = ptr->item;
if (ptr->name)
Efree(ptr->name);
Efree(ptr);
EDBUG_RETURN(p);
}
pptr = ptr;
ptr = ptr->next;
}
}
else if (find_by == LIST_FINDBY_BOTH)
{
while (ptr)
{
if ((ptr->type == type) && (!strcmp(name, ptr->name)) && (ptr->id == id))
{
if (pptr)
pptr->next = ptr->next;
else
lists.next = ptr->next;
p = ptr->item;
if (ptr->name)
Efree(ptr->name);
Efree(ptr);
EDBUG_RETURN(p);
}
pptr = ptr;
ptr = ptr->next;
}
}
else if (find_by == LIST_FINDBY_NONE)
{
while (ptr)
{
if ((ptr->type == type))
{
if (pptr)
pptr->next = ptr->next;
else
lists.next = ptr->next;
p = ptr->item;
if (ptr->name)
Efree(ptr->name);
Efree(ptr);
EDBUG_RETURN(p);
}
pptr = ptr;
ptr = ptr->next;
}
}
EDBUG_RETURN(NULL);
}
void **
ListItemType(int *num, int type)
{
List *ptr;
int i, len;
void **lst;
EDBUG(6, "ListItemType");
*num = 0;
len = 0;
if (type == LIST_TYPE_ANY)
EDBUG_RETURN(NULL);
ptr = lists.next;
while (ptr)
{
if (ptr->type == type)
len++;
ptr = ptr->next;
}
if (!len)
EDBUG_RETURN(NULL);
lst = Emalloc(len * sizeof(void *));
i = 0;
ptr = lists.next;
while (ptr)
{
if (ptr->type == type)
lst[i++] = ptr->item;
ptr = ptr->next;
}
*num = i;
EDBUG_RETURN(lst);
}
char **
ListItems(int *num, int type)
{
List *ptr;
int i, len;
char **list;
EDBUG(7, "ListItems");
i = 0;
len = 0;
list = NULL;
ptr = lists.next;
if (type != LIST_TYPE_ANY)
{
while (ptr)
{
if (ptr->type == type)
len++;
ptr = ptr->next;
}
}
else
{
while (ptr)
{
len++;
ptr = ptr->next;
}
}
list = Emalloc(len * sizeof(char *));
if (!list)
{
*num = 0;
EDBUG_RETURN(NULL);
}
ptr = lists.next;
if (type != LIST_TYPE_ANY)
{
while (ptr)
{
if (ptr->type == type)
{
list[i] = duplicate(ptr->name);
i++;
}
ptr = ptr->next;
}
}
else
{
while (ptr)
{
list[i] = duplicate(ptr->name);
i++;
ptr = ptr->next;
}
}
*num = len;
EDBUG_RETURN(list);
}
void **
ListItemTypeID(int *num, int type, int id)
{
List *ptr;
int i, len;
void **lst;
EDBUG(6, "ListItemType");
*num = 0;
len = 0;
if (type == LIST_TYPE_ANY)
EDBUG_RETURN(NULL);
ptr = lists.next;
while (ptr)
{
if ((ptr->type == type) && (ptr->id == id))
len++;
ptr = ptr->next;
}
if (!len)
EDBUG_RETURN(NULL);
lst = Emalloc(len * sizeof(void *));
i = 0;
ptr = lists.next;
while (ptr)
{
if ((ptr->type == type) && (ptr->id == id))
lst[i++] = ptr->item;
ptr = ptr->next;
}
*num = i;
EDBUG_RETURN(lst);
}

130
eesh/main.c Normal file
View File

@ -0,0 +1,130 @@
#include "E.h"
#include <sys/time.h>
#include <sys/types.h>
#include <unistd.h>
extern char waitonly;
int
main(int argc, char **argv)
{
XEvent ev;
Client *me, *e;
char buf[10240];
int i, j, k;
fd_set fd;
char ret;
waitonly = 0;
lists.next = NULL;
SetupX();
CommsSetup();
CommsFindCommsWindow();
XSelectInput(disp, comms_win, StructureNotifyMask);
XSelectInput(disp, root.win, PropertyChangeMask);
e = MakeClient(comms_win);
AddItem(e, "E", e->win, LIST_TYPE_CLIENT);
me = MakeClient(my_win);
AddItem(me, "ME", me->win, LIST_TYPE_CLIENT);
CommsSend(e, "set clientname eesh");
CommsSend(e, "set version 0.1");
CommsSend(e, "set author The Rasterman");
CommsSend(e, "set email raster@rasterman.com");
CommsSend(e, "set web http://www.enlightenment.org");
/* CommsSend(e, "set address NONE"); */
CommsSend(e, "set info Enlightenment IPC Shell - talk to E direct");
/* CommsSend(e, "set pixmap 0"); */
for (i = 0; i < argc; i++)
{
if (!strcmp(argv[i], "-e"))
{
if (i != (argc - 1))
{
CommsSend(e, argv[++i]);
XSync(disp, False);
exit(0);
}
}
else if (!strcmp(argv[i], "-ewait"))
{
waitonly = 1;
if (i != (argc - 1))
CommsSend(e, argv[++i]);
}
else if ((!strcmp(argv[i], "-h")) ||
(!strcmp(argv[i], "--h")) ||
(!strcmp(argv[i], "-help")) ||
(!strcmp(argv[i], "--help")))
{
printf("%s [ -e \"Command to Send to Enlightenment then exit\"]\n"
" [ -ewait \"Command to Send to E then wait for a reply then exit\"]\n",
argv[0]);
printf("Use \"%s\" by itself to enter the \"interactive mode\"\n"
"Ctrl-D will exit interactive mode (EOF)\n"
"use \"help\" from inside interactive mode for further "
"assistance\n", argv[0]);
exit(0);
}
}
XSync(disp, False);
j = 0;
fcntl(0, F_SETFL, O_NONBLOCK);
for (;;)
{
if (waitonly)
{
XNextEvent(disp, &ev);
if (ev.type == ClientMessage)
HandleComms(&ev);
else if (ev.type == DestroyNotify)
exit(0);
XSync(disp, False);
}
else
{
FD_ZERO(&fd);
FD_SET(0, &fd);
FD_SET(ConnectionNumber(disp), &fd);
if (select(ConnectionNumber(disp) + 1, &fd, NULL, NULL, NULL) < 0)
exit(0);
XSync(disp, False);
if (FD_ISSET(0, &fd))
{
k = 0;
while ((ret = read(0, &(buf[j]), 1) > 0))
{
k = 1;
if (buf[j] == '\n')
{
buf[j] = 0;
if (strlen(buf) > 0)
{
CommsSend(e, buf);
XSync(disp, False);
}
j = -1;
}
j++;
}
if ((ret < 0) || ((k == 0) && (ret == 0)))
exit(0);
}
else if (FD_ISSET(ConnectionNumber(disp), &fd))
{
while (XPending(disp))
{
XNextEvent(disp, &ev);
if (ev.type == ClientMessage)
HandleComms(&ev);
else if (ev.type == DestroyNotify)
exit(0);
}
XSync(disp, False);
}
}
}
return 0;
}

145
eesh/memory.c Normal file
View File

@ -0,0 +1,145 @@
#include "E.h"
/*#define DBUG_MEM 1 */
#ifdef DBUG_MEM
#define POINTERS_SIZE 10240
static unsigned int num_pointers = 0;
static void *pointers_ptr[POINTERS_SIZE];
static unsigned int pointers_size[POINTERS_SIZE];
#endif
void
EDisplayMemUse()
{
#ifdef DBUG_MEM
int i, min, max, sum;
max = 0;
min = 0x7ffffff;
sum = 0;
for (i = 0; i < num_pointers; i++)
{
sum += pointers_size[i];
if (pointers_size[i] < min)
min = pointers_size[i];
if (pointers_size[i] > max)
max = pointers_size[i];
}
if (num_pointers > 0)
{
fprintf(stderr, "Num:%6i Sum:%8i Av:%8i Min:%8i Max%6i\n",
num_pointers, sum, sum / num_pointers, min, max);
}
#endif
}
void *
__Emalloc(int size)
{
void *p;
EDBUG(9, "Emalloc");
p = malloc(size);
if (!p)
Alert("Warning! malloc for %i bytes failed \n ", size);
#ifdef DBUG_MEM
if (p)
{
num_pointers++;
pointers_ptr[num_pointers - 1] = p;
pointers_size[num_pointers - 1] = size;
}
#endif
EDBUG_RETURN(p);
}
void *
__Erealloc(void *ptr, int size)
{
void *p;
#ifdef DBUG_MEM
char bad = 0;
#endif
EDBUG(9, "Erealloc");
p = realloc(ptr, size);
if (!p)
Alert("Warning! realloc for %i bytes failed\n", size);
#ifdef DBUG_MEM
if (p)
{
int i;
bad = 1;
for (i = 0; i < num_pointers; i++)
{
if (pointers_ptr[i] == ptr)
{
pointers_size[i] = size;
pointers_ptr[i] = p;
bad = 0;
i = num_pointers;
}
}
}
if (bad)
Alert("WARNING!\n Attempt to free memory that hasn't been allocated.\n");
#endif
EDBUG_RETURN(p);
}
void
__Efree(void *ptr)
{
#ifdef DBUG_MEM
char bad = 0;
#endif
EDBUG(9, "Efree");
free(ptr);
#ifdef DBUG_MEM
{
int i, j;
bad = 1;
for (i = 0; i < num_pointers; i++)
{
if (pointers_ptr[i] == ptr)
{
for (j = i; j < num_pointers - 1; j++)
{
pointers_ptr[j] = pointers_ptr[j + 1];
}
bad = 0;
i = num_pointers;
num_pointers--;
break;
}
}
}
#endif
#ifdef DBUG_MEM
if (bad)
Alert("WARNING!\n Attempt to free memory that hasn't been allocated.\n");
#endif
EDBUG_RETURN_;
}
char *
duplicate(char *s)
{
char *ss;
int sz;
EDBUG(9, "duplicate");
if (!s)
EDBUG_RETURN(NULL);
sz = strlen(s);
ss = Emalloc(sz + 1);
strncpy(ss, s, sz + 1);
EDBUG_RETURN(ss);
}

50
eesh/setup.c Normal file
View File

@ -0,0 +1,50 @@
#include "E.h"
void
SetupX()
{
EDBUG(6, "SetupX");
/* Open a connection to the diplay nominated by the DISPLAY variable */
disp = XOpenDisplay(NULL);
/* if cannot connect to display */
if (!disp)
{
Alert("Eesh cannot connect to the display nominated by\n"
"your shell's DISPLAY environment variable. You may set this\n"
"variable to indicate which display name Enlightenment is to\n"
"connect to. It may be that you do not have an Xserver already\n"
"running to serve that Display connection, or that you do not\n"
"have permission to connect to that display. Please make sure\n"
"all is correct before trying again. Run an Xserver by running\n"
"xdm or startx first, or contact your local system\n"
"administrator, or Xserver vendor, or read the X, xdm and\n"
"startx manual pages before proceeding.\n");
exit(1);
}
root.win = DefaultRootWindow(disp);
root.scr = DefaultScreen(disp);
root.w = DisplayWidth(disp, root.scr);
root.h = DisplayHeight(disp, root.scr);
/* warn, if necessary about lack fo multi-head support */
if (ScreenCount(disp) > 1)
{
Alert("WARNING:\n"
"Your Xserver supports a multi-headed configuration with\n"
"multiple screens attached to the one display. Enlightenment\n"
"does not currently support multi-headed setups, and as a\n"
"result will only manage the first screen (this one).\n");
}
/* warn, if necessary about X version problems */
if (ProtocolVersion(disp) != 11)
{
Alert("WARNING:\n"
"This is not an X11 Xserver. It infact talks the X%i protocol.\n"
"This may mean Enlightenment will either not function, or\n"
"function incorrectly. If it is later than X11, then your\n"
"server is one the author(s) of Enlightenment neither have\n"
"access to, nor have heard of.\n", ProtocolVersion(disp));
}
EDBUG_RETURN_;
}

0
eesh/timestamp.h Normal file
View File

5
epp/.cvsignore Normal file
View File

@ -0,0 +1,5 @@
Makefile.in
Makefile
.deps
epp
*.da

44
epp/ChangeLog Normal file
View File

@ -0,0 +1,44 @@
Sat Jul 10 17:43:10 PDT 1999
(Mandrake)
I'm on a warning crushing mission. damn you, llane. Well, I've STARTED to
clean this up. I don't know where all this code came from, but I'll be damned
if I'm going to let this haunt me for the rest of my days because E has some
crappily written code in it.
-------------------------------------------------------------------------------
Sat Jul 10 18:49:30 PDT 1999
(Mandrake)
down to 155 warnings from like 300-400. Closer, at least.
*sigh*
-------------------------------------------------------------------------------
Sat Jul 10 22:07:59 PDT 1999
(Mandrake)
Down to 103 warnings to remove.
-------------------------------------------------------------------------------
Sun Jul 11 10:08:58 PDT 1999
(Mandrake)
Down to ~60 warnings.
-------------------------------------------------------------------------------
Sun Jul 11 11:05:39 PDT 1999
(Mandrake)
Down to 28 warnings. This is beginning to drive me batty. we'll deal with
this later.
-------------------------------------------------------------------------------
Sun Jul 11 11:56:55 PDT 1999
(Mandrake)
Forget that last commit message. tagged and bagged all of them.

75
epp/Makefile.am Normal file
View File

@ -0,0 +1,75 @@
# Makefile for GNU C compiler.
# Copyright (C) 1987, 88, 90-94, 1995 Free Software Foundation, Inc.
#This file is part of GNU CC.
#GNU CC 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.
#GNU CC 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 GNU CC; see the file COPYING. If not, write to
#the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
if FSSTD
bindir = @bindir@
else
bindir=$(prefix)/enlightenment/bin
endif
bin_PROGRAMS = epp
epp_SOURCES = \
cpplib.h \
cpphash.h \
header.h \
config.h \
cppalloc.c \
cpperror.c \
cppexp.c \
cpphash.c \
cpplib.c \
cppmain.c
INCLUDES=-I$(top_srcdir) -I$(top_builddir) -I$(includedir)
DEFS= \
-DHAVE_STRERROR \
-DFATAL_EXIT_CODE=1 \
-DSUCCESS_EXIT_CODE=1 \
-DGCC_INCLUDE_DIR=\"/usr/include\" \
-DGPLUSPLUS_INCLUDE_DIR=\"/usr/include\" \
-DTOOL_INCLUDE_DIR=\"/usr/bin\" \
-DHOST_BITS_PER_LONG=32 \
-DBITS_PER_UNIT=8 \
-DHOST_BITS_PER_INT=32 \
-DBITS_PER_WORD=16 \
-DTARGET_BELL=7 \
-DTARGET_BS=8 \
-DTARGET_FF=12 \
-DTARGET_NEWLINE=10 \
-DTARGET_CR=13 \
-DTARGET_TAB=9 \
-DTARGET_VT=11
LIBS =
#install-exec-local:
# if [ x@USE_FSSTD@ = "xno" ]; then \
# ../mkinstalldirs $(exec_prefix)/bin; \
# for i in $(bin_PROGRAMS); do \
# rm -f $(exec_prefix)/bin/$$i; \
# $(LN_S) $(bindir)/$$i $(exec_prefix)/bin/$$i; \
# done; \
# fi
uninstall-local:
for i in $(bin_PROGRAMS); do \
rm -f $(exec_prefix)/bin/$$i; \
done

0
epp/config.h Normal file
View File

69
epp/cppalloc.c Normal file
View File

@ -0,0 +1,69 @@
/* Part of CPP library. (memory allocation - xmalloc etc)
* Copyright (C) 1986, 87, 89, 92, 93, 94, 1995 Free Software Foundation, Inc.
* Written by Per Bothner, 1994.
* Based on CCCP program by by Paul Rubin, June 1986
* Adapted to ANSI C, Richard Stallman, Jan 1987
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2, or (at your option) any
* later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
*
* In other words, you are welcome to use, share and improve this program.
* You are forbidden to forbid anyone else to use, share and improve
* what you give them. Help stamp out software-hoarding! */
#include "config.h"
#include <stdlib.h>
#include "header.h"
static void
memory_full()
{
fatal("Memory exhausted.");
}
void *
xmalloc(size)
unsigned size;
{
register char *ptr = (char *)malloc(size);
if (ptr != 0)
return (ptr);
memory_full();
/*NOTREACHED */
return 0;
}
void *
xrealloc(old, size)
void *old;
unsigned size;
{
register char *ptr = (char *)realloc(old, size);
if (ptr == 0)
memory_full();
return ptr;
}
void *
xcalloc(number, size)
unsigned number, size;
{
register char *ptr = (char *)calloc(number, size);
if (ptr == 0)
memory_full();
return ptr;
}

129
epp/cpperror.c Normal file
View File

@ -0,0 +1,129 @@
/* Default error handlers for CPP Library.
* Copyright (C) 1986, 87, 89, 92, 93, 94, 1995 Free Software Foundation, Inc.
* Written by Per Bothner, 1994.
* Based on CCCP program by by Paul Rubin, June 1986
* Adapted to ANSI C, Richard Stallman, Jan 1987
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2, or (at your option) any
* later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
*
* In other words, you are welcome to use, share and improve this program.
* You are forbidden to forbid anyone else to use, share and improve
* what you give them. Help stamp out software-hoarding! */
#include <stdio.h>
#include "header.h"
/* Print the file names and line numbers of the #include
* commands which led to the current file. */
void fatal(char *str, char *arg);
void
cpp_print_containing_files(pfile)
cpp_reader *pfile;
{
cpp_buffer *ip;
int first = 1;
/* If stack of files hasn't changed since we last printed
* this info, don't repeat it. */
if (pfile->input_stack_listing_current)
return;
ip = cpp_file_buffer(pfile);
/* Give up if we don't find a source file. */
if (ip == NULL)
return;
/* Find the other, outer source files. */
while ((ip = CPP_PREV_BUFFER(ip)), ip != CPP_NULL_BUFFER(pfile))
{
long line, col;
cpp_buf_line_and_col(ip, &line, &col);
if (ip->fname != NULL)
{
if (first)
{
first = 0;
fprintf(stderr, "In file included");
}
else
fprintf(stderr, ",\n ");
}
}
if (!first)
fprintf(stderr, ":\n");
/* Record we have printed the status as of this time. */
pfile->input_stack_listing_current = 1;
}
void
cpp_file_line_for_message(pfile, filename, line, column)
cpp_reader *pfile;
char *filename;
int line, column;
{
pfile = NULL;
if (column > 0)
{
fprintf(stderr, "%s:%d:%d: ", filename, line, column);
}
else
{
fprintf(stderr, "%s:%d: ", filename, line);
}
}
/* IS_ERROR is 1 for error, 0 for warning */
void
cpp_message(pfile, is_error, msg, arg1, arg2, arg3)
int is_error;
cpp_reader *pfile;
char *msg;
char *arg1, *arg2, *arg3;
{
if (is_error)
pfile->errors++;
else
fprintf(stderr, "warning: ");
fprintf(stderr, msg, arg1, arg2, arg3);
fprintf(stderr, "\n");
}
void
fatal(str, arg)
char *str, *arg;
{
fprintf(stderr, "%s: ", progname);
fprintf(stderr, str, arg);
fprintf(stderr, "\n");
exit(FATAL_EXIT_CODE);
}
void
cpp_pfatal_with_name(pfile, name)
cpp_reader *pfile;
char *name;
{
cpp_perror_with_name(pfile, name);
#ifdef VMS
exit(vaxc$errno);
#else
exit(FATAL_EXIT_CODE);
#endif
}

1092
epp/cppexp.c Normal file

File diff suppressed because it is too large Load Diff

224
epp/cpphash.c Normal file
View File

@ -0,0 +1,224 @@
/* Part of CPP library. (Macro hash table support.)
* Copyright (C) 1986, 87, 89, 92, 93, 94, 1995 Free Software Foundation, Inc.
* Written by Per Bothner, 1994.
* Based on CCCP program by by Paul Rubin, June 1986
* Adapted to ANSI C, Richard Stallman, Jan 1987
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2, or (at your option) any
* later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
*
* In other words, you are welcome to use, share and improve this program.
* You are forbidden to forbid anyone else to use, share and improve
* what you give them. Help stamp out software-hoarding! */
#include "header.h"
#include "cpphash.h"
static HASHNODE *hashtab[HASHSIZE];
HASHNODE *cpp_lookup(struct parse_file *pfile, const U_CHAR * name, int len,
int hash);
void delete_macro(HASHNODE * hp);
HASHNODE *install(U_CHAR * name, int len, enum node_type type, int ivalue,
char *value, int hash);
/* Define a generic NULL if one hasn't already been defined. */
#ifndef NULL
#define NULL 0
#endif
#ifndef __STDC__
#define const
#define volatile
#endif
#include <string.h>
#include <stdlib.h>
/*
* return hash function on name. must be compatible with the one
* computed a step at a time, elsewhere
*/
int
hashf(name, len, hashsize)
register const U_CHAR *name;
register int len;
int hashsize;
{
register int r = 0;
while (len--)
r = HASHSTEP(r, *name++);
return MAKE_POS(r) % hashsize;
}
/*
* find the most recent hash node for name name (ending with first
* non-identifier char) installed by install
*
* If LEN is >= 0, it is the length of the name.
* Otherwise, compute the length by scanning the entire name.
*
* If HASH is >= 0, it is the precomputed hash code.
* Otherwise, compute the hash code.
*/
HASHNODE *
cpp_lookup(pfile, name, len, hash)
struct parse_file *pfile;
const U_CHAR *name;
int len;
int hash;
{
register const U_CHAR *bp;
register HASHNODE *bucket;
pfile = NULL;
if (len < 0)
{
for (bp = name; is_idchar[*bp]; bp++);
len = bp - name;
}
if (hash < 0)
hash = hashf(name, len, HASHSIZE);
bucket = hashtab[hash];
while (bucket)
{
if (bucket->length == len && strncmp(bucket->name, name, len) == 0)
return bucket;
bucket = bucket->next;
}
return (HASHNODE *) 0;
}
/*
* Delete a hash node. Some weirdness to free junk from macros.
* More such weirdness will have to be added if you define more hash
* types that need it.
*/
/* Note that the DEFINITION of a macro is removed from the hash table
* but its storage is not freed. This would be a storage leak
* except that it is not reasonable to keep undefining and redefining
* large numbers of macros many times.
* In any case, this is necessary, because a macro can be #undef'd
* in the middle of reading the arguments to a call to it.
* If #undef freed the DEFINITION, that would crash. */
void
delete_macro(hp)
HASHNODE *hp;
{
if (hp->prev != NULL)
hp->prev->next = hp->next;
if (hp->next != NULL)
hp->next->prev = hp->prev;
/* make sure that the bucket chain header that
* the deleted guy was on points to the right thing afterwards. */
if (hp == *hp->bucket_hdr)
*hp->bucket_hdr = hp->next;
if (hp->type == T_MACRO)
{
DEFINITION *d = hp->value.defn;
struct reflist *ap, *nextap;
for (ap = d->pattern; ap != NULL; ap = nextap)
{
nextap = ap->next;
free(ap);
}
if (d->nargs >= 0)
free(d->args.argnames);
free(d);
}
free(hp);
}
/*
* install a name in the main hash table, even if it is already there.
* name stops with first non alphanumeric, except leading '#'.
* caller must check against redefinition if that is desired.
* delete_macro () removes things installed by install () in fifo order.
* this is important because of the `defined' special symbol used
* in #if, and also if pushdef/popdef directives are ever implemented.
*
* If LEN is >= 0, it is the length of the name.
* Otherwise, compute the length by scanning the entire name.
*
* If HASH is >= 0, it is the precomputed hash code.
* Otherwise, compute the hash code.
*/
HASHNODE *
install(name, len, type, ivalue, value, hash)
U_CHAR *name;
int len;
enum node_type type;
int ivalue;
char *value;
int hash;
{
register HASHNODE *hp;
register int i, bucket;
register U_CHAR *p, *q;
if (len < 0)
{
p = name;
while (is_idchar[*p])
p++;
len = p - name;
}
if (hash < 0)
hash = hashf(name, len, HASHSIZE);
i = sizeof(HASHNODE) + len + 1;
hp = (HASHNODE *) xmalloc(i);
bucket = hash;
hp->bucket_hdr = &hashtab[bucket];
hp->next = hashtab[bucket];
hashtab[bucket] = hp;
hp->prev = NULL;
if (hp->next != NULL)
hp->next->prev = hp;
hp->type = type;
hp->length = len;
if (hp->type == T_CONST)
hp->value.ival = ivalue;
else
hp->value.cpval = value;
hp->name = ((U_CHAR *) hp) + sizeof(HASHNODE);
p = hp->name;
q = name;
for (i = 0; i < len; i++)
*p++ = *q++;
hp->name[len] = 0;
return hp;
}
void
cpp_hash_cleanup(pfile)
cpp_reader *pfile;
{
register int i;
pfile = NULL;
for (i = HASHSIZE; --i >= 0;)
{
while (hashtab[i])
delete_macro(hashtab[i]);
}
}

36
epp/cpphash.h Normal file
View File

@ -0,0 +1,36 @@
enum node_type;
/* different kinds of things that can appear in the value field
of a hash node. Actually, this may be useless now. */
union hashval {
int ival;
char *cpval;
DEFINITION *defn;
};
struct hashnode {
struct hashnode *next; /* double links for easy deletion */
struct hashnode *prev;
struct hashnode **bucket_hdr; /* also, a back pointer to this node's hash
chain is kept, in case the node is the head
of the chain and gets deleted. */
enum node_type type; /* type of special token */
int length; /* length of token, for quick comparison */
U_CHAR *name; /* the actual name */
union hashval value; /* pointer to expansion, or whatever */
};
typedef struct hashnode HASHNODE;
/* Some definitions for the hash table. The hash function MUST be
computed as shown in hashf () below. That is because the rescan
loop computes the hash value `on the fly' for most tokens,
in order to avoid the overhead of a lot of procedure calls to
the hashf () function. Hashf () only exists for the sake of
politeness, for use when speed isn't so important. */
#define HASHSIZE 1403
#define HASHSTEP(old, c) ((old << 2) + c)
#define MAKE_POS(v) (v & 0x7fffffff) /* make number positive */
extern HASHNODE* install PARAMS ((U_CHAR*,int,enum node_type, int,char*,int));

98
epp/cppmain.c Normal file
View File

@ -0,0 +1,98 @@
/* CPP main program, using CPP Library.
* Copyright (C) 1995 Free Software Foundation, Inc.
* Written by Per Bothner, 1994-95.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2, or (at your option) any
* later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
*
* In other words, you are welcome to use, share and improve this program.
* You are forbidden to forbid anyone else to use, share and improve
* what you give them. Help stamp out software-hoarding! */
#include "header.h"
#include <stdio.h>
#include <string.h>
#include "config.h"
extern char *getenv();
cpp_reader parse_in;
cpp_options options;
/* More 'friendly' abort that prints the line and file.
* config.h can #define abort fancy_abort if you like that sort of thing. */
void
fancy_abort()
{
fatal("Internal gcc abort.");
}
int
main(argc, argv)
int argc;
char **argv;
{
char *p;
int i;
int argi = 1; /* Next argument to handle. */
struct cpp_options *opts = &options;
p = argv[0] + strlen(argv[0]);
while (p != argv[0] && p[-1] != '/')
--p;
progname = p;
init_parse_file(&parse_in);
parse_in.data = opts;
init_parse_options(opts);
argi += cpp_handle_options(&parse_in, argc - argi, argv + argi);
if (argi < argc)
fatal("Invalid option `%s'", argv[argi]);
parse_in.show_column = 1;
i = push_parse_file(&parse_in, opts->in_fname);
if (i != SUCCESS_EXIT_CODE)
return i;
/* Now that we know the input file is valid, open the output. */
if (!opts->out_fname || !strcmp(opts->out_fname, ""))
opts->out_fname = "stdout";
else if (!freopen(opts->out_fname, "w", stdout))
cpp_pfatal_with_name(&parse_in, opts->out_fname);
for (;;)
{
enum cpp_token kind;
if (!opts->no_output)
{
fwrite(parse_in.token_buffer, 1, CPP_WRITTEN(&parse_in), stdout);
}
parse_in.limit = parse_in.token_buffer;
kind = cpp_get_token(&parse_in);
if (kind == CPP_EOF)
break;
}
cpp_finish(&parse_in);
if (parse_in.errors)
exit(FATAL_EXIT_CODE);
exit(SUCCESS_EXIT_CODE);
}

74
epp/header.h Normal file
View File

@ -0,0 +1,74 @@
/*
* declares.h
* This is a file with some declarations in it to get everyone to shut up :)
* --Mandrake
*/
#include "cpplib.h"
#ifndef HOST_BITS_PER_WIDE_INT
#if HOST_BITS_PER_LONG > HOST_BITS_PER_INT
#define HOST_BITS_PER_WIDE_INT HOST_BITS_PER_LONG
#define HOST_WIDE_INT long
#else
#define HOST_BITS_PER_WIDE_INT HOST_BITS_PER_INT
#define HOST_WIDE_INT int
#endif
#endif
struct directive
{
int length;
int (*func) ();
char *name;
enum node_type type;
char command_reads_line;
char traditional_comments;
char pass_thru;
};
void *xmalloc(unsigned size);
void *xrealloc(void *old, unsigned size);
void *xcalloc(unsigned number, unsigned size);
void cpp_print_containing_files(cpp_reader *pfile);
void cpp_file_line_for_message(cpp_reader *pfile, char *filename, int line,
int column);
void cpp_message(cpp_reader *pfile, int is_error, char *msg, char *arg1,
char *arg2, char *arg3);
void cpp_pfatal_with_name(cpp_reader *pfile, char *name);
struct operation parse_number(cpp_reader *pfile, char *start, int olen);
struct operation cpp_lex(cpp_reader *pfile);
int cpp_parse_escape(cpp_reader *pfile, char **string_ptr);
HOST_WIDE_INT cpp_parse_expr(cpp_reader *pfile);
void cpp_grow_buffer(cpp_reader *pfile, long n);
void cpp_define(cpp_reader *pfile, U_CHAR *str);
void init_parse_options(struct cpp_options *opts);
enum cpp_token null_underflow(cpp_reader *pfile);
int null_cleanup(cpp_buffer *pbuf, cpp_reader *pfile);
int macro_cleanup(cpp_buffer *pbuf, cpp_reader *pfile);
int file_cleanup(cpp_buffer *pbuf, cpp_reader *pfile);
void cpp_skip_hspace(cpp_reader *pfile);
void copy_rest_of_line(cpp_reader *pfile);
void skip_rest_of_line(cpp_reader *pfile);
int handle_directive(cpp_reader *pfile);
cpp_buffer *cpp_push_buffer(cpp_reader *pfile, U_CHAR *buffer, long length);
cpp_buffer *cpp_pop_buffer(cpp_reader *pfile);
void cpp_scan_buffer(cpp_reader *pfile);
void cpp_buf_line_and_col(register cpp_buffer *pbuf, long *linep, long *colp);
int hashf(register const U_CHAR *name,register int len, int hashsize);
void cpp_hash_cleanup(cpp_reader *pfile);
int cpp_read_check(cpp_reader *pfile);
int parse_name(cpp_reader *pfile, int c);
void init_parse_file(cpp_reader *pfile);
void init_parse_options(struct cpp_options *opts);
int push_parse_file(cpp_reader *pfile, char *fname);
void cpp_finish(cpp_reader *pfile);
cpp_buffer *cpp_file_buffer(cpp_reader *pfile);
int cpp_read_check_assertion(cpp_reader *pfile);
void fancy_abort(void);
enum cpp_token cpp_get_token(cpp_reader *pfile);
enum cpp_token cpp_get_non_space_token(cpp_reader *pfile);
int cpp_handle_options(cpp_reader *pfile, int argc, char **argv);
void cpp_print_file_and_line(cpp_reader *pfile);

0
epp/timestamp.h Normal file
View File

View File

@ -0,0 +1,91 @@
#!/usr/bin/perl
# This is a little script that will create a window that says
# "Follow the Bouncing Ball" and then drops it to the bottom of the
# screen and slowly bounces it around.
# then when it's done bouncing it gets rid of it.
$screen_size = `eesh -ewait \"general_info screen_size\"`;
chomp($screen_size);
($crap,$width,$height) = split(/\s+/,$screen_size);
# we'll create the ball here and by process of elimination determine what
# the winid is.
@winlist1 = `eesh -ewait window_list`;
`eesh -e \"dialog_ok Follow the Bouncing Ball\"`;
@winlist2 = `eesh -ewait window_list`;
# run through the two lists and figure out which one is new.
foreach $item1 (@winlist2) {
$inside = 0;
foreach $item2 (@winlist1) {
$inside = 1 if($item1 eq $item2);
}
$ballwininfo = $item1 if(!$inside);
}
# call the ball, ace
# (now we have the windowid of our ball)
($ball,$message) = split(/ \: /,$ballwininfo);
$ball =~ s/\s+//g;
$ballloc = `eesh -ewait \"win_op $ball move ?\"`;
$ballsize = `eesh -ewait \"win_op $ball resize ??\"`;
$ballloc =~ s/^.*\: //g;
$ballloc =~ s/\n//g;
$ballsize =~ s/^.*\: //g;
$ballsize =~ s/\n//g;
($ballx,$bally) = split(/\s+/,$ballloc);
($ballw,$ballh) = split(/\s+/,$ballsize);
# now for the fun part. make that baby bounce up and down.
# we're going to open a big pipe for this one and just shove data
# to it.
open IPCPIPE,"| eesh";
@fallspeed = (30,25,20,15,10,5,4,3,2);
$i = 0;
foreach(@fallspeed) {
$originalbally = $bally;
$fallspeed = $fallspeed[i];
while($bally < ($height - $ballh)) {
if(($bally + $fallspeed + $ballh) < $height) {
$bally += $fallspeed;
} else {
$bally = $height - $ballh;
}
print IPCPIPE "win_op $ball move $ballx $bally\n";
}
if($fallspeed[i+1]) {
$fallspeed = $fallspeed[i+1];
} else {
$fallspeed = 1;
}
while($bally > ($originalbally + int($originalbally * (1/$#fallspeed)))) {
if(($bally - $fallspeed) >
($originalbally + int($originalbally * (1/$#fallspeed)))) {
$bally -= $fallspeed;
} else {
$bally = $originalbally + int($originalbally * (1/$#fallspeed));
}
print IPCPIPE "win_op $ball move $ballx $bally\n";
}
$i++;
}
print IPCPIPE "win_op $ball close\n";
close IPCPIPE;
# that's all folks.

67
sample-scripts/lcdmover.sh Executable file
View File

@ -0,0 +1,67 @@
#!/bin/sh
# Use: none!
# instructions: move the lucy in the sky with diamonds window and see what
# happends to the other window.
# The very wierd and bad way of getting the windowids of the two message
# windows in bash, there must be a better way!
a=0
eesh -e "dialog_ok Lucy in the sky with diamonds"
window=`eesh -ewait window_list|grep Message`
for i in $window;do
a=$(($a + 1))
if [ $a = 1 ];then
windowid=$i
fi
done
a=0
eesh -e "dialog_ok Move me with LSD"
window2=`eesh -ewait window_list|grep Message|grep -v $windowid`
for i in $window2;do
a=$(($a + 1))
if [ $a = 1 ];then
windowid2=$i
fi
done
# In one endless loop, get window positions and see if the lcd window is moving
# if so we move the other window too
while true;do
lcdpos=`eesh -ewait "win_op $windowid move ? ?"`
a=0
for i in $lcdpos;do
a=$(($a + 1))
if [ $a = 3 ];then
lcdxpos=$i
fi
if [ $a = 4 ];then
lcdypos=$i
fi
done
pupos=`eesh -ewait "win_op $windowid move ? ?"`
a=0
for i in $pupos;do
a=$(($a + 1))
if [ $a = 3 ];then
puxpos=$i
fi
if [ $a = 4 ];then
puypos=$i
fi
done
if [ $puxpos = $(($lcdxpos)) ];then
newxpos=$(($puxpos + 58))
newypos=$(($puypos + 74))
eesh -e "win_op $windowid2 move $newxpos $newypos"
fi
# Is it faster if we give it a little time delay?
# I think it is, atleast we don't stress E too much if we give it a delay
for y in 1 2 3;do
bill=0
done
done

View File

@ -0,0 +1,105 @@
#!/usr/bin/perl
# This script is still VERY VERY VERY early on in development
# but I wanted to give you folks an idea of why the IPC was being
# set up the way it was. this is just a quick hack. expect better
# samples in the near future.
# This app will take the parameters "on" and "off", and will basically
# shade all the windows on the current desktop and area. (or unshade)
#
# --Mandrake
@winlist_temp = `eesh -ewait window_list`;
@intlist_temp = `eesh -ewait \"internal_list internal_ewin\"`;
# here we're going to test to see whether we are shading or unshading
# the window.
if($ARGV[0] eq "on") {
$shade = 1;
} else {
$shade = 0;
}
# make sure that we're not an internal window in our list
foreach(@winlist_temp) {
chomp;
@stuff = split /\:/;
$insert = 1;
foreach $member (@intlist_temp) {
chomp($member);
$stuff[0] =~ s/\s+//g;
$member =~ s/\s+//g;
if($member eq $stuff[0]) {
$insert = 0;
}
}
if($insert) {
push @winlist,$stuff[0] if($stuff[0]);
}
}
# here we'll retreive the current desk we're on
$current_desk = `eesh -ewait \"goto_desktop ?\"`;
@stuff = split(/\:/,$current_desk);
$current_desk = $stuff[1];
$current_desk =~ s/\n//g;
$current_desk =~ s/^\s+//;
# here we'll retreive the current area we're on
$current_area = `eesh -ewait \"goto_area ?\"`;
@stuff = split(/\:/,$current_area);
$current_area = $stuff[1];
$current_area =~ s/\n//g;
$current_area =~ s/^\s+//;
# get the old shadespeed so that we can set it back later
# because we want this to happen fairly quickly, we'll set
# the speed to something really high
$shadespeed = `eesh -ewait \"fx window_shade_speed ?\"`;
@stuff = split(/\: /,$shadespeed);
$shadespeed = $stuff[1];
chomp($shadespeed);
open IPCPIPE,"| eesh";
print IPCPIPE "fx window_shade_speed 10000000\n";
# now we're going to walk through each of these windows and
# shade them
foreach $window (@winlist) {
$cur_window_desk = `eesh -ewait \"win_op $window desk ?\"`;
@stuff = split(/\:/,$cur_window_desk);
$cur_window_desk = $stuff[1];
$cur_window_desk =~ s/\n//g;
$cur_window_desk =~ s/^\s+//;
if($cur_window_desk eq $current_desk) {
$cur_window_area = `eesh -ewait \"win_op $window area ?\"`;
@stuff = split(/\:/,$cur_window_area);
$cur_window_area = $stuff[1];
$cur_window_area =~ s/\n//g;
$cur_window_area =~ s/^\s+//;
if($cur_window_area eq $current_area) {
if($shade) {
print IPCPIPE "win_op $window shade on\n";
} else {
print IPCPIPE "win_op $window shade off\n";
}
}
}
}
# now we're going to set the shade speed back to what it was originally
print IPCPIPE "fx window_shade_speed $shadespeed\n";
close IPCPIPE;
# that's it!

14
src/.cvsignore Normal file
View File

@ -0,0 +1,14 @@
config.log
confdefs.h
configure
enlightenment
config.cache
Makefile
Makefile.in
.deps
.libs
aclocal.m4
config.status
*.da
bb.out
gmon.out

985
src/ChangeLog Normal file
View File

@ -0,0 +1,985 @@
Sun Mar 14 17:26:01 EST 1999
(Mandrake)
Beginning work on 0.16 - new ChangeLog, too.
-------------------------------------------------------------------------------
Mon Mar 15 19:16:45 EST 1999
(Mandrake)
fixed crashing bug. non-input windows being selected as the selected window no
longer should crash everything
-------------------------------------------------------------------------------
Mon Mar 15 20:55:34 EST 1999
(Mandrake)
fixing things to say 0.15.3... blah. damned bugs :)
-------------------------------------------------------------------------------
Wed Mar 17 02:42:04 EST 1999
(Mandrake)
ARGH. bug bug bug. some code got commented out that shouldn't have been
commented out last night in draw.c. uncommented and committing.
(messes up shaped/borderless window resizes)
increased revision number to 0.15.4. hope to release some time tomorrow.
maybe I'll tackle some other bugs before then.
-------------------------------------------------------------------------------
Wed Mar 17 14:52:24 EST 1999
(Mandrake)
Fixed a bug in translucent move mode in draw.c
-------------------------------------------------------------------------------
Thu Mar 18 02:38:18 EST 1999
(Mandrake)
Added network.c and update.c - VERY rough skeleton code. user-optional
automatic code updates and update testing
-------------------------------------------------------------------------------
Sat Mar 20 13:21:14 EST 1999
(Mandrake)
added button_show IPC command
-------------------------------------------------------------------------------
Mon Mar 22 02:52:04 EST 1999
(Mandrake)
a little bit of work on the auto-update stuff. I still have a long way to go
here, but I thought that I would go ahead and start putting in a little bit of
logic here and there for the upgrade paths. still no actual http support.
debating on whether or not to use ghttp (since it doesn't require any of gnome
I'm thinking about it)
-------------------------------------------------------------------------------
Mon Mar 22 03:53:51 EST 1999
(Mandrake)
Cleaned up epp a little more. still LOTS of work there.
-------------------------------------------------------------------------------
Mon Mar 22 20:46:46 EST 1999
(Mandrake)
cleaned up auto-upgrade to where it won't compile if you don't have libghttp.
-------------------------------------------------------------------------------
Thu Mar 25 14:36:47 CST 1999
(KainX)
Fixed a bug with reverting focus to desktop zero. If you went from desktop 0
to desktop 2 to desktop 6, then back to desktop 0, a window on desktop 2 would
remain focused. Not any more. =)
Also added code to revert to the default colormap when leaving a window or a
desktop. Most users won't notice this. But you definitely will see a
difference if you use Netscape with the "-install" option. :-)
Commented out the debugging output for select() since it was confusing the hell
out of lots of users.
-------------------------------------------------------------------------------
Wed Mar 31 09:27:54 EST 1999
(Raster)
Well - back from CEBIT... and now to the goodies...
* added pager that does snapshots - and continuous snapshot updating... works
beautifully with almost no cpu use on a local machine - it'll probably kill
your network if you run it over a network... :( But it does everything
except allowe you to drag and drop windows around (at the moment) - that will
be added.
* added mode.show_pagers option that is internal for now...
* added flatfile menu loading - sorry - no examples yet - but it works and
automagically updates the menu if the file changes. It makes constructing menus
childs play - I mean REALLY childs play.
* fixed countless minor buglets.
* added area sliding (if desktop sliding is on areas will slide around too)
* fixed manual placement so the mouse up doesnt get passed onto clients under
the pointer then the window is placed
* fixed window list off dragbar so things dont die when you try focus an ewin
ID that doesnt exist anymore
* this brings E's code (not including fnlib, imlib etc.) up to about 60756
lines of code.
-------------------------------------------------------------------------------
Wed Mar 31 10:28:48 CST 1999
(KainX)
When we use the pager to make a window sticky, bring that window to the
current desktop as one would expect to happen.
-------------------------------------------------------------------------------
Wed Mar 31 17:30:49 EST 1999
(Raster)
* fixed numlock / scrollock keybinding / action etc. issues....
-------------------------------------------------------------------------------
Thu Apr 1 14:56:19 EST 1999
(Mandrake)
netowrk updates, etc
-------------------------------------------------------------------------------
Fri Apr 2 00:56:47 EST 1999
(Mandrake)
Lots of stuff. ipc commands. pager command now enables and disables the pager
- made a couple of generic functions EnableAllPagers() and DisableAllPagers()
to do the actual work there. also added skeleton of the fx command. will do
that tonight as I watch a movie. added move_mode and resize_mode commands
(since everyone seems to have wanted that and I don't know how those slipped my
mind) they're not documented well yet, but if you read ipc.c you should be able
to guess how they work (they all work similarly to other ipc commands - I like
the interface I'm brewing up and I'm likely to continue using it)
-------------------------------------------------------------------------------
Fri Apr 2 12:04:19 EST 1999
(Mandrake)
#if 0'd some stuff out for 0.15.5 release
-------------------------------------------------------------------------------
Sun Apr 4 17:10:08 EDT 1999
(Mandrake)
lots of IPC work. new fx command. also a big restructuring of the code itself
in the ipc array (much prettier to the eye)
also I commented a few bits of code -- it's now documented somewhat how to add
new IPC commands in there.
-------------------------------------------------------------------------------
Sun Apr 4 20:04:20 EDT 1999
(Mandrake)
more IPC work. now many win_op commands have status checks
win_op <windowid> <operation> ?
as well as support
win_op <windowid> <operation> <on/off>
-------------------------------------------------------------------------------
Sun Apr 4 21:32:43 EDT 1999
(Mandrake)
added more "?" commands to win_op
very useful.
-------------------------------------------------------------------------------
Sun Apr 4 23:04:17 EDT 1999
(Mandrake)
CPPFLAGS problems people were having should be solved
put the -D stuff from e/src/Makefile.am into econfig.h
-------------------------------------------------------------------------------
Mon Apr 5 21:30:50 EDT 1999
(Mandrake)
updated some numbers to 0.16.0 -> time to say goodbye to 0.15
-------------------------------------------------------------------------------
Mon Apr 5 22:59:08 EDT 1999
(Mandrake)
holy cow, commented some code. Also split out all the initial setup of
fallback classes into SetupFallbackClasses() in init.c -- cleans up main.c
considerably
-------------------------------------------------------------------------------
Tue Apr 6 18:54:54 EDT 1999
(Mandrake)
minor bugfix care of Daniele Paoni for java applications.
also some more comments.
-------------------------------------------------------------------------------
Thu Apr 8 02:33:54 EDT 1999
(Raster)
again - minor fixes to manual placement, a few other little things here and
there scattered about.... but one major addition...
you can drag windows around the pager now... and..... between pagers for
desktops... soi you can move windows form any area to any desktop and around
any desktop now... and it all works nicely... :)
-------------------------------------------------------------------------------
Thu Apr 8 11:39:45 EDT 1999
(Mandrake)
now we autosave whether or not the pager was on.
-------------------------------------------------------------------------------
Thu Apr 8 15:14:19 EDT 1999
(Mandrake)
added the very useful internal_list IPC command.
see help for details.
also added a samplescripts directory with my first sample script,
testroller.pl
-------------------------------------------------------------------------------
Thu Apr 8 16:50:22 EDT 1999
(Mandrake)
fleshed out the --help / -h cmdline parameter to eesh a little.
-------------------------------------------------------------------------------
Thu Apr 8 17:55:20 EDT 1999
(Mandrake)
added advanced_focus IPC command. see IPC help for more information
-------------------------------------------------------------------------------
Fri Apr 9 00:07:46 EDT 1999
(Mandrake)
added set_focus IPC command.
also added "focus" to win_op command
added dialog_ok IPC command.
see ipc help for more details
-------------------------------------------------------------------------------
Fri Apr 9 12:36:56 EDT 1999
(Mandrake)
added list_class IPC command
see ipc help for more details
-------------------------------------------------------------------------------
Fri Apr 9 13:36:12 EDT 1999
(Mandrake)
added play_sound IPC command.
started work on soundclass IPC command (not finished)
added -v/--version commandline parameter
-------------------------------------------------------------------------------
Fri Apr 9 14:14:54 EDT 1999
(Mandrake)
added general_info IPC command. just has screen_size in it now, but I
am sure tehre will be more going in later
-------------------------------------------------------------------------------
Fri Apr 9 17:16:27 EDT 1999
(Mandrake)
fleshed out soundclass ipc
-------------------------------------------------------------------------------
Sat Apr 10 00:26:09 EDT 1999
(Mandrake)
GetNetText() actually does something now. also fixed Makefile.am
-------------------------------------------------------------------------------
Sat Apr 10 00:44:50 EDT 1999
(Mandrake)
mostly-functional GetNetFileDate() now. also cleaned up update.c (doesn't
give warnings anymore)
also the bulk of the work in SaveNetFile()
-------------------------------------------------------------------------------
Sat Apr 10 10:53:00 EDT 1999
(Mandrake)
Somehow network.c got messed up inbetween compile and commit.
-------------------------------------------------------------------------------
Sat Apr 10 11:50:45 EDT 1999
(Mandrake)
minor bugfix in ipc.c
-------------------------------------------------------------------------------
Sun Apr 11 23:15:27 EDT 1999
(Mandrake)
merged pager stuff into uni-pager command.
-------------------------------------------------------------------------------
Tue Apr 20 17:48:12 EDT 1999
(Raster)
Again - I've been lazy with the changelog... but I have done a buttload...
lets summarise...
* added slider widget and event handleing
* added drawing area widget and event handleing
* added sliders to all dialog settings boxes that need them
* added start of a background editor dialog
* added multiple desktop editor
* fixed soem menu bugs
* fixed memory leaks
* fixed "app resizes whilst being moved" bug
* fixed tables instie tables so they work
* optimised backgorudns menu a bit better for file searching
* got rid of redundant sound code that esd now does
* fixed minor bug in WAV loading code
* added elements to brushed metal theme to supply data for new widgets &
features
* fixed 1 or 2 little pager bugs
* fixed possible segfault in text shortening code
* fixed internationalisation problem in saving and reading floats
* did lots of other fixes and adds I've forgotten about
-------------------------------------------------------------------------------
Fri Apr 23 12:38:30 EDT 1999
(Raster)
* added desktop background selector AND editor settings dialog - all gui - all
works. You can't select files to use as backgrounds yet - need file selector
dialog for that (probably next on my list) BUT if you have E generate
background defs from ~/.enlightenmen/backgrounds (which should be a symlink
to wherever you store your images, or just fill that directory with images
and sibdirectories and images - E will auto-index them into the backgrounds
menu). you can edit all of those and their attributes, and clone versions
then edit the clones, modify them, remove the images to use a solid color
instead - etc. all works.. :)
-------------------------------------------------------------------------------
Sat May 15 15:04:35 EDT 1999
(Raster)
* added pager background caching - now pager backrounds will be cached and
saved to disk for faster "repainting" or initial painting. This should
work now.
* session saving no longer saves "-theme" optin ofr command line - the
~/.enlightenment/user_theme.cfg takes pcare of this.
* "snapshots" now use a snapshot dialog. snapshotting location also snaps
desktop area as well (since a desktop is one virtually large desktop).
It can also snap the "command" and be able to start the apps up again on
startup if you select that option. You can also select if the snapped
attributes are to apply toall windows of that class and not just the first
instance. should be a lot nicer.
* some minor pager updating bugs fixed - now if you close a window on another
desktop area it updates properly. the pager "hilight" zoom window should
now be pretty hard to make hang around - paranoia added to hide all zoom
window whenever there is a chance we dont want them.
* minor memory leak fixed.
* brushed metal theme now has different pager border style - more of a
demonstration now of the power of internal ewins that are beng used for the
pager border and how you can make them vehave like a slideout so you can
shade the pager out of the way when you dont want it.
* X11R5 apps should be session managed pproperly now if E is X11R6 session
managed - they shoudl normally go back on the same desktop etc. - but its
not guaranteed - still not 100% unambiguous to determine windows of
unique apps.
* fixed cloning bug where double cloning happens on desktop switch - sticky
windows should not flicker as much now. should be faster / more efficient
* fixed numerous other little buglets and made numerous other little speedups
and improvements.
* added new menu scrolling method patch from Christian - very nice - thanks
fixed one minor bug in it.
* added rotated fonts patch from, Christian - thanks again.
* fixed app re-focus when we go back to the previous desktop in click-to-focus
* fixed potential pixmap leak
* suggest using Imlib from CVS - E triggered a pixmap leak - OOOPS - fixed
* should have fixed "wierd focus behavior" when flipping desktops - basically
now the code goes throuhg ALL ewins - ALL the border parts and removes motion
enter leave and other miscellaneous events that may trigger E to respond to
these and set the focus to that window - so basically we now get E to not
recieve any such tiggering events whilst flipping desktops.
* fixed some internal stack tracing problems where we forget to wrap some
returns form some functions.
* added options for turing pager zoom on and off - loads ans saves it and
has settings check button for it.
* added window title popup option and code (using tooltip as definition
backend - now have PAGER tooltip type to define this). loads and saves
this option - also has settings check button for it.
* added PAGER tooltip type (and image & text classes for it) to BrushedMetal
theme.
-------------------------------------------------------------------------------
Fri May 14 12:40:27 IST 1999
(Merlin)
* Fixed a bug in list.c movetofront that turned lists into loops.
* Updated keyboard warping to operate more sanely; especially in a cramped
desktop with lots of overlapping windows. At start, it makes a list of
the warpring; then when you release alt (currently hardwired for only
alt) it dumps the warpring. Added configuration option 'raise after warp'
if you use focus with pointer; when you release alt, the chosen window
is raised. Also, displays the title of the windows it is warping to so
you know, even if you can't see them. This is only compiled in if you
define WITH_TARTY_WARP; see E.h; needs XKB X extension.
* Added action MOVE_CONTRAINED which is a normal window move, but the
window is absolutely constrained to the current view area.
* Changed menu handling so if you click on a menu item, drag off it and
then release, the menu item is not activated. So you can undo a mistaken
click.
-------------------------------------------------------------------------------
Tue May 25 11:43:48 PDT 1999
(Mandrake)
modules. that's what I'm going to start working on now.
incidentally, the xkb tests don't seem to work under accelx.
-------------------------------------------------------------------------------
Wed May 26 17:13:26 PDT 1999
(Mandrake)
More modules work. Now we can load and unload modules. they don't do much
yet, though.
-------------------------------------------------------------------------------
Sat May 29 13:14:42 PDT 1999
(Mandrake)
more modules work. the unloading should actually work correctly now (wasn't
removing them before).
Also, the ipc "exit" command now runs a logout (pops up a dialog box) unless
you pass a parameter (of any kind) to it.
people should learn to use the IPC help mechanisms.
-------------------------------------------------------------------------------
Sat May 29 19:08:59 PDT 1999
(Mandrake)
more IPC work. advanced_focus and pager got some stuff added.
check out online help for details.
-------------------------------------------------------------------------------
Sun May 30 14:21:39 PDT 1999
(Mandrake)
fixed restart_wm in doExit(), which has apparently been broken for ages.
(allows you to start another window manager from inside of E)
this will fix the menus, the ipc, etc...
-------------------------------------------------------------------------------
Mon May 31 00:20:06 PDT 1999
(Mandrake)
began work on ref_counts in all sorts of things. also added ability to enable
and disable a particular pager at runtime. see pager IPC help for more
details.
-------------------------------------------------------------------------------
Mon May 31 15:52:00 PDT 1999
(Mandrake)
borderless windows save state between restarts
-------------------------------------------------------------------------------
Wed Jun 2 13:33:59 PDT 1999
(Mandrake)
fixed pagers on restarts.
sorry about that. use "pager off" "pager on" ipc commands, should reset (after
starting this version)
-------------------------------------------------------------------------------
Sun Jun 6 12:59:53 PDT 1999
(Mandrake)
some work on reference counting. Things should start picking up now that
at least one class does reference counting properly in one instance.
(this is a very large problem to solve)
-------------------------------------------------------------------------------
Wed Jun 9 12:49:52 PDT 1999
(Mandrake)
reference counting continues. more of the same. lots of work to do here.
-------------------------------------------------------------------------------
Fri Jun 11 14:30:34 PDT 1999
(Mandrake)
more work on reference counting.
-------------------------------------------------------------------------------
Sat Jun 12 19:20:10 PDT 1999
(Mandrake)
reference counting, reference counting, etc.
oh, and some more IPC work in order to test a little more thoroughly.
-------------------------------------------------------------------------------
Sat Jun 12 19:46:41 PDT 1999
(Mandrake)
flipped around some IPC commands, added a couple of new ones.
still testing.
-------------------------------------------------------------------------------
Sun Jun 13 15:54:51 PDT 1999
(Mandrake)
more IPC work, more reference count work, as well as some additional
destructors for things like borders.
-------------------------------------------------------------------------------
Mon Jun 14 17:39:17 PDT 1999
(Mandrake)
more IPC work, skeletoning out some stuff. Also fixed reference counting on
backgrounds.
-------------------------------------------------------------------------------
Wed Jun 16 10:39:58 PDT 1999
(Mandrake)
just when you thought reference counting madness was over, it wasn't :)
thanks to Christian Kreibich for helping me there :)
-------------------------------------------------------------------------------
Fri Jun 18 14:18:58 PDT 1999
(Mandrake)
fixed a bug in cached config file loading. thanks to
Peter Kjellerstedt <peter.kjellerstedt@axis.com>
-------------------------------------------------------------------------------
Fri Jun 18 17:51:04 PDT 1999
(Mandrake)
fixed the pager bug on restart. also fixed the "88% load bug"
-------------------------------------------------------------------------------
Mon Jun 21 15:19:11 PDT 1999
(Mandrake)
added "windowlist" and "desktopwindowlist" menu types. -- same code from
dragbar.
-------------------------------------------------------------------------------
Tue Jun 22 13:27:57 CDT 1999
(KainX)
This should fix the button toggling bug reported by David Joseph Goehrig
<djg5@st-andrews.ac.uk>
-------------------------------------------------------------------------------
Mon Jun 28 01:54:01 PDT 1999
(Mandrake)
this should fix some config loading bugs as reported by
Jesse Michael <jessem@revlabs.com>
-------------------------------------------------------------------------------
Tue Jun 29 13:13:04 PDT 1999
(Mandrake)
Merged in a patch from Christian Kreibich <kreibich@informatik.tu-muenchen.de>
for Labeled Buttons. Also added dereferening to the destructor for the
additional memory he allocated, as well as removed a couple of lines of
redundant code. Will add to the default themes later.
-------------------------------------------------------------------------------
Wed Jun 30 12:22:40 PDT 1999
(Raster)
Oooops - overoptimised the event pruner... optimised out some window
map requests - fixed this... just got rid of the map request compressor.
thanks shaleh for bugging us about this
-------------------------------------------------------------------------------
Wed Jul 7 13:55:42 PDT 1999
(Mandrake)
Fixed labeled buttons definition for Christian. Also added the regex that he
sent in.
-------------------------------------------------------------------------------
Sun Jul 11 13:07:07 PDT 1999
(Mandrake)
added "dock" IPC command. see
eesh -ewait "help dock" for more information
-------------------------------------------------------------------------------
Tue Jul 13 01:07:29 CEST 1999
(Christian)
Cleaned up eesh's help output. Also added a generic quicksort algorithm,
see misc.c for details and IPC_Help() for an example.
-------------------------------------------------------------------------------
Tue Jul 13 11:12:25 EST 1999
(Raster)
Committing work on iconbox - scrollbar, scrollarrows ec. all work - in theory
i can re-arrange the arrows to be either end, on one of the ends or no arrows
and arrange the scrollbar to be on the botton or top.. some code left to do
vertical iconbox - not much though - just scrollbar arrangement code.
iconify and de-iconfi works all great - only thing to watch.. dont restart
E with iconified windows.. you'll lose their icons right now.. need to fix
that.
next need to ad non snapshotted icon support (several stages - use E defined
icons only, use E definied icons only if defined, otherwise use snapshotted
icons, use app defined icons only if defined otherwise use snapshots,
use E defined icons if defined, otherwise use app defined icon if defined,
if not defined use snapshot.. not ot mention the introduction of default
E defined icons for all unknown windows - then the actual icon def list itself
and the config system for that etc... then need to support multiple iconboxes
and dnd form pager to iconbox and back... and between iconboxes... then
definable iconification into certain iconboxes - and also need to support
transparent backgrouns for iconbox - thus simulating the old icons floating
about thing... but its all coming...
-------------------------------------------------------------------------------
Fri Jul 16 03:31:40 EST 1999
(Raster)
Iconbox now handles ghe horizontal, the vertical, all scrollbar optiond - even
has a settings dialog box (right muse on iconbox). it can even be transparent.
I also optimised property change event handling - e should be much much much
more eficient at it avoiding lots of unecessary X traffic.
Changed gthe box draw mode to move the inner box 1 pixel in so on borderless
window you can see the border when moving & resizing.
added icon creation policy code.
in the middle of ading icon list code /9that determines what icon image is
to be used for what apps and is user definable)
play with the iconbox - it shouldnt be too bad. :)
-------------------------------------------------------------------------------
Fri Jul 16 02:04:42 CEST 1999
(Christian)
Replaced about.png so that it matches the look of the website logo.
-------------------------------------------------------------------------------
Fri Jul 16 15:54:44 PDT 1999
(Mandrake)
KDE hints start. rev 1 didn't actually work, so we started over
-------------------------------------------------------------------------------
Mon Jul 19 23:03:11 EST 1999
(Raster)
* fixed minor shape propagation bug
* improved dialog code by adding bindable callback keyboard shortcuts
* improved backgroudns dialog... I just got an influx of about 4000 new pix,
and it did get a bit tedious as i have to filter the backgrounds to only
keep the good ones... now the backgrounds dialog can becme almost an image
viewer that lets me filter my background colletcion... not to mention some
keyboard shorts work now (like left/right arrow, d, delete, space and
backspace)
* iconbox now starts up when E starts - still doesnt remember settings but
iconifed windows on start / restart get handled now, and added some
imageclasses for the iconbox widget parts - still need more bits put in
though like a scrollbar knob imageclass and a iconbox frame imageclass
-------------------------------------------------------------------------------
Tue Jul 20 02:34:29 EST 1999
(Raster)
* added iconbox coverwin support and imageclass - if the iclass is there the
cover win is displayed... also updated brushed metal. again.. to include this
stuff.
-------------------------------------------------------------------------------
Fri Jul 23 11:34:11 PDT 1999
(KainX)
Added support for HP-UX 10.x modules thanks to a patch from Marty Riedling
<m_riedling@hotmail.com>
-------------------------------------------------------------------------------
Mon Jul 26 14:03:39 PDT 1999
(Troy R. Pesola)
Here is a patch file that incorporates the following:
-fixed actions.c to set the desktop and area when switching to another ewin.
-added sound "SOUND_FOCUS_SET" to be played when the focus is set.
-added win_op title to the IPC stuff.
-changed keybindings to reveal deskmenu and taskmenu.
-changed menus to remove -geom params on netscape calls (personal pref)
I will start working on the IPC stuff that has the create/modify/delete
functions.
-------------------------------------------------------------------------------
Mon Jul 26 23:31:51 CEST 1999
(Christian)
Window Groups :)
E's windows can new be grouped by opening the winops menu for a
window, and selecting 'Window Group'->'Start Group'. Windows can be added
using 'Window Group'->'Add to group'. There's a control dialog for groups
via 'Window Group'->'Configure group', which defines what actions are
applied to all group members. Moving groups should work in every method
except for translucent, which is turned into opaque.
The pagers by default are a group.
The group members can be emphasized using 'Window Group'->'Show/Hide Group',
doing so again returns to the previous borders. Which borders are used for
emphasizing is defined by a tag __BORDER_GROUP_NAME <bordername> for every
border in the theme. Still needs to be added to BrushedMetal.
Also corrected a typo. Or two, or three ... ;)
-------------------------------------------------------------------------------
Mon Jul 26 16:09:13 PDT 1999
(Mandrake)
cleaned up a little bit (especially in actions.c -- there was a spot where i
was being used from a previous context but being reset inside of a closure - I
HAVE to assume that was a mistake). Also took out a couple of warnings.
Expect a new version of kde.c when I get home, also -- time to commit
-------------------------------------------------------------------------------
Tue Jul 27 23:38:36 EST 1999
(Raster)
guess what... i'm back... and the iconbox is almost 100% done... sorry no
example icondefs.cfg files yt to demo the app window -> micon image matching...
but i'll include that later... just trust me that it all works.
the icobox now does a hell of a LOT and is very configrable and malleble. set
the right options and it'd look and feel almost exactly like the old
iconification stuff except with enhancements and better behavior.
at least now you can have multpile iconboxes, create and destroy them at will
and chnage all the options int he iconbox and e will remember and save/load
this info up again.
quite nice actually... :) try it out - sorry - snapshotted windows only for
those of you not evil enuf to read e's code to figure out thr iconfdefs.cfg
format. :) i''ll let that cat out of the bag soon enuf.
-------------------------------------------------------------------------------
Tue Jul 27 22:23:25 CEST 1999
(Christian)
Hopefully fixed a segfault in moving windows with transients.
-------------------------------------------------------------------------------
Wed Jul 28 08:19:27 EST 1999
(Raster)
added in owens withdrawn state patch thst fixes sojme java apps continuously
spinning after withdrawing windows...
also fixed variable clash.. this could cause segv's - the cvs merge didnt
notice we now had to i variables in different contexts... :) fixed.
-------------------------------------------------------------------------------
Thu Jul 29 00:46:24 CEST 1999
(Christian)
Added window group shortcuts to titlebar of BrushedMetal. Also dropped
Tigert a mail today and told him that we could use borders for grouped
windows ... I have something here for that purpose but it's Tigert's
theme, right?
-------------------------------------------------------------------------------
Wed Jul 28 18:33:09 PDT 1999
(KainX)
Added iconbox images to ShinyMetal theme (which I still use...sue me).
-------------------------------------------------------------------------------
Thu Jul 29 17:41:14 PDT 1999
(Knut Neumann)
this adds create/modify/delete ability to the
background ipc command. Its using the format, Troy suggested on e-develop,
though it might easily be changed to the "old" style system.
It is using a new value type system as well, which is working the following
way:
background TEST bg.file /home/test/test.png
will create a background (resp. modifying it, if it already exists) and set
bg.file property to the specified file.
This way takes advantage over the way to provide parameters as the set_bg
command from comms.c works as one does not have to hack in every single
parameter. On the other side, it is a real mess, if one wants to set a whole
bunch of options at once. I have no idea how to solve that discrepance at the
moment. Suggestions are welcome.
-------------------------------------------------------------------------------
Thu Jul 29 18:33:02 PDT 1999
(Mandrake)
shut up compile. still reading kwm.cpp - if we're going to support KDE hints,
we're going to do them right. this _STRING_ stuff is silly.
-------------------------------------------------------------------------------
Fri Jul 30 11:10:28 PDT 1999
(Mandrake)
applied patch from Valdis Kletnieks <Valdis.Kletnieks@vt.edu> to make epp
compile cleanly on AIX.
-------------------------------------------------------------------------------
Mon Aug 2 15:06:33 PDT 1999
(Mandrake)
KDE Part thirty-seven. should start working soon
-------------------------------------------------------------------------------
Mon Aug 2 17:16:55 PDT 1999
(Mandrake)
more atom work.
-------------------------------------------------------------------------------
Thu Aug 5 00:32:51 CEST 1999
(Christian)
The tooltip icons are back. Add tooltip text to the actions in an
action class using __TOOLTIP_ACTION_TEXT "whatever" and you get the mouse
button and key combination visualized for free :) See BrushedMetal's
window titlebar for an example. Theme designers can override the icon
looks by providing imageclasses named: TOOLTIP_MOUSEBUTTON_ANY,
TOOLTIP_MOUSEBUTTON_1, TOOLTIP_MOUSEBUTTON_2, TOOLTIP_MOUSEBUTTON_3,
TOOLTIP_KEY_SHIFT, TOOLTIP_KEY_LOCK, TOOLTIP_KEY_CTRL, TOOLTIP_KEY_MOD1
TOOLTIP_KEY_MOD2, TOOLTIP_KEY_MOD3, TOOLTIP_KEY_MOD4, TOOLTIP_KEY_MOD5.
Have fun folks :)
-------------------------------------------------------------------------------
Wed Aug 4 23:08:41 PDT 1999
(KainX)
The beginnings of the imageclass apply IPC.
-------------------------------------------------------------------------------

BIN
src/ChangeLog-pre0.16.gz Normal file

Binary file not shown.

2776
src/E.h Normal file

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More