Initial commit
All of the files from the tarball downloaded from SourceForge are being checked in so there's a record of the changes made compared to it (since I can't find the libcfu source repository). The generated files will be removed in the following commit.
This commit is contained in:
commit
f660e3460a
33
COPYING
Normal file
33
COPYING
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
Copyright (c) 2005 Don Owens
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
This code is released under the BSD license:
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions
|
||||||
|
are met:
|
||||||
|
|
||||||
|
* Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
* Redistributions in binary form must reproduce the above
|
||||||
|
copyright notice, this list of conditions and the following
|
||||||
|
disclaimer in the documentation and/or other materials provided
|
||||||
|
with the distribution.
|
||||||
|
|
||||||
|
* Neither the name of the author nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived
|
||||||
|
from this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||||
|
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||||
|
COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||||
|
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
|
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||||
|
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||||
|
OF THE POSSIBILITY OF SUCH DAMAGE.
|
8
ChangeLog
Normal file
8
ChangeLog
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
Version 0.03
|
||||||
|
* Added command-line option processing
|
||||||
|
* Added libcfu-config
|
||||||
|
* Added a map function to cfulist: cfulist_map()
|
||||||
|
* Added cfulist_new_with_free_fn()
|
||||||
|
Version 0.02
|
||||||
|
* Fixed build problems on FreeBSD
|
||||||
|
* Corrected missing info direntry in the docs
|
229
INSTALL
Normal file
229
INSTALL
Normal file
@ -0,0 +1,229 @@
|
|||||||
|
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software
|
||||||
|
Foundation, Inc.
|
||||||
|
|
||||||
|
This file is free documentation; the Free Software Foundation gives
|
||||||
|
unlimited permission to copy, distribute and modify it.
|
||||||
|
|
||||||
|
Basic Installation
|
||||||
|
==================
|
||||||
|
|
||||||
|
These are generic installation instructions.
|
||||||
|
|
||||||
|
The `configure' shell script attempts to guess correct values for
|
||||||
|
various system-dependent variables used during compilation. It uses
|
||||||
|
those values to create a `Makefile' in each directory of the package.
|
||||||
|
It may also create one or more `.h' files containing system-dependent
|
||||||
|
definitions. Finally, it creates a shell script `config.status' that
|
||||||
|
you can run in the future to recreate the current configuration, and a
|
||||||
|
file `config.log' containing compiler output (useful mainly for
|
||||||
|
debugging `configure').
|
||||||
|
|
||||||
|
It can also use an optional file (typically called `config.cache'
|
||||||
|
and enabled with `--cache-file=config.cache' or simply `-C') that saves
|
||||||
|
the results of its tests to speed up reconfiguring. (Caching is
|
||||||
|
disabled by default to prevent problems with accidental use of stale
|
||||||
|
cache files.)
|
||||||
|
|
||||||
|
If you need to do unusual things to compile the package, please try
|
||||||
|
to figure out how `configure' could check whether to do them, and mail
|
||||||
|
diffs or instructions to the address given in the `README' so they can
|
||||||
|
be considered for the next release. If you are using the cache, and at
|
||||||
|
some point `config.cache' contains results you don't want to keep, you
|
||||||
|
may remove or edit it.
|
||||||
|
|
||||||
|
The file `configure.ac' (or `configure.in') is used to create
|
||||||
|
`configure' by a program called `autoconf'. You only need
|
||||||
|
`configure.ac' if you want to change it or regenerate `configure' using
|
||||||
|
a newer version of `autoconf'.
|
||||||
|
|
||||||
|
The simplest way to compile this package is:
|
||||||
|
|
||||||
|
1. `cd' to the directory containing the package's source code and type
|
||||||
|
`./configure' to configure the package for your system. If you're
|
||||||
|
using `csh' on an old version of System V, you might need to type
|
||||||
|
`sh ./configure' instead to prevent `csh' from trying to execute
|
||||||
|
`configure' itself.
|
||||||
|
|
||||||
|
Running `configure' takes awhile. While running, it prints some
|
||||||
|
messages telling which features it is checking for.
|
||||||
|
|
||||||
|
2. Type `make' to compile the package.
|
||||||
|
|
||||||
|
3. Optionally, type `make check' to run any self-tests that come with
|
||||||
|
the package.
|
||||||
|
|
||||||
|
4. Type `make install' to install the programs and any data files and
|
||||||
|
documentation.
|
||||||
|
|
||||||
|
5. You can remove the program binaries and object files from the
|
||||||
|
source code directory by typing `make clean'. To also remove the
|
||||||
|
files that `configure' created (so you can compile the package for
|
||||||
|
a different kind of computer), type `make distclean'. There is
|
||||||
|
also a `make maintainer-clean' target, but that is intended mainly
|
||||||
|
for the package's developers. If you use it, you may have to get
|
||||||
|
all sorts of other programs in order to regenerate files that came
|
||||||
|
with the distribution.
|
||||||
|
|
||||||
|
Compilers and Options
|
||||||
|
=====================
|
||||||
|
|
||||||
|
Some systems require unusual options for compilation or linking that
|
||||||
|
the `configure' script does not know about. Run `./configure --help'
|
||||||
|
for details on some of the pertinent environment variables.
|
||||||
|
|
||||||
|
You can give `configure' initial values for configuration parameters
|
||||||
|
by setting variables in the command line or in the environment. Here
|
||||||
|
is an example:
|
||||||
|
|
||||||
|
./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
|
||||||
|
|
||||||
|
*Note Defining Variables::, for more details.
|
||||||
|
|
||||||
|
Compiling For Multiple Architectures
|
||||||
|
====================================
|
||||||
|
|
||||||
|
You can compile the package for more than one kind of computer at the
|
||||||
|
same time, by placing the object files for each architecture in their
|
||||||
|
own directory. To do this, you must use a version of `make' that
|
||||||
|
supports the `VPATH' variable, such as GNU `make'. `cd' to the
|
||||||
|
directory where you want the object files and executables to go and run
|
||||||
|
the `configure' script. `configure' automatically checks for the
|
||||||
|
source code in the directory that `configure' is in and in `..'.
|
||||||
|
|
||||||
|
If you have to use a `make' that does not support the `VPATH'
|
||||||
|
variable, you have to compile the package for one architecture at a
|
||||||
|
time in the source code directory. After you have installed the
|
||||||
|
package for one architecture, use `make distclean' before reconfiguring
|
||||||
|
for another architecture.
|
||||||
|
|
||||||
|
Installation Names
|
||||||
|
==================
|
||||||
|
|
||||||
|
By default, `make install' 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' cannot figure out
|
||||||
|
automatically, but needs to determine by the type of machine the package
|
||||||
|
will run on. Usually, assuming the package is built to be run on the
|
||||||
|
_same_ architectures, `configure' can figure that out, but if it prints
|
||||||
|
a message saying it cannot guess the machine type, give it the
|
||||||
|
`--build=TYPE' option. TYPE can either be a short name for the system
|
||||||
|
type, such as `sun4', or a canonical name which has the form:
|
||||||
|
|
||||||
|
CPU-COMPANY-SYSTEM
|
||||||
|
|
||||||
|
where SYSTEM can have one of these forms:
|
||||||
|
|
||||||
|
OS KERNEL-OS
|
||||||
|
|
||||||
|
See the file `config.sub' for the possible values of each field. If
|
||||||
|
`config.sub' isn't included in this package, then this package doesn't
|
||||||
|
need to know the machine type.
|
||||||
|
|
||||||
|
If you are _building_ compiler tools for cross-compiling, you should
|
||||||
|
use the `--target=TYPE' option to select the type of system they will
|
||||||
|
produce code for.
|
||||||
|
|
||||||
|
If you want to _use_ a cross compiler, that generates code for a
|
||||||
|
platform different from the build platform, you should specify the
|
||||||
|
"host" platform (i.e., that on which the generated programs will
|
||||||
|
eventually be run) with `--host=TYPE'.
|
||||||
|
|
||||||
|
Sharing Defaults
|
||||||
|
================
|
||||||
|
|
||||||
|
If you want to set default values for `configure' scripts to share,
|
||||||
|
you can create a site shell script called `config.site' that gives
|
||||||
|
default values for variables like `CC', `cache_file', and `prefix'.
|
||||||
|
`configure' looks for `PREFIX/share/config.site' if it exists, then
|
||||||
|
`PREFIX/etc/config.site' if it exists. Or, you can set the
|
||||||
|
`CONFIG_SITE' environment variable to the location of the site script.
|
||||||
|
A warning: not all `configure' scripts look for a site script.
|
||||||
|
|
||||||
|
Defining Variables
|
||||||
|
==================
|
||||||
|
|
||||||
|
Variables not defined in a site shell script can be set in the
|
||||||
|
environment passed to `configure'. However, some packages may run
|
||||||
|
configure again during the build, and the customized values of these
|
||||||
|
variables may be lost. In order to avoid this problem, you should set
|
||||||
|
them in the `configure' command line, using `VAR=value'. For example:
|
||||||
|
|
||||||
|
./configure CC=/usr/local2/bin/gcc
|
||||||
|
|
||||||
|
will cause the specified gcc to be used as the C compiler (unless it is
|
||||||
|
overridden in the site shell script).
|
||||||
|
|
||||||
|
`configure' Invocation
|
||||||
|
======================
|
||||||
|
|
||||||
|
`configure' recognizes the following options to control how it
|
||||||
|
operates.
|
||||||
|
|
||||||
|
`--help'
|
||||||
|
`-h'
|
||||||
|
Print a summary of the options to `configure', and exit.
|
||||||
|
|
||||||
|
`--version'
|
||||||
|
`-V'
|
||||||
|
Print the version of Autoconf used to generate the `configure'
|
||||||
|
script, and exit.
|
||||||
|
|
||||||
|
`--cache-file=FILE'
|
||||||
|
Enable the cache: use and save the results of the tests in FILE,
|
||||||
|
traditionally `config.cache'. FILE defaults to `/dev/null' to
|
||||||
|
disable caching.
|
||||||
|
|
||||||
|
`--config-cache'
|
||||||
|
`-C'
|
||||||
|
Alias for `--cache-file=config.cache'.
|
||||||
|
|
||||||
|
`--quiet'
|
||||||
|
`--silent'
|
||||||
|
`-q'
|
||||||
|
Do not print messages saying which checks are being made. To
|
||||||
|
suppress all normal output, redirect it to `/dev/null' (any error
|
||||||
|
messages will still be shown).
|
||||||
|
|
||||||
|
`--srcdir=DIR'
|
||||||
|
Look for the package's source code in directory DIR. Usually
|
||||||
|
`configure' can determine that directory automatically.
|
||||||
|
|
||||||
|
`configure' also accepts some other, not widely useful, options. Run
|
||||||
|
`configure --help' for more details.
|
||||||
|
|
12
Makefile.am
Normal file
12
Makefile.am
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
SUBDIRS = src examples doc
|
||||||
|
if DEBUG
|
||||||
|
AM_CFLAGS = -Wall -W -Werror -DCFU_VERSION="\"@VERSION@\"" -DCFU_DEBUG=1
|
||||||
|
else
|
||||||
|
AM_CFLAGS = -Wall -W -Werror -DCFU_VERSION="\"@VERSION@\""
|
||||||
|
endif
|
||||||
|
|
||||||
|
LIBCFU_TYPE_u_int=@LIBCFU_TYPE_u_int@
|
||||||
|
|
||||||
|
INCLUDES = -I$(top_srcdir)/include
|
||||||
|
|
||||||
|
EXTRA_DIST = include/cfutypes.h.in include/cfu.h.in
|
554
Makefile.in
Normal file
554
Makefile.in
Normal file
@ -0,0 +1,554 @@
|
|||||||
|
# Makefile.in generated by automake 1.9.2 from Makefile.am.
|
||||||
|
# @configure_input@
|
||||||
|
|
||||||
|
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||||
|
# 2003, 2004 Free Software Foundation, Inc.
|
||||||
|
# This Makefile.in is free software; the Free Software Foundation
|
||||||
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||||
|
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
# PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
@SET_MAKE@
|
||||||
|
srcdir = @srcdir@
|
||||||
|
top_srcdir = @top_srcdir@
|
||||||
|
VPATH = @srcdir@
|
||||||
|
pkgdatadir = $(datadir)/@PACKAGE@
|
||||||
|
pkglibdir = $(libdir)/@PACKAGE@
|
||||||
|
pkgincludedir = $(includedir)/@PACKAGE@
|
||||||
|
top_builddir = .
|
||||||
|
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||||
|
INSTALL = @INSTALL@
|
||||||
|
install_sh_DATA = $(install_sh) -c -m 644
|
||||||
|
install_sh_PROGRAM = $(install_sh) -c
|
||||||
|
install_sh_SCRIPT = $(install_sh) -c
|
||||||
|
INSTALL_HEADER = $(INSTALL_DATA)
|
||||||
|
transform = $(program_transform_name)
|
||||||
|
NORMAL_INSTALL = :
|
||||||
|
PRE_INSTALL = :
|
||||||
|
POST_INSTALL = :
|
||||||
|
NORMAL_UNINSTALL = :
|
||||||
|
PRE_UNINSTALL = :
|
||||||
|
POST_UNINSTALL = :
|
||||||
|
subdir = .
|
||||||
|
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
|
||||||
|
$(srcdir)/Makefile.in $(top_srcdir)/configure \
|
||||||
|
$(top_srcdir)/include/cfu.h.in \
|
||||||
|
$(top_srcdir)/include/cfutypes.h.in AUTHORS COPYING ChangeLog \
|
||||||
|
INSTALL NEWS depcomp install-sh missing mkinstalldirs
|
||||||
|
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||||
|
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
|
||||||
|
$(top_srcdir)/configure.ac
|
||||||
|
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||||
|
$(ACLOCAL_M4)
|
||||||
|
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
|
||||||
|
configure.lineno configure.status.lineno
|
||||||
|
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||||
|
CONFIG_CLEAN_FILES = include/cfutypes.h include/cfu.h
|
||||||
|
SOURCES =
|
||||||
|
DIST_SOURCES =
|
||||||
|
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
|
||||||
|
html-recursive info-recursive install-data-recursive \
|
||||||
|
install-exec-recursive install-info-recursive \
|
||||||
|
install-recursive installcheck-recursive installdirs-recursive \
|
||||||
|
pdf-recursive ps-recursive uninstall-info-recursive \
|
||||||
|
uninstall-recursive
|
||||||
|
ETAGS = etags
|
||||||
|
CTAGS = ctags
|
||||||
|
DIST_SUBDIRS = $(SUBDIRS)
|
||||||
|
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||||
|
distdir = $(PACKAGE)-$(VERSION)
|
||||||
|
top_distdir = $(distdir)
|
||||||
|
am__remove_distdir = \
|
||||||
|
{ test ! -d $(distdir) \
|
||||||
|
|| { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
|
||||||
|
&& rm -fr $(distdir); }; }
|
||||||
|
DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2
|
||||||
|
GZIP_ENV = --best
|
||||||
|
distuninstallcheck_listfiles = find . -type f -print
|
||||||
|
distcleancheck_listfiles = find . -type f -print
|
||||||
|
ACLOCAL = @ACLOCAL@
|
||||||
|
AMDEP_FALSE = @AMDEP_FALSE@
|
||||||
|
AMDEP_TRUE = @AMDEP_TRUE@
|
||||||
|
AMTAR = @AMTAR@
|
||||||
|
AUTOCONF = @AUTOCONF@
|
||||||
|
AUTOHEADER = @AUTOHEADER@
|
||||||
|
AUTOMAKE = @AUTOMAKE@
|
||||||
|
AWK = @AWK@
|
||||||
|
CC = @CC@
|
||||||
|
CCDEPMODE = @CCDEPMODE@
|
||||||
|
CFLAGS = @CFLAGS@
|
||||||
|
CPP = @CPP@
|
||||||
|
CPPFLAGS = @CPPFLAGS@
|
||||||
|
CYGPATH_W = @CYGPATH_W@
|
||||||
|
DEBUG_FALSE = @DEBUG_FALSE@
|
||||||
|
DEBUG_TRUE = @DEBUG_TRUE@
|
||||||
|
DEFS = @DEFS@
|
||||||
|
DEPDIR = @DEPDIR@
|
||||||
|
ECHO_C = @ECHO_C@
|
||||||
|
ECHO_N = @ECHO_N@
|
||||||
|
ECHO_T = @ECHO_T@
|
||||||
|
EGREP = @EGREP@
|
||||||
|
EXEEXT = @EXEEXT@
|
||||||
|
INSTALL_DATA = @INSTALL_DATA@
|
||||||
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||||
|
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||||
|
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||||
|
LDFLAGS = @LDFLAGS@
|
||||||
|
LIBCFU_TYPE_u_int = @LIBCFU_TYPE_u_int@
|
||||||
|
LIBOBJS = @LIBOBJS@
|
||||||
|
LIBS = @LIBS@
|
||||||
|
LTLIBOBJS = @LTLIBOBJS@
|
||||||
|
MAKEINFO = @MAKEINFO@
|
||||||
|
OBJEXT = @OBJEXT@
|
||||||
|
PACKAGE = @PACKAGE@
|
||||||
|
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||||
|
PACKAGE_NAME = @PACKAGE_NAME@
|
||||||
|
PACKAGE_STRING = @PACKAGE_STRING@
|
||||||
|
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||||
|
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||||
|
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||||
|
RANLIB = @RANLIB@
|
||||||
|
SET_MAKE = @SET_MAKE@
|
||||||
|
SHELL = @SHELL@
|
||||||
|
STRIP = @STRIP@
|
||||||
|
VERSION = @VERSION@
|
||||||
|
ac_ct_CC = @ac_ct_CC@
|
||||||
|
ac_ct_RANLIB = @ac_ct_RANLIB@
|
||||||
|
ac_ct_STRIP = @ac_ct_STRIP@
|
||||||
|
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||||
|
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||||
|
am__include = @am__include@
|
||||||
|
am__leading_dot = @am__leading_dot@
|
||||||
|
am__quote = @am__quote@
|
||||||
|
am__tar = @am__tar@
|
||||||
|
am__untar = @am__untar@
|
||||||
|
bindir = @bindir@
|
||||||
|
build_alias = @build_alias@
|
||||||
|
datadir = @datadir@
|
||||||
|
exec_prefix = @exec_prefix@
|
||||||
|
host_alias = @host_alias@
|
||||||
|
includedir = @includedir@
|
||||||
|
infodir = @infodir@
|
||||||
|
install_sh = @install_sh@
|
||||||
|
libdir = @libdir@
|
||||||
|
libexecdir = @libexecdir@
|
||||||
|
localstatedir = @localstatedir@
|
||||||
|
mandir = @mandir@
|
||||||
|
mkdir_p = @mkdir_p@
|
||||||
|
oldincludedir = @oldincludedir@
|
||||||
|
prefix = @prefix@
|
||||||
|
program_transform_name = @program_transform_name@
|
||||||
|
sbindir = @sbindir@
|
||||||
|
sharedstatedir = @sharedstatedir@
|
||||||
|
sysconfdir = @sysconfdir@
|
||||||
|
target_alias = @target_alias@
|
||||||
|
SUBDIRS = src examples doc
|
||||||
|
@DEBUG_FALSE@AM_CFLAGS = -Wall -W -Werror -DCFU_VERSION="\"@VERSION@\""
|
||||||
|
@DEBUG_TRUE@AM_CFLAGS = -Wall -W -Werror -DCFU_VERSION="\"@VERSION@\"" -DCFU_DEBUG=1
|
||||||
|
INCLUDES = -I$(top_srcdir)/include
|
||||||
|
EXTRA_DIST = include/cfutypes.h.in include/cfu.h.in
|
||||||
|
all: all-recursive
|
||||||
|
|
||||||
|
.SUFFIXES:
|
||||||
|
am--refresh:
|
||||||
|
@:
|
||||||
|
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||||
|
@for dep in $?; do \
|
||||||
|
case '$(am__configure_deps)' in \
|
||||||
|
*$$dep*) \
|
||||||
|
echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \
|
||||||
|
cd $(srcdir) && $(AUTOMAKE) --gnu \
|
||||||
|
&& exit 0; \
|
||||||
|
exit 1;; \
|
||||||
|
esac; \
|
||||||
|
done; \
|
||||||
|
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
|
||||||
|
cd $(top_srcdir) && \
|
||||||
|
$(AUTOMAKE) --gnu Makefile
|
||||||
|
.PRECIOUS: Makefile
|
||||||
|
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||||
|
@case '$?' in \
|
||||||
|
*config.status*) \
|
||||||
|
echo ' $(SHELL) ./config.status'; \
|
||||||
|
$(SHELL) ./config.status;; \
|
||||||
|
*) \
|
||||||
|
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
|
||||||
|
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
|
||||||
|
esac;
|
||||||
|
|
||||||
|
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||||
|
$(SHELL) ./config.status --recheck
|
||||||
|
|
||||||
|
$(top_srcdir)/configure: $(am__configure_deps)
|
||||||
|
cd $(srcdir) && $(AUTOCONF)
|
||||||
|
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||||
|
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
||||||
|
include/cfutypes.h: $(top_builddir)/config.status $(top_srcdir)/include/cfutypes.h.in
|
||||||
|
cd $(top_builddir) && $(SHELL) ./config.status $@
|
||||||
|
include/cfu.h: $(top_builddir)/config.status $(top_srcdir)/include/cfu.h.in
|
||||||
|
cd $(top_builddir) && $(SHELL) ./config.status $@
|
||||||
|
uninstall-info-am:
|
||||||
|
|
||||||
|
# This directory's subdirectories are mostly independent; you can cd
|
||||||
|
# into them and run `make' without going through this Makefile.
|
||||||
|
# To change the values of `make' variables: instead of editing Makefiles,
|
||||||
|
# (1) if the variable is set in `config.status', edit `config.status'
|
||||||
|
# (which will cause the Makefiles to be regenerated when you run `make');
|
||||||
|
# (2) otherwise, pass the desired values on the `make' command line.
|
||||||
|
$(RECURSIVE_TARGETS):
|
||||||
|
@set fnord $$MAKEFLAGS; amf=$$2; \
|
||||||
|
dot_seen=no; \
|
||||||
|
target=`echo $@ | sed s/-recursive//`; \
|
||||||
|
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||||
|
echo "Making $$target in $$subdir"; \
|
||||||
|
if test "$$subdir" = "."; then \
|
||||||
|
dot_seen=yes; \
|
||||||
|
local_target="$$target-am"; \
|
||||||
|
else \
|
||||||
|
local_target="$$target"; \
|
||||||
|
fi; \
|
||||||
|
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||||
|
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
|
||||||
|
done; \
|
||||||
|
if test "$$dot_seen" = "no"; then \
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||||
|
fi; test -z "$$fail"
|
||||||
|
|
||||||
|
mostlyclean-recursive clean-recursive distclean-recursive \
|
||||||
|
maintainer-clean-recursive:
|
||||||
|
@set fnord $$MAKEFLAGS; amf=$$2; \
|
||||||
|
dot_seen=no; \
|
||||||
|
case "$@" in \
|
||||||
|
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||||
|
*) list='$(SUBDIRS)' ;; \
|
||||||
|
esac; \
|
||||||
|
rev=''; for subdir in $$list; do \
|
||||||
|
if test "$$subdir" = "."; then :; else \
|
||||||
|
rev="$$subdir $$rev"; \
|
||||||
|
fi; \
|
||||||
|
done; \
|
||||||
|
rev="$$rev ."; \
|
||||||
|
target=`echo $@ | sed s/-recursive//`; \
|
||||||
|
for subdir in $$rev; do \
|
||||||
|
echo "Making $$target in $$subdir"; \
|
||||||
|
if test "$$subdir" = "."; then \
|
||||||
|
local_target="$$target-am"; \
|
||||||
|
else \
|
||||||
|
local_target="$$target"; \
|
||||||
|
fi; \
|
||||||
|
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||||
|
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
|
||||||
|
done && test -z "$$fail"
|
||||||
|
tags-recursive:
|
||||||
|
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||||
|
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
|
||||||
|
done
|
||||||
|
ctags-recursive:
|
||||||
|
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||||
|
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
|
||||||
|
done
|
||||||
|
|
||||||
|
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||||
|
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||||
|
unique=`for i in $$list; do \
|
||||||
|
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||||
|
done | \
|
||||||
|
$(AWK) ' { files[$$0] = 1; } \
|
||||||
|
END { for (i in files) print i; }'`; \
|
||||||
|
mkid -fID $$unique
|
||||||
|
tags: TAGS
|
||||||
|
|
||||||
|
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||||
|
$(TAGS_FILES) $(LISP)
|
||||||
|
tags=; \
|
||||||
|
here=`pwd`; \
|
||||||
|
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
|
||||||
|
include_option=--etags-include; \
|
||||||
|
empty_fix=.; \
|
||||||
|
else \
|
||||||
|
include_option=--include; \
|
||||||
|
empty_fix=; \
|
||||||
|
fi; \
|
||||||
|
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||||
|
if test "$$subdir" = .; then :; else \
|
||||||
|
test ! -f $$subdir/TAGS || \
|
||||||
|
tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
|
||||||
|
fi; \
|
||||||
|
done; \
|
||||||
|
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||||
|
unique=`for i in $$list; do \
|
||||||
|
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||||
|
done | \
|
||||||
|
$(AWK) ' { files[$$0] = 1; } \
|
||||||
|
END { for (i in files) print i; }'`; \
|
||||||
|
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||||
|
test -n "$$unique" || unique=$$empty_fix; \
|
||||||
|
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||||
|
$$tags $$unique; \
|
||||||
|
fi
|
||||||
|
ctags: CTAGS
|
||||||
|
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||||
|
$(TAGS_FILES) $(LISP)
|
||||||
|
tags=; \
|
||||||
|
here=`pwd`; \
|
||||||
|
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||||
|
unique=`for i in $$list; do \
|
||||||
|
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||||
|
done | \
|
||||||
|
$(AWK) ' { files[$$0] = 1; } \
|
||||||
|
END { for (i in files) print i; }'`; \
|
||||||
|
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||||
|
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||||
|
$$tags $$unique
|
||||||
|
|
||||||
|
GTAGS:
|
||||||
|
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||||
|
&& cd $(top_srcdir) \
|
||||||
|
&& gtags -i $(GTAGS_ARGS) $$here
|
||||||
|
|
||||||
|
distclean-tags:
|
||||||
|
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||||
|
|
||||||
|
distdir: $(DISTFILES)
|
||||||
|
$(am__remove_distdir)
|
||||||
|
mkdir $(distdir)
|
||||||
|
$(mkdir_p) $(distdir)/include
|
||||||
|
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||||
|
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||||
|
list='$(DISTFILES)'; for file in $$list; do \
|
||||||
|
case $$file in \
|
||||||
|
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||||
|
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||||
|
esac; \
|
||||||
|
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||||
|
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||||
|
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||||
|
dir="/$$dir"; \
|
||||||
|
$(mkdir_p) "$(distdir)$$dir"; \
|
||||||
|
else \
|
||||||
|
dir=''; \
|
||||||
|
fi; \
|
||||||
|
if test -d $$d/$$file; then \
|
||||||
|
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||||
|
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||||
|
fi; \
|
||||||
|
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||||
|
else \
|
||||||
|
test -f $(distdir)/$$file \
|
||||||
|
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||||
|
|| exit 1; \
|
||||||
|
fi; \
|
||||||
|
done
|
||||||
|
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||||
|
if test "$$subdir" = .; then :; else \
|
||||||
|
test -d "$(distdir)/$$subdir" \
|
||||||
|
|| $(mkdir_p) "$(distdir)/$$subdir" \
|
||||||
|
|| exit 1; \
|
||||||
|
distdir=`$(am__cd) $(distdir) && pwd`; \
|
||||||
|
top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
|
||||||
|
(cd $$subdir && \
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) \
|
||||||
|
top_distdir="$$top_distdir" \
|
||||||
|
distdir="$$distdir/$$subdir" \
|
||||||
|
distdir) \
|
||||||
|
|| exit 1; \
|
||||||
|
fi; \
|
||||||
|
done
|
||||||
|
-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
|
||||||
|
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
|
||||||
|
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
|
||||||
|
! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
|
||||||
|
|| chmod -R a+r $(distdir)
|
||||||
|
dist-gzip: distdir
|
||||||
|
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||||
|
$(am__remove_distdir)
|
||||||
|
dist-bzip2: distdir
|
||||||
|
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
|
||||||
|
$(am__remove_distdir)
|
||||||
|
|
||||||
|
dist-tarZ: distdir
|
||||||
|
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
|
||||||
|
$(am__remove_distdir)
|
||||||
|
|
||||||
|
dist-shar: distdir
|
||||||
|
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
|
||||||
|
$(am__remove_distdir)
|
||||||
|
|
||||||
|
dist-zip: distdir
|
||||||
|
-rm -f $(distdir).zip
|
||||||
|
zip -rq $(distdir).zip $(distdir)
|
||||||
|
$(am__remove_distdir)
|
||||||
|
|
||||||
|
dist dist-all: distdir
|
||||||
|
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||||
|
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
|
||||||
|
$(am__remove_distdir)
|
||||||
|
|
||||||
|
# This target untars the dist file and tries a VPATH configuration. Then
|
||||||
|
# it guarantees that the distribution is self-contained by making another
|
||||||
|
# tarfile.
|
||||||
|
distcheck: dist
|
||||||
|
case '$(DIST_ARCHIVES)' in \
|
||||||
|
*.tar.gz*) \
|
||||||
|
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
|
||||||
|
*.tar.bz2*) \
|
||||||
|
bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
|
||||||
|
*.tar.Z*) \
|
||||||
|
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
|
||||||
|
*.shar.gz*) \
|
||||||
|
GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
|
||||||
|
*.zip*) \
|
||||||
|
unzip $(distdir).zip ;;\
|
||||||
|
esac
|
||||||
|
chmod -R a-w $(distdir); chmod a+w $(distdir)
|
||||||
|
mkdir $(distdir)/_build
|
||||||
|
mkdir $(distdir)/_inst
|
||||||
|
chmod a-w $(distdir)
|
||||||
|
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
|
||||||
|
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
|
||||||
|
&& cd $(distdir)/_build \
|
||||||
|
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
|
||||||
|
$(DISTCHECK_CONFIGURE_FLAGS) \
|
||||||
|
&& $(MAKE) $(AM_MAKEFLAGS) \
|
||||||
|
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
|
||||||
|
&& $(MAKE) $(AM_MAKEFLAGS) check \
|
||||||
|
&& $(MAKE) $(AM_MAKEFLAGS) install \
|
||||||
|
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
|
||||||
|
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
|
||||||
|
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
|
||||||
|
distuninstallcheck \
|
||||||
|
&& chmod -R a-w "$$dc_install_base" \
|
||||||
|
&& ({ \
|
||||||
|
(cd ../.. && umask 077 && mkdir "$$dc_destdir") \
|
||||||
|
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
|
||||||
|
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
|
||||||
|
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
|
||||||
|
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
|
||||||
|
} || { rm -rf "$$dc_destdir"; exit 1; }) \
|
||||||
|
&& rm -rf "$$dc_destdir" \
|
||||||
|
&& $(MAKE) $(AM_MAKEFLAGS) dist \
|
||||||
|
&& rm -rf $(DIST_ARCHIVES) \
|
||||||
|
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck
|
||||||
|
$(am__remove_distdir)
|
||||||
|
@(echo "$(distdir) archives ready for distribution: "; \
|
||||||
|
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
|
||||||
|
sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
|
||||||
|
distuninstallcheck:
|
||||||
|
@cd $(distuninstallcheck_dir) \
|
||||||
|
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
|
||||||
|
|| { echo "ERROR: files left after uninstall:" ; \
|
||||||
|
if test -n "$(DESTDIR)"; then \
|
||||||
|
echo " (check DESTDIR support)"; \
|
||||||
|
fi ; \
|
||||||
|
$(distuninstallcheck_listfiles) ; \
|
||||||
|
exit 1; } >&2
|
||||||
|
distcleancheck: distclean
|
||||||
|
@if test '$(srcdir)' = . ; then \
|
||||||
|
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
|
||||||
|
exit 1 ; \
|
||||||
|
fi
|
||||||
|
@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|
||||||
|
|| { echo "ERROR: files left in build directory after distclean:" ; \
|
||||||
|
$(distcleancheck_listfiles) ; \
|
||||||
|
exit 1; } >&2
|
||||||
|
check-am: all-am
|
||||||
|
check: check-recursive
|
||||||
|
all-am: Makefile
|
||||||
|
installdirs: installdirs-recursive
|
||||||
|
installdirs-am:
|
||||||
|
install: install-recursive
|
||||||
|
install-exec: install-exec-recursive
|
||||||
|
install-data: install-data-recursive
|
||||||
|
uninstall: uninstall-recursive
|
||||||
|
|
||||||
|
install-am: all-am
|
||||||
|
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||||
|
|
||||||
|
installcheck: installcheck-recursive
|
||||||
|
install-strip:
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||||
|
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||||
|
`test -z '$(STRIP)' || \
|
||||||
|
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||||
|
mostlyclean-generic:
|
||||||
|
|
||||||
|
clean-generic:
|
||||||
|
|
||||||
|
distclean-generic:
|
||||||
|
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||||
|
|
||||||
|
maintainer-clean-generic:
|
||||||
|
@echo "This command is intended for maintainers to use"
|
||||||
|
@echo "it deletes files that may require special tools to rebuild."
|
||||||
|
clean: clean-recursive
|
||||||
|
|
||||||
|
clean-am: clean-generic mostlyclean-am
|
||||||
|
|
||||||
|
distclean: distclean-recursive
|
||||||
|
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||||
|
-rm -f Makefile
|
||||||
|
distclean-am: clean-am distclean-generic distclean-tags
|
||||||
|
|
||||||
|
dvi: dvi-recursive
|
||||||
|
|
||||||
|
dvi-am:
|
||||||
|
|
||||||
|
html: html-recursive
|
||||||
|
|
||||||
|
info: info-recursive
|
||||||
|
|
||||||
|
info-am:
|
||||||
|
|
||||||
|
install-data-am:
|
||||||
|
|
||||||
|
install-exec-am:
|
||||||
|
|
||||||
|
install-info: install-info-recursive
|
||||||
|
|
||||||
|
install-man:
|
||||||
|
|
||||||
|
installcheck-am:
|
||||||
|
|
||||||
|
maintainer-clean: maintainer-clean-recursive
|
||||||
|
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||||
|
-rm -rf $(top_srcdir)/autom4te.cache
|
||||||
|
-rm -f Makefile
|
||||||
|
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||||
|
|
||||||
|
mostlyclean: mostlyclean-recursive
|
||||||
|
|
||||||
|
mostlyclean-am: mostlyclean-generic
|
||||||
|
|
||||||
|
pdf: pdf-recursive
|
||||||
|
|
||||||
|
pdf-am:
|
||||||
|
|
||||||
|
ps: ps-recursive
|
||||||
|
|
||||||
|
ps-am:
|
||||||
|
|
||||||
|
uninstall-am: uninstall-info-am
|
||||||
|
|
||||||
|
uninstall-info: uninstall-info-recursive
|
||||||
|
|
||||||
|
.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \
|
||||||
|
check-am clean clean-generic clean-recursive ctags \
|
||||||
|
ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-shar \
|
||||||
|
dist-tarZ dist-zip distcheck distclean distclean-generic \
|
||||||
|
distclean-recursive distclean-tags distcleancheck distdir \
|
||||||
|
distuninstallcheck dvi dvi-am html html-am info info-am \
|
||||||
|
install install-am install-data install-data-am install-exec \
|
||||||
|
install-exec-am install-info install-info-am install-man \
|
||||||
|
install-strip installcheck installcheck-am installdirs \
|
||||||
|
installdirs-am maintainer-clean maintainer-clean-generic \
|
||||||
|
maintainer-clean-recursive mostlyclean mostlyclean-generic \
|
||||||
|
mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
|
||||||
|
uninstall uninstall-am uninstall-info-am
|
||||||
|
|
||||||
|
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||||
|
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||||
|
.NOEXPORT:
|
4
README
Normal file
4
README
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
Libcfu is a library of thread-safe functions and data structures that
|
||||||
|
I have found useful. See the texinfo documentation for detailed
|
||||||
|
information.
|
||||||
|
|
4
acinclude.m4
Normal file
4
acinclude.m4
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
AC_DEFUN([LIBCFU_CHECK_TYPE], [
|
||||||
|
AC_CHECK_TYPE($1, LIBCFU_TYPE_$1="/* $1 is defined */",
|
||||||
|
LIBCFU_TYPE_$1="typedef $2 $1;")
|
||||||
|
])
|
1028
aclocal.m4
vendored
Normal file
1028
aclocal.m4
vendored
Normal file
File diff suppressed because it is too large
Load Diff
59
configure.ac
Normal file
59
configure.ac
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
AC_INIT(libcfu, 0.03)
|
||||||
|
|
||||||
|
AM_INIT_AUTOMAKE([dist-bzip2])
|
||||||
|
|
||||||
|
# AC_CONFIG_HEADERS(config.h)
|
||||||
|
|
||||||
|
LIBCFU_CHECK_TYPE(u_int, unsigned int)
|
||||||
|
AC_SUBST(LIBCFU_TYPE_u_int)
|
||||||
|
|
||||||
|
AC_PROG_CC
|
||||||
|
AC_PROG_RANLIB
|
||||||
|
|
||||||
|
dnl Check for pthread support
|
||||||
|
SAVECFLAGS="$CFLAGS"
|
||||||
|
SAVELIBS="$LIBS"
|
||||||
|
CFLAGS="-pthread $CFLAGS"
|
||||||
|
LIBS="-pthread $LIBS"
|
||||||
|
AC_CHECK_FUNC(pthread_mutex_init,,
|
||||||
|
CFLAGS="$SAVECFLAGS"
|
||||||
|
LIBS="$SAVELIBS"
|
||||||
|
AC_CHECK_LIB(pthread, pthread_mutex_init,,
|
||||||
|
AC_CHECK_LIB(pthreads, pthread_mutex_init,,
|
||||||
|
AC_MSG_ERROR([No pthreads support found.]))))
|
||||||
|
|
||||||
|
# Checks for header files.
|
||||||
|
AC_HEADER_STDC
|
||||||
|
AC_CHECK_HEADERS([stdlib.h string.h sys/time.h])
|
||||||
|
|
||||||
|
# Checks for typedefs, structures, and compiler characteristics.
|
||||||
|
AC_C_CONST
|
||||||
|
AC_C_INLINE
|
||||||
|
AC_TYPE_SIZE_T
|
||||||
|
AC_HEADER_TIME
|
||||||
|
|
||||||
|
# Checks for library functions.
|
||||||
|
AC_FUNC_MALLOC
|
||||||
|
AC_FUNC_MEMCMP
|
||||||
|
AC_CHECK_FUNCS([gettimeofday memset strcasecmp strncasecmp])
|
||||||
|
|
||||||
|
# AC_CONFIG_AUX_DIR
|
||||||
|
|
||||||
|
AC_ARG_ENABLE(debug,
|
||||||
|
[ --enable-debug Turn on debugging],
|
||||||
|
[case "${enableval}" in
|
||||||
|
yes) debug=true ;;
|
||||||
|
no) debug=false ;;
|
||||||
|
*) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
|
||||||
|
esac],[debug=false])
|
||||||
|
AM_CONDITIONAL(DEBUG, test x$debug = xtrue)
|
||||||
|
|
||||||
|
|
||||||
|
AC_CONFIG_FILES([Makefile
|
||||||
|
src/Makefile
|
||||||
|
examples/Makefile
|
||||||
|
doc/Makefile
|
||||||
|
include/cfutypes.h
|
||||||
|
include/cfu.h])
|
||||||
|
|
||||||
|
AC_OUTPUT
|
479
depcomp
Executable file
479
depcomp
Executable file
@ -0,0 +1,479 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
# depcomp - compile a program generating dependencies as side-effects
|
||||||
|
# Copyright 1999, 2000, 2003 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
# This program is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2, or (at your option)
|
||||||
|
# any later version.
|
||||||
|
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||||
|
# 02111-1307, USA.
|
||||||
|
|
||||||
|
# As a special exception to the GNU General Public License, if you
|
||||||
|
# distribute this file as part of a program that contains a
|
||||||
|
# configuration script generated by Autoconf, you may include it under
|
||||||
|
# the same distribution terms that you use for the rest of that program.
|
||||||
|
|
||||||
|
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
|
||||||
|
|
||||||
|
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
|
||||||
|
echo "depcomp: Variables source, object and depmode must be set" 1>&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
# `libtool' can also be set to `yes' or `no'.
|
||||||
|
|
||||||
|
if test -z "$depfile"; then
|
||||||
|
base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'`
|
||||||
|
dir=`echo "$object" | sed 's,/.*$,/,'`
|
||||||
|
if test "$dir" = "$object"; then
|
||||||
|
dir=
|
||||||
|
fi
|
||||||
|
# FIXME: should be _deps on DOS.
|
||||||
|
depfile="$dir.deps/$base"
|
||||||
|
fi
|
||||||
|
|
||||||
|
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
|
||||||
|
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
|
||||||
|
# Some modes work just like other modes, but use different flags. We
|
||||||
|
# parameterize here, but still list the modes in the big case below,
|
||||||
|
# to make depend.m4 easier to write. Note that we *cannot* use a case
|
||||||
|
# here, because this file can only contain one case statement.
|
||||||
|
if test "$depmode" = hp; then
|
||||||
|
# HP compiler uses -M and no extra arg.
|
||||||
|
gccflag=-M
|
||||||
|
depmode=gcc
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "$depmode" = dashXmstdout; then
|
||||||
|
# This is just like dashmstdout with a different argument.
|
||||||
|
dashmflag=-xM
|
||||||
|
depmode=dashmstdout
|
||||||
|
fi
|
||||||
|
|
||||||
|
case "$depmode" in
|
||||||
|
gcc3)
|
||||||
|
## gcc 3 implements dependency tracking that does exactly what
|
||||||
|
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
|
||||||
|
## it if -MD -MP comes after the -MF stuff. Hmm.
|
||||||
|
"$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
|
||||||
|
stat=$?
|
||||||
|
if test $stat -eq 0; then :
|
||||||
|
else
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
exit $stat
|
||||||
|
fi
|
||||||
|
mv "$tmpdepfile" "$depfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
gcc)
|
||||||
|
## There are various ways to get dependency output from gcc. Here's
|
||||||
|
## why we pick this rather obscure method:
|
||||||
|
## - Don't want to use -MD because we'd like the dependencies to end
|
||||||
|
## up in a subdir. Having to rename by hand is ugly.
|
||||||
|
## (We might end up doing this anyway to support other compilers.)
|
||||||
|
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
|
||||||
|
## -MM, not -M (despite what the docs say).
|
||||||
|
## - Using -M directly means running the compiler twice (even worse
|
||||||
|
## than renaming).
|
||||||
|
if test -z "$gccflag"; then
|
||||||
|
gccflag=-MD,
|
||||||
|
fi
|
||||||
|
"$@" -Wp,"$gccflag$tmpdepfile"
|
||||||
|
stat=$?
|
||||||
|
if test $stat -eq 0; then :
|
||||||
|
else
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
exit $stat
|
||||||
|
fi
|
||||||
|
rm -f "$depfile"
|
||||||
|
echo "$object : \\" > "$depfile"
|
||||||
|
alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
|
||||||
|
## The second -e expression handles DOS-style file names with drive letters.
|
||||||
|
sed -e 's/^[^:]*: / /' \
|
||||||
|
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
|
||||||
|
## This next piece of magic avoids the `deleted header file' problem.
|
||||||
|
## The problem is that when a header file which appears in a .P file
|
||||||
|
## is deleted, the dependency causes make to die (because there is
|
||||||
|
## typically no way to rebuild the header). We avoid this by adding
|
||||||
|
## dummy dependencies for each header file. Too bad gcc doesn't do
|
||||||
|
## this for us directly.
|
||||||
|
tr ' ' '
|
||||||
|
' < "$tmpdepfile" |
|
||||||
|
## Some versions of gcc put a space before the `:'. On the theory
|
||||||
|
## that the space means something, we add a space to the output as
|
||||||
|
## well.
|
||||||
|
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||||
|
## correctly. Breaking it into two sed invocations is a workaround.
|
||||||
|
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
hp)
|
||||||
|
# This case exists only to let depend.m4 do its work. It works by
|
||||||
|
# looking at the text of this script. This case will never be run,
|
||||||
|
# since it is checked for above.
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
|
||||||
|
sgi)
|
||||||
|
if test "$libtool" = yes; then
|
||||||
|
"$@" "-Wp,-MDupdate,$tmpdepfile"
|
||||||
|
else
|
||||||
|
"$@" -MDupdate "$tmpdepfile"
|
||||||
|
fi
|
||||||
|
stat=$?
|
||||||
|
if test $stat -eq 0; then :
|
||||||
|
else
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
exit $stat
|
||||||
|
fi
|
||||||
|
rm -f "$depfile"
|
||||||
|
|
||||||
|
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
|
||||||
|
echo "$object : \\" > "$depfile"
|
||||||
|
|
||||||
|
# Clip off the initial element (the dependent). Don't try to be
|
||||||
|
# clever and replace this with sed code, as IRIX sed won't handle
|
||||||
|
# lines with more than a fixed number of characters (4096 in
|
||||||
|
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
|
||||||
|
# the IRIX cc adds comments like `#:fec' to the end of the
|
||||||
|
# dependency line.
|
||||||
|
tr ' ' '
|
||||||
|
' < "$tmpdepfile" \
|
||||||
|
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
|
||||||
|
tr '
|
||||||
|
' ' ' >> $depfile
|
||||||
|
echo >> $depfile
|
||||||
|
|
||||||
|
# The second pass generates a dummy entry for each header file.
|
||||||
|
tr ' ' '
|
||||||
|
' < "$tmpdepfile" \
|
||||||
|
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
|
||||||
|
>> $depfile
|
||||||
|
else
|
||||||
|
# The sourcefile does not contain any dependencies, so just
|
||||||
|
# store a dummy comment line, to avoid errors with the Makefile
|
||||||
|
# "include basename.Plo" scheme.
|
||||||
|
echo "#dummy" > "$depfile"
|
||||||
|
fi
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
aix)
|
||||||
|
# The C for AIX Compiler uses -M and outputs the dependencies
|
||||||
|
# in a .u file. In older versions, this file always lives in the
|
||||||
|
# current directory. Also, the AIX compiler puts `$object:' at the
|
||||||
|
# start of each line; $object doesn't have directory information.
|
||||||
|
# Version 6 uses the directory in both cases.
|
||||||
|
stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
|
||||||
|
tmpdepfile="$stripped.u"
|
||||||
|
if test "$libtool" = yes; then
|
||||||
|
"$@" -Wc,-M
|
||||||
|
else
|
||||||
|
"$@" -M
|
||||||
|
fi
|
||||||
|
stat=$?
|
||||||
|
|
||||||
|
if test -f "$tmpdepfile"; then :
|
||||||
|
else
|
||||||
|
stripped=`echo "$stripped" | sed 's,^.*/,,'`
|
||||||
|
tmpdepfile="$stripped.u"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test $stat -eq 0; then :
|
||||||
|
else
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
exit $stat
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -f "$tmpdepfile"; then
|
||||||
|
outname="$stripped.o"
|
||||||
|
# Each line is of the form `foo.o: dependent.h'.
|
||||||
|
# Do two passes, one to just change these to
|
||||||
|
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||||
|
sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
|
||||||
|
sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
|
||||||
|
else
|
||||||
|
# The sourcefile does not contain any dependencies, so just
|
||||||
|
# store a dummy comment line, to avoid errors with the Makefile
|
||||||
|
# "include basename.Plo" scheme.
|
||||||
|
echo "#dummy" > "$depfile"
|
||||||
|
fi
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
icc)
|
||||||
|
# Intel's C compiler understands `-MD -MF file'. However on
|
||||||
|
# icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
|
||||||
|
# ICC 7.0 will fill foo.d with something like
|
||||||
|
# foo.o: sub/foo.c
|
||||||
|
# foo.o: sub/foo.h
|
||||||
|
# which is wrong. We want:
|
||||||
|
# sub/foo.o: sub/foo.c
|
||||||
|
# sub/foo.o: sub/foo.h
|
||||||
|
# sub/foo.c:
|
||||||
|
# sub/foo.h:
|
||||||
|
# ICC 7.1 will output
|
||||||
|
# foo.o: sub/foo.c sub/foo.h
|
||||||
|
# and will wrap long lines using \ :
|
||||||
|
# foo.o: sub/foo.c ... \
|
||||||
|
# sub/foo.h ... \
|
||||||
|
# ...
|
||||||
|
|
||||||
|
"$@" -MD -MF "$tmpdepfile"
|
||||||
|
stat=$?
|
||||||
|
if test $stat -eq 0; then :
|
||||||
|
else
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
exit $stat
|
||||||
|
fi
|
||||||
|
rm -f "$depfile"
|
||||||
|
# Each line is of the form `foo.o: dependent.h',
|
||||||
|
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
|
||||||
|
# Do two passes, one to just change these to
|
||||||
|
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||||
|
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
|
||||||
|
# Some versions of the HPUX 10.20 sed can't process this invocation
|
||||||
|
# correctly. Breaking it into two sed invocations is a workaround.
|
||||||
|
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
|
||||||
|
sed -e 's/$/ :/' >> "$depfile"
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
tru64)
|
||||||
|
# The Tru64 compiler uses -MD to generate dependencies as a side
|
||||||
|
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
|
||||||
|
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
|
||||||
|
# dependencies in `foo.d' instead, so we check for that too.
|
||||||
|
# Subdirectories are respected.
|
||||||
|
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||||
|
test "x$dir" = "x$object" && dir=
|
||||||
|
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
||||||
|
|
||||||
|
if test "$libtool" = yes; then
|
||||||
|
tmpdepfile1="$dir.libs/$base.lo.d"
|
||||||
|
tmpdepfile2="$dir.libs/$base.d"
|
||||||
|
"$@" -Wc,-MD
|
||||||
|
else
|
||||||
|
tmpdepfile1="$dir$base.o.d"
|
||||||
|
tmpdepfile2="$dir$base.d"
|
||||||
|
"$@" -MD
|
||||||
|
fi
|
||||||
|
|
||||||
|
stat=$?
|
||||||
|
if test $stat -eq 0; then :
|
||||||
|
else
|
||||||
|
rm -f "$tmpdepfile1" "$tmpdepfile2"
|
||||||
|
exit $stat
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -f "$tmpdepfile1"; then
|
||||||
|
tmpdepfile="$tmpdepfile1"
|
||||||
|
else
|
||||||
|
tmpdepfile="$tmpdepfile2"
|
||||||
|
fi
|
||||||
|
if test -f "$tmpdepfile"; then
|
||||||
|
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
|
||||||
|
# That's a tab and a space in the [].
|
||||||
|
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
|
||||||
|
else
|
||||||
|
echo "#dummy" > "$depfile"
|
||||||
|
fi
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
#nosideeffect)
|
||||||
|
# This comment above is used by automake to tell side-effect
|
||||||
|
# dependency tracking mechanisms from slower ones.
|
||||||
|
|
||||||
|
dashmstdout)
|
||||||
|
# Important note: in order to support this mode, a compiler *must*
|
||||||
|
# always write the preprocessed file to stdout, regardless of -o.
|
||||||
|
"$@" || exit $?
|
||||||
|
|
||||||
|
# Remove the call to Libtool.
|
||||||
|
if test "$libtool" = yes; then
|
||||||
|
while test $1 != '--mode=compile'; do
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
shift
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Remove `-o $object'.
|
||||||
|
IFS=" "
|
||||||
|
for arg
|
||||||
|
do
|
||||||
|
case $arg in
|
||||||
|
-o)
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
$object)
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
set fnord "$@" "$arg"
|
||||||
|
shift # fnord
|
||||||
|
shift # $arg
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
test -z "$dashmflag" && dashmflag=-M
|
||||||
|
# Require at least two characters before searching for `:'
|
||||||
|
# in the target name. This is to cope with DOS-style filenames:
|
||||||
|
# a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
|
||||||
|
"$@" $dashmflag |
|
||||||
|
sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
|
||||||
|
rm -f "$depfile"
|
||||||
|
cat < "$tmpdepfile" > "$depfile"
|
||||||
|
tr ' ' '
|
||||||
|
' < "$tmpdepfile" | \
|
||||||
|
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||||
|
## correctly. Breaking it into two sed invocations is a workaround.
|
||||||
|
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
dashXmstdout)
|
||||||
|
# This case only exists to satisfy depend.m4. It is never actually
|
||||||
|
# run, as this mode is specially recognized in the preamble.
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
|
||||||
|
makedepend)
|
||||||
|
"$@" || exit $?
|
||||||
|
# Remove any Libtool call
|
||||||
|
if test "$libtool" = yes; then
|
||||||
|
while test $1 != '--mode=compile'; do
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
shift
|
||||||
|
fi
|
||||||
|
# X makedepend
|
||||||
|
shift
|
||||||
|
cleared=no
|
||||||
|
for arg in "$@"; do
|
||||||
|
case $cleared in
|
||||||
|
no)
|
||||||
|
set ""; shift
|
||||||
|
cleared=yes ;;
|
||||||
|
esac
|
||||||
|
case "$arg" in
|
||||||
|
-D*|-I*)
|
||||||
|
set fnord "$@" "$arg"; shift ;;
|
||||||
|
# Strip any option that makedepend may not understand. Remove
|
||||||
|
# the object too, otherwise makedepend will parse it as a source file.
|
||||||
|
-*|$object)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
set fnord "$@" "$arg"; shift ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
obj_suffix="`echo $object | sed 's/^.*\././'`"
|
||||||
|
touch "$tmpdepfile"
|
||||||
|
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
|
||||||
|
rm -f "$depfile"
|
||||||
|
cat < "$tmpdepfile" > "$depfile"
|
||||||
|
sed '1,2d' "$tmpdepfile" | tr ' ' '
|
||||||
|
' | \
|
||||||
|
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||||
|
## correctly. Breaking it into two sed invocations is a workaround.
|
||||||
|
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||||
|
rm -f "$tmpdepfile" "$tmpdepfile".bak
|
||||||
|
;;
|
||||||
|
|
||||||
|
cpp)
|
||||||
|
# Important note: in order to support this mode, a compiler *must*
|
||||||
|
# always write the preprocessed file to stdout.
|
||||||
|
"$@" || exit $?
|
||||||
|
|
||||||
|
# Remove the call to Libtool.
|
||||||
|
if test "$libtool" = yes; then
|
||||||
|
while test $1 != '--mode=compile'; do
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
shift
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Remove `-o $object'.
|
||||||
|
IFS=" "
|
||||||
|
for arg
|
||||||
|
do
|
||||||
|
case $arg in
|
||||||
|
-o)
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
$object)
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
set fnord "$@" "$arg"
|
||||||
|
shift # fnord
|
||||||
|
shift # $arg
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
"$@" -E |
|
||||||
|
sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
|
||||||
|
sed '$ s: \\$::' > "$tmpdepfile"
|
||||||
|
rm -f "$depfile"
|
||||||
|
echo "$object : \\" > "$depfile"
|
||||||
|
cat < "$tmpdepfile" >> "$depfile"
|
||||||
|
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
msvisualcpp)
|
||||||
|
# Important note: in order to support this mode, a compiler *must*
|
||||||
|
# always write the preprocessed file to stdout, regardless of -o,
|
||||||
|
# because we must use -o when running libtool.
|
||||||
|
"$@" || exit $?
|
||||||
|
IFS=" "
|
||||||
|
for arg
|
||||||
|
do
|
||||||
|
case "$arg" in
|
||||||
|
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
|
||||||
|
set fnord "$@"
|
||||||
|
shift
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
set fnord "$@" "$arg"
|
||||||
|
shift
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
"$@" -E |
|
||||||
|
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
|
||||||
|
rm -f "$depfile"
|
||||||
|
echo "$object : \\" > "$depfile"
|
||||||
|
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
|
||||||
|
echo " " >> "$depfile"
|
||||||
|
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
|
||||||
|
rm -f "$tmpdepfile"
|
||||||
|
;;
|
||||||
|
|
||||||
|
none)
|
||||||
|
exec "$@"
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
echo "Unknown depmode $depmode" 1>&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
exit 0
|
13
doc/Makefile.am
Normal file
13
doc/Makefile.am
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
MAKEINFO = case $@ in \
|
||||||
|
*.info) echo " INFO $@";; \
|
||||||
|
*.html) echo " HTML $@";; \
|
||||||
|
esac && @MAKEINFO@
|
||||||
|
TEXI2DVI = && case $@ in \
|
||||||
|
*.dvi) echo " DVI $@";; \
|
||||||
|
*.pdf) echo " PDF $@";; \
|
||||||
|
esac && texi2dvi --quiet
|
||||||
|
DVIPS = echo " PS $@" && dvips -q
|
||||||
|
|
||||||
|
info_TEXINFOS = libcfu.texi
|
||||||
|
|
||||||
|
.SILENT:
|
461
doc/Makefile.in
Normal file
461
doc/Makefile.in
Normal file
@ -0,0 +1,461 @@
|
|||||||
|
# Makefile.in generated by automake 1.9.2 from Makefile.am.
|
||||||
|
# @configure_input@
|
||||||
|
|
||||||
|
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||||
|
# 2003, 2004 Free Software Foundation, Inc.
|
||||||
|
# This Makefile.in is free software; the Free Software Foundation
|
||||||
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||||
|
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
# PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
@SET_MAKE@
|
||||||
|
srcdir = @srcdir@
|
||||||
|
top_srcdir = @top_srcdir@
|
||||||
|
VPATH = @srcdir@
|
||||||
|
pkgdatadir = $(datadir)/@PACKAGE@
|
||||||
|
pkglibdir = $(libdir)/@PACKAGE@
|
||||||
|
pkgincludedir = $(includedir)/@PACKAGE@
|
||||||
|
top_builddir = ..
|
||||||
|
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||||
|
INSTALL = @INSTALL@
|
||||||
|
install_sh_DATA = $(install_sh) -c -m 644
|
||||||
|
install_sh_PROGRAM = $(install_sh) -c
|
||||||
|
install_sh_SCRIPT = $(install_sh) -c
|
||||||
|
INSTALL_HEADER = $(INSTALL_DATA)
|
||||||
|
transform = $(program_transform_name)
|
||||||
|
NORMAL_INSTALL = :
|
||||||
|
PRE_INSTALL = :
|
||||||
|
POST_INSTALL = :
|
||||||
|
NORMAL_UNINSTALL = :
|
||||||
|
PRE_UNINSTALL = :
|
||||||
|
POST_UNINSTALL = :
|
||||||
|
subdir = doc
|
||||||
|
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
|
||||||
|
$(srcdir)/stamp-vti $(srcdir)/version.texi mdate-sh \
|
||||||
|
texinfo.tex
|
||||||
|
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||||
|
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
|
||||||
|
$(top_srcdir)/configure.ac
|
||||||
|
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||||
|
$(ACLOCAL_M4)
|
||||||
|
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||||
|
CONFIG_CLEAN_FILES =
|
||||||
|
SOURCES =
|
||||||
|
DIST_SOURCES =
|
||||||
|
INFO_DEPS = $(srcdir)/libcfu.info
|
||||||
|
am__TEXINFO_TEX_DIR = $(srcdir)
|
||||||
|
DVIS = libcfu.dvi
|
||||||
|
PDFS = libcfu.pdf
|
||||||
|
PSS = libcfu.ps
|
||||||
|
HTMLS = libcfu.html
|
||||||
|
TEXINFOS = libcfu.texi
|
||||||
|
TEXI2PDF = $(TEXI2DVI) --pdf --batch
|
||||||
|
MAKEINFOHTML = $(MAKEINFO) --html
|
||||||
|
AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS)
|
||||||
|
am__installdirs = "$(DESTDIR)$(infodir)"
|
||||||
|
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||||
|
ACLOCAL = @ACLOCAL@
|
||||||
|
AMDEP_FALSE = @AMDEP_FALSE@
|
||||||
|
AMDEP_TRUE = @AMDEP_TRUE@
|
||||||
|
AMTAR = @AMTAR@
|
||||||
|
AUTOCONF = @AUTOCONF@
|
||||||
|
AUTOHEADER = @AUTOHEADER@
|
||||||
|
AUTOMAKE = @AUTOMAKE@
|
||||||
|
AWK = @AWK@
|
||||||
|
CC = @CC@
|
||||||
|
CCDEPMODE = @CCDEPMODE@
|
||||||
|
CFLAGS = @CFLAGS@
|
||||||
|
CPP = @CPP@
|
||||||
|
CPPFLAGS = @CPPFLAGS@
|
||||||
|
CYGPATH_W = @CYGPATH_W@
|
||||||
|
DEBUG_FALSE = @DEBUG_FALSE@
|
||||||
|
DEBUG_TRUE = @DEBUG_TRUE@
|
||||||
|
DEFS = @DEFS@
|
||||||
|
DEPDIR = @DEPDIR@
|
||||||
|
ECHO_C = @ECHO_C@
|
||||||
|
ECHO_N = @ECHO_N@
|
||||||
|
ECHO_T = @ECHO_T@
|
||||||
|
EGREP = @EGREP@
|
||||||
|
EXEEXT = @EXEEXT@
|
||||||
|
INSTALL_DATA = @INSTALL_DATA@
|
||||||
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||||
|
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||||
|
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||||
|
LDFLAGS = @LDFLAGS@
|
||||||
|
LIBCFU_TYPE_u_int = @LIBCFU_TYPE_u_int@
|
||||||
|
LIBOBJS = @LIBOBJS@
|
||||||
|
LIBS = @LIBS@
|
||||||
|
LTLIBOBJS = @LTLIBOBJS@
|
||||||
|
MAKEINFO = case $@ in \
|
||||||
|
*.info) echo " INFO $@";; \
|
||||||
|
*.html) echo " HTML $@";; \
|
||||||
|
esac && @MAKEINFO@
|
||||||
|
|
||||||
|
OBJEXT = @OBJEXT@
|
||||||
|
PACKAGE = @PACKAGE@
|
||||||
|
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||||
|
PACKAGE_NAME = @PACKAGE_NAME@
|
||||||
|
PACKAGE_STRING = @PACKAGE_STRING@
|
||||||
|
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||||
|
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||||
|
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||||
|
RANLIB = @RANLIB@
|
||||||
|
SET_MAKE = @SET_MAKE@
|
||||||
|
SHELL = @SHELL@
|
||||||
|
STRIP = @STRIP@
|
||||||
|
VERSION = @VERSION@
|
||||||
|
ac_ct_CC = @ac_ct_CC@
|
||||||
|
ac_ct_RANLIB = @ac_ct_RANLIB@
|
||||||
|
ac_ct_STRIP = @ac_ct_STRIP@
|
||||||
|
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||||
|
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||||
|
am__include = @am__include@
|
||||||
|
am__leading_dot = @am__leading_dot@
|
||||||
|
am__quote = @am__quote@
|
||||||
|
am__tar = @am__tar@
|
||||||
|
am__untar = @am__untar@
|
||||||
|
bindir = @bindir@
|
||||||
|
build_alias = @build_alias@
|
||||||
|
datadir = @datadir@
|
||||||
|
exec_prefix = @exec_prefix@
|
||||||
|
host_alias = @host_alias@
|
||||||
|
includedir = @includedir@
|
||||||
|
infodir = @infodir@
|
||||||
|
install_sh = @install_sh@
|
||||||
|
libdir = @libdir@
|
||||||
|
libexecdir = @libexecdir@
|
||||||
|
localstatedir = @localstatedir@
|
||||||
|
mandir = @mandir@
|
||||||
|
mkdir_p = @mkdir_p@
|
||||||
|
oldincludedir = @oldincludedir@
|
||||||
|
prefix = @prefix@
|
||||||
|
program_transform_name = @program_transform_name@
|
||||||
|
sbindir = @sbindir@
|
||||||
|
sharedstatedir = @sharedstatedir@
|
||||||
|
sysconfdir = @sysconfdir@
|
||||||
|
target_alias = @target_alias@
|
||||||
|
TEXI2DVI = && case $@ in \
|
||||||
|
*.dvi) echo " DVI $@";; \
|
||||||
|
*.pdf) echo " PDF $@";; \
|
||||||
|
esac && texi2dvi --quiet
|
||||||
|
|
||||||
|
DVIPS = echo " PS $@" && dvips -q
|
||||||
|
info_TEXINFOS = libcfu.texi
|
||||||
|
all: all-am
|
||||||
|
|
||||||
|
.SUFFIXES:
|
||||||
|
.SUFFIXES: .dvi .html .info .pdf .ps .texi
|
||||||
|
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||||
|
@for dep in $?; do \
|
||||||
|
case '$(am__configure_deps)' in \
|
||||||
|
*$$dep*) \
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||||
|
&& exit 0; \
|
||||||
|
exit 1;; \
|
||||||
|
esac; \
|
||||||
|
done; \
|
||||||
|
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \
|
||||||
|
cd $(top_srcdir) && \
|
||||||
|
$(AUTOMAKE) --gnu doc/Makefile
|
||||||
|
.PRECIOUS: Makefile
|
||||||
|
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||||
|
@case '$?' in \
|
||||||
|
*config.status*) \
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||||
|
*) \
|
||||||
|
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||||
|
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||||
|
esac;
|
||||||
|
|
||||||
|
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
|
|
||||||
|
$(top_srcdir)/configure: $(am__configure_deps)
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
|
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
|
|
||||||
|
.texi.info:
|
||||||
|
restore=: && backupdir="$(am__leading_dot)am$$$$" && \
|
||||||
|
am__cwd=`pwd` && cd $(srcdir) && \
|
||||||
|
rm -rf $$backupdir && mkdir $$backupdir && \
|
||||||
|
for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \
|
||||||
|
if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \
|
||||||
|
done; \
|
||||||
|
cd "$$am__cwd"; \
|
||||||
|
if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
|
||||||
|
-o $@ $<; \
|
||||||
|
then \
|
||||||
|
rc=0; \
|
||||||
|
cd $(srcdir); \
|
||||||
|
else \
|
||||||
|
rc=$$?; \
|
||||||
|
cd $(srcdir) && \
|
||||||
|
$$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \
|
||||||
|
fi; \
|
||||||
|
rm -rf $$backupdir; exit $$rc
|
||||||
|
|
||||||
|
.texi.dvi:
|
||||||
|
TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
|
||||||
|
MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
|
||||||
|
$(TEXI2DVI) $<
|
||||||
|
|
||||||
|
.texi.pdf:
|
||||||
|
TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
|
||||||
|
MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
|
||||||
|
$(TEXI2PDF) $<
|
||||||
|
|
||||||
|
.texi.html:
|
||||||
|
rm -rf $(@:.html=.htp)
|
||||||
|
if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
|
||||||
|
-o $(@:.html=.htp) $<; \
|
||||||
|
then \
|
||||||
|
rm -rf $@; \
|
||||||
|
if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
|
||||||
|
mv $(@:.html=) $@; else mv $(@:.html=.htp) $@; fi; \
|
||||||
|
else \
|
||||||
|
if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
|
||||||
|
rm -rf $(@:.html=); else rm -Rf $(@:.html=.htp) $@; fi; \
|
||||||
|
exit 1; \
|
||||||
|
fi
|
||||||
|
$(srcdir)/libcfu.info: libcfu.texi $(srcdir)/version.texi
|
||||||
|
libcfu.dvi: libcfu.texi $(srcdir)/version.texi
|
||||||
|
libcfu.pdf: libcfu.texi $(srcdir)/version.texi
|
||||||
|
libcfu.html: libcfu.texi $(srcdir)/version.texi
|
||||||
|
$(srcdir)/version.texi: $(srcdir)/stamp-vti
|
||||||
|
$(srcdir)/stamp-vti: libcfu.texi $(top_srcdir)/configure
|
||||||
|
@(dir=.; test -f ./libcfu.texi || dir=$(srcdir); \
|
||||||
|
set `$(SHELL) $(srcdir)/mdate-sh $$dir/libcfu.texi`; \
|
||||||
|
echo "@set UPDATED $$1 $$2 $$3"; \
|
||||||
|
echo "@set UPDATED-MONTH $$2 $$3"; \
|
||||||
|
echo "@set EDITION $(VERSION)"; \
|
||||||
|
echo "@set VERSION $(VERSION)") > vti.tmp
|
||||||
|
@cmp -s vti.tmp $(srcdir)/version.texi \
|
||||||
|
|| (echo "Updating $(srcdir)/version.texi"; \
|
||||||
|
cp vti.tmp $(srcdir)/version.texi)
|
||||||
|
-@rm -f vti.tmp
|
||||||
|
@cp $(srcdir)/version.texi $@
|
||||||
|
|
||||||
|
mostlyclean-vti:
|
||||||
|
-rm -f vti.tmp
|
||||||
|
|
||||||
|
maintainer-clean-vti:
|
||||||
|
-rm -f $(srcdir)/stamp-vti $(srcdir)/version.texi
|
||||||
|
.dvi.ps:
|
||||||
|
$(DVIPS) -o $@ $<
|
||||||
|
|
||||||
|
uninstall-info-am:
|
||||||
|
$(PRE_UNINSTALL)
|
||||||
|
@if (install-info --version && \
|
||||||
|
install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
|
||||||
|
list='$(INFO_DEPS)'; \
|
||||||
|
for file in $$list; do \
|
||||||
|
relfile=`echo "$$file" | sed 's|^.*/||'`; \
|
||||||
|
echo " install-info --info-dir='$(DESTDIR)$(infodir)' --remove '$(DESTDIR)$(infodir)/$$relfile'"; \
|
||||||
|
install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$relfile"; \
|
||||||
|
done; \
|
||||||
|
else :; fi
|
||||||
|
@$(NORMAL_UNINSTALL)
|
||||||
|
@list='$(INFO_DEPS)'; \
|
||||||
|
for file in $$list; do \
|
||||||
|
relfile=`echo "$$file" | sed 's|^.*/||'`; \
|
||||||
|
relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \
|
||||||
|
(if cd "$(DESTDIR)$(infodir)"; then \
|
||||||
|
echo " rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9])"; \
|
||||||
|
rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \
|
||||||
|
else :; fi); \
|
||||||
|
done
|
||||||
|
|
||||||
|
dist-info: $(INFO_DEPS)
|
||||||
|
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||||
|
list='$(INFO_DEPS)'; \
|
||||||
|
for base in $$list; do \
|
||||||
|
case $$base in \
|
||||||
|
$(srcdir)/*) base=`echo "$$base" | sed "s|^$$srcdirstrip/||"`;; \
|
||||||
|
esac; \
|
||||||
|
if test -f $$base; then d=.; else d=$(srcdir); fi; \
|
||||||
|
for file in $$d/$$base*; do \
|
||||||
|
relfile=`expr "$$file" : "$$d/\(.*\)"`; \
|
||||||
|
test -f $(distdir)/$$relfile || \
|
||||||
|
cp -p $$file $(distdir)/$$relfile; \
|
||||||
|
done; \
|
||||||
|
done
|
||||||
|
|
||||||
|
mostlyclean-aminfo:
|
||||||
|
-rm -rf libcfu.aux libcfu.cp libcfu.cps libcfu.fn libcfu.fns libcfu.ky \
|
||||||
|
libcfu.kys libcfu.log libcfu.pg libcfu.pgs libcfu.tmp \
|
||||||
|
libcfu.toc libcfu.tp libcfu.tps libcfu.vr libcfu.vrs \
|
||||||
|
libcfu.dvi libcfu.pdf libcfu.ps libcfu.html
|
||||||
|
|
||||||
|
maintainer-clean-aminfo:
|
||||||
|
@list='$(INFO_DEPS)'; for i in $$list; do \
|
||||||
|
i_i=`echo "$$i" | sed 's|\.info$$||;s|$$|.i|'`; \
|
||||||
|
echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \
|
||||||
|
rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \
|
||||||
|
done
|
||||||
|
tags: TAGS
|
||||||
|
TAGS:
|
||||||
|
|
||||||
|
ctags: CTAGS
|
||||||
|
CTAGS:
|
||||||
|
|
||||||
|
|
||||||
|
distdir: $(DISTFILES)
|
||||||
|
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||||
|
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||||
|
list='$(DISTFILES)'; for file in $$list; do \
|
||||||
|
case $$file in \
|
||||||
|
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||||
|
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||||
|
esac; \
|
||||||
|
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||||
|
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||||
|
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||||
|
dir="/$$dir"; \
|
||||||
|
$(mkdir_p) "$(distdir)$$dir"; \
|
||||||
|
else \
|
||||||
|
dir=''; \
|
||||||
|
fi; \
|
||||||
|
if test -d $$d/$$file; then \
|
||||||
|
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||||
|
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||||
|
fi; \
|
||||||
|
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||||
|
else \
|
||||||
|
test -f $(distdir)/$$file \
|
||||||
|
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||||
|
|| exit 1; \
|
||||||
|
fi; \
|
||||||
|
done
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) \
|
||||||
|
top_distdir="$(top_distdir)" distdir="$(distdir)" \
|
||||||
|
dist-info
|
||||||
|
check-am: all-am
|
||||||
|
check: check-am
|
||||||
|
all-am: Makefile $(INFO_DEPS)
|
||||||
|
installdirs:
|
||||||
|
for dir in "$(DESTDIR)$(infodir)"; do \
|
||||||
|
test -z "$$dir" || $(mkdir_p) "$$dir"; \
|
||||||
|
done
|
||||||
|
install: install-am
|
||||||
|
install-exec: install-exec-am
|
||||||
|
install-data: install-data-am
|
||||||
|
uninstall: uninstall-am
|
||||||
|
|
||||||
|
install-am: all-am
|
||||||
|
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||||
|
|
||||||
|
installcheck: installcheck-am
|
||||||
|
install-strip:
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||||
|
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||||
|
`test -z '$(STRIP)' || \
|
||||||
|
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||||
|
mostlyclean-generic:
|
||||||
|
|
||||||
|
clean-generic:
|
||||||
|
|
||||||
|
distclean-generic:
|
||||||
|
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||||
|
|
||||||
|
maintainer-clean-generic:
|
||||||
|
@echo "This command is intended for maintainers to use"
|
||||||
|
@echo "it deletes files that may require special tools to rebuild."
|
||||||
|
clean: clean-am
|
||||||
|
|
||||||
|
clean-am: clean-generic mostlyclean-am
|
||||||
|
|
||||||
|
distclean: distclean-am
|
||||||
|
-rm -f Makefile
|
||||||
|
distclean-am: clean-am distclean-generic
|
||||||
|
|
||||||
|
dvi: dvi-am
|
||||||
|
|
||||||
|
dvi-am: $(DVIS)
|
||||||
|
|
||||||
|
html: html-am
|
||||||
|
|
||||||
|
html-am: $(HTMLS)
|
||||||
|
|
||||||
|
info: info-am
|
||||||
|
|
||||||
|
info-am: $(INFO_DEPS)
|
||||||
|
|
||||||
|
install-data-am: install-info-am
|
||||||
|
|
||||||
|
install-exec-am:
|
||||||
|
|
||||||
|
install-info: install-info-am
|
||||||
|
|
||||||
|
install-info-am: $(INFO_DEPS)
|
||||||
|
@$(NORMAL_INSTALL)
|
||||||
|
test -z "$(infodir)" || $(mkdir_p) "$(DESTDIR)$(infodir)"
|
||||||
|
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||||
|
list='$(INFO_DEPS)'; \
|
||||||
|
for file in $$list; do \
|
||||||
|
case $$file in \
|
||||||
|
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||||
|
esac; \
|
||||||
|
if test -f $$file; then d=.; else d=$(srcdir); fi; \
|
||||||
|
file_i=`echo "$$file" | sed 's|\.info$$||;s|$$|.i|'`; \
|
||||||
|
for ifile in $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9] \
|
||||||
|
$$d/$$file_i[0-9] $$d/$$file_i[0-9][0-9] ; do \
|
||||||
|
if test -f $$ifile; then \
|
||||||
|
relfile=`echo "$$ifile" | sed 's|^.*/||'`; \
|
||||||
|
echo " $(INSTALL_DATA) '$$ifile' '$(DESTDIR)$(infodir)/$$relfile'"; \
|
||||||
|
$(INSTALL_DATA) "$$ifile" "$(DESTDIR)$(infodir)/$$relfile"; \
|
||||||
|
else : ; fi; \
|
||||||
|
done; \
|
||||||
|
done
|
||||||
|
@$(POST_INSTALL)
|
||||||
|
@if (install-info --version && \
|
||||||
|
install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
|
||||||
|
list='$(INFO_DEPS)'; \
|
||||||
|
for file in $$list; do \
|
||||||
|
relfile=`echo "$$file" | sed 's|^.*/||'`; \
|
||||||
|
echo " install-info --info-dir='$(DESTDIR)$(infodir)' '$(DESTDIR)$(infodir)/$$relfile'";\
|
||||||
|
install-info --info-dir="$(DESTDIR)$(infodir)" "$(DESTDIR)$(infodir)/$$relfile" || :;\
|
||||||
|
done; \
|
||||||
|
else : ; fi
|
||||||
|
install-man:
|
||||||
|
|
||||||
|
installcheck-am:
|
||||||
|
|
||||||
|
maintainer-clean: maintainer-clean-am
|
||||||
|
-rm -f Makefile
|
||||||
|
maintainer-clean-am: distclean-am maintainer-clean-aminfo \
|
||||||
|
maintainer-clean-generic maintainer-clean-vti
|
||||||
|
|
||||||
|
mostlyclean: mostlyclean-am
|
||||||
|
|
||||||
|
mostlyclean-am: mostlyclean-aminfo mostlyclean-generic mostlyclean-vti
|
||||||
|
|
||||||
|
pdf: pdf-am
|
||||||
|
|
||||||
|
pdf-am: $(PDFS)
|
||||||
|
|
||||||
|
ps: ps-am
|
||||||
|
|
||||||
|
ps-am: $(PSS)
|
||||||
|
|
||||||
|
uninstall-am: uninstall-info-am
|
||||||
|
|
||||||
|
.PHONY: all all-am check check-am clean clean-generic dist-info \
|
||||||
|
distclean distclean-generic distdir dvi dvi-am html html-am \
|
||||||
|
info info-am install install-am install-data install-data-am \
|
||||||
|
install-exec install-exec-am install-info install-info-am \
|
||||||
|
install-man install-strip installcheck installcheck-am \
|
||||||
|
installdirs maintainer-clean maintainer-clean-aminfo \
|
||||||
|
maintainer-clean-generic maintainer-clean-vti mostlyclean \
|
||||||
|
mostlyclean-aminfo mostlyclean-generic mostlyclean-vti pdf \
|
||||||
|
pdf-am ps ps-am uninstall uninstall-am uninstall-info-am
|
||||||
|
|
||||||
|
|
||||||
|
.SILENT:
|
||||||
|
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||||
|
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||||
|
.NOEXPORT:
|
956
doc/libcfu.info
Normal file
956
doc/libcfu.info
Normal file
@ -0,0 +1,956 @@
|
|||||||
|
This is libcfu.info, produced by makeinfo version 4.7 from libcfu.texi.
|
||||||
|
|
||||||
|
Copyright (C) 2005 Don Owens
|
||||||
|
|
||||||
|
This code is released under the BSD license:
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are
|
||||||
|
met:
|
||||||
|
|
||||||
|
* Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
* Redistributions in binary form must reproduce the above
|
||||||
|
copyright notice, this list of conditions and the following
|
||||||
|
disclaimer in the documentation and/or other materials provided with
|
||||||
|
the distribution.
|
||||||
|
|
||||||
|
* Neither the name of the author nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived from
|
||||||
|
this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||||
|
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||||
|
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||||
|
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||||
|
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
INFO-DIR-SECTION Libraries
|
||||||
|
START-INFO-DIR-ENTRY
|
||||||
|
* Libcfu: (libcfu). The cfu library.
|
||||||
|
END-INFO-DIR-ENTRY
|
||||||
|
|
||||||
|
This manual describes the external interface to libcfu version
|
||||||
|
0.03
|
||||||
|
|
||||||
|
Copyright (C) 2005 Don Owens All rights reserved.
|
||||||
|
|
||||||
|
This code is released under the BSD license:
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are
|
||||||
|
met:
|
||||||
|
|
||||||
|
* Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
* Redistributions in binary form must reproduce the above
|
||||||
|
copyright notice, this list of conditions and the following
|
||||||
|
disclaimer in the documentation and/or other materials provided with
|
||||||
|
the distribution.
|
||||||
|
|
||||||
|
* Neither the name of the author nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived from
|
||||||
|
this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||||
|
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||||
|
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||||
|
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||||
|
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
|
||||||
|
File: libcfu.info, Node: Top, Next: Data structures, Prev: (dir), Up: (dir)
|
||||||
|
|
||||||
|
This manual describes the interface to libcfu version 0.03
|
||||||
|
|
||||||
|
Copyright (C) 2005 Don Owens
|
||||||
|
|
||||||
|
* Menu:
|
||||||
|
|
||||||
|
* Data structures::
|
||||||
|
* Conf:: For reading configuration files
|
||||||
|
* Options:: For parsing command-line arguments
|
||||||
|
* Thread queue:: For queueing up requests for a separate thread
|
||||||
|
* Timer:: An easy to use timer
|
||||||
|
|
||||||
|
* License:: License under which libcfu is distributed
|
||||||
|
|
||||||
|
* Concept index::
|
||||||
|
* Function index::
|
||||||
|
|
||||||
|
|
||||||
|
File: libcfu.info, Node: Data structures, Prev: Top, Up: Top
|
||||||
|
|
||||||
|
1 Data structures
|
||||||
|
*****************
|
||||||
|
|
||||||
|
* Menu:
|
||||||
|
|
||||||
|
* Hash table:: For key/value pairs
|
||||||
|
* Linked list:: For unordered data
|
||||||
|
* Strings:: For self-extending strings
|
||||||
|
|
||||||
|
|
||||||
|
File: libcfu.info, Node: Hash table, Next: Linked list, Prev: Data structures, Up: Data structures
|
||||||
|
|
||||||
|
1.1 Hash table
|
||||||
|
==============
|
||||||
|
|
||||||
|
-- Special Form: typedef u_int32_t (*cfuhash_function_t)(const void *
|
||||||
|
KEY, size_t LENGTH)
|
||||||
|
Prototype for a pointer to a hashing function.
|
||||||
|
|
||||||
|
-- Special Form: typedef void (*cfuhash_free_fn_t)(void * DATA)
|
||||||
|
Prototype for a pointer to a free function.
|
||||||
|
|
||||||
|
-- Special Form: typedef int (*cfuhash_remove_fn_t)(void * KEY, size_t
|
||||||
|
KEY_SIZE, void * DATA, size_t DATA_SIZE, void * ARG)
|
||||||
|
Prototype for a pointer to a function that determines whether or
|
||||||
|
not to remove an entry from the hash.
|
||||||
|
|
||||||
|
-- Special Form: typedef int (*cfuhash_foreach_fn_t)(void * KEY,
|
||||||
|
size_t KEY_SIZE, void * DATA, size_t DATA_SIZE, void * ARG)
|
||||||
|
Prototype for a pointer to a function to be called foreach
|
||||||
|
key/value pair in the hash by cfuhash_foreach(). The return
|
||||||
|
value should normally be zero. A non-zero return value means to
|
||||||
|
stop iterating over the key/value pairs.
|
||||||
|
|
||||||
|
-- Function: cfuhash_table_t * cfuhash_new (size_t SIZE, u_int32_t
|
||||||
|
FLAGS)
|
||||||
|
Creates a new hash table.
|
||||||
|
|
||||||
|
-- Function: cfuhash_table_t * cfuhash_new_with_initial_size (size_t
|
||||||
|
SIZE)
|
||||||
|
Creates a new hash table with the specified size (number of
|
||||||
|
buckets).
|
||||||
|
|
||||||
|
|
||||||
|
-- Function: cfuhash_table_t * cfuhash_new_with_flags (u_int32_t FLAGS)
|
||||||
|
Creates a new hash table with the specified flags. Pass zero for
|
||||||
|
flags if you want the defaults.
|
||||||
|
|
||||||
|
-- Function: cfuhash_table_t * cfuhash_new_with_free_fn (size_t SIZE,
|
||||||
|
u_int32_t FLAGS, cfuhash_free_fn_t FF)
|
||||||
|
Same as cfuhash_new() except automatically calls
|
||||||
|
cfuhash_set_free_fn().
|
||||||
|
|
||||||
|
-- Function: int cfuhash_copy (cfuhash_table_t * SRC, cfuhash_table_t
|
||||||
|
* DST)
|
||||||
|
Copies entries in src to dst
|
||||||
|
|
||||||
|
-- Function: cfuhash_table_t * cfuhash_merge (cfuhash_table_t * HT1,
|
||||||
|
cfuhash_table_t * HT2, u_int32_t FLAGS)
|
||||||
|
Returns a new hash containing entries from both hash tables. For
|
||||||
|
any entries with the same key, the one from ht2 wins.
|
||||||
|
|
||||||
|
|
||||||
|
-- Function: int cfuhash_set_hash_function (cfuhash_table_t * HT,
|
||||||
|
cfuhash_function_t HF)
|
||||||
|
Sets the hashing function to use when computing which bucket to add
|
||||||
|
entries to. It should return a 32-bit unsigned integer. By
|
||||||
|
default, Perl's hashing algorithm is used.
|
||||||
|
|
||||||
|
|
||||||
|
-- Function: int cfuhash_set_thresholds (cfuhash_table_t * HT, float
|
||||||
|
LOW, float HIGH)
|
||||||
|
Sets the thresholds for when to rehash. The ratio
|
||||||
|
num_entries/buckets is compared against low and high. If it is
|
||||||
|
below 'low' or above 'high', the hash will shrink or grow,
|
||||||
|
respectively, unless the flags say to do otherwise.
|
||||||
|
|
||||||
|
|
||||||
|
-- Function: int cfuhash_set_free_function (cfuhash_table_t * HT,
|
||||||
|
cfuhash_free_fn_t FF)
|
||||||
|
Sets the function to use when removing an entry from the hash,
|
||||||
|
i.e., when replacing an existing entry, deleting an entry, or
|
||||||
|
clearing the hash. It is passed the value of the entry as a void
|
||||||
|
*.
|
||||||
|
|
||||||
|
|
||||||
|
-- Function: u_int32_t cfuhash_get_flags (cfuhash_table_t * HT)
|
||||||
|
Returns the hash's flags. See below for flag definitions.
|
||||||
|
|
||||||
|
-- Function: u_int32_t cfuhash_set_flag (cfuhash_table_t * HT,
|
||||||
|
u_int32_t FLAG)
|
||||||
|
Sets a flag.
|
||||||
|
|
||||||
|
-- Function: u_int32_t cfuhash_clear_flag (cfuhash_table_t * HT,
|
||||||
|
u_int32_t NEW_FLAG)
|
||||||
|
Clears a flag.
|
||||||
|
|
||||||
|
-- Function: int cfuhash_get_data (cfuhash_table_t * HT, const void *
|
||||||
|
KEY, size_t KEY_SIZE, void ** DATA, size_t * DATA_SIZE)
|
||||||
|
Returns the value for the entry with given key. If key_size is -1,
|
||||||
|
key is assumed to be a null-terminated string. If data_size is
|
||||||
|
not NULL, the size of the value is placed into data_size.
|
||||||
|
|
||||||
|
|
||||||
|
-- Function: int cfuhash_exists_data (cfuhash_table_t * HT, const void
|
||||||
|
* KEY, size_t KEY_SIZE)
|
||||||
|
Returns 1 if an entry with the given key exists in the hash, 0
|
||||||
|
otherwise.
|
||||||
|
|
||||||
|
-- Function: int cfuhash_put_data (cfuhash_table_t * HT, const void *
|
||||||
|
KEY, size_t KEY_SIZE, void * DATA, size_t DATA_SIZE, void **
|
||||||
|
R)
|
||||||
|
Inserts the given data value into the hash and associates it with
|
||||||
|
key. If key_size is -1, key is assumed to be a null-terminated
|
||||||
|
string. If data_size is -1, it is assumed to be a null-terminated
|
||||||
|
string (it's length will be calculated using strlen). If
|
||||||
|
data_size is zero, it will be returned as zero when the value is
|
||||||
|
requested.
|
||||||
|
|
||||||
|
|
||||||
|
-- Function: void cfuhash_clear (cfuhash_table_t * HT)
|
||||||
|
Clears the hash table (deletes all entries).
|
||||||
|
|
||||||
|
-- Function: void * cfuhash_delete_data (cfuhash_table_t * HT, const
|
||||||
|
void * KEY, size_t KEY_SIZE)
|
||||||
|
Deletes the entry in the hash associated with key. If the entry
|
||||||
|
existed, it's value will be returned.
|
||||||
|
|
||||||
|
|
||||||
|
-- Function: void **cfuhash_keys_data (cfuhash_table_t * HT, size_t *
|
||||||
|
NUM_KEYS, size_t ** KEY_SIZES, int FAST)
|
||||||
|
Returns all the keys from the hash. The number of keys is placed
|
||||||
|
into the value pointed to by num_keys. If key_sizes is not NULL,
|
||||||
|
it will be set to an array of key sizes. If fast is zero, copies
|
||||||
|
of the keys are returned. Otherwise, pointers to the real keys
|
||||||
|
will be returned.
|
||||||
|
|
||||||
|
|
||||||
|
-- Function: int cfuhash_each_data (cfuhash_table_t * HT, void ** KEY,
|
||||||
|
size_t * KEY_SIZE, void ** DATA, size_t * DATA_SIZE)
|
||||||
|
Initializes a loop over all the key/value pairs in the hash. It
|
||||||
|
returns the first key/value pair (see cfuhash_next_data()). 1 is
|
||||||
|
returned if there are any entries in the hash. 0 is returned
|
||||||
|
otherwise.
|
||||||
|
|
||||||
|
|
||||||
|
-- Function: int cfuhash_next_data (cfuhash_table_t * HT, void ** KEY,
|
||||||
|
size_t * KEY_SIZE, void ** DATA, size_t * DATA_SIZE)
|
||||||
|
Gets the next key/value pair from the hash. You must initialize
|
||||||
|
the loop using cfuhash_each_data() before calling this function.
|
||||||
|
If a entry is left to return, 1 is returned from the function. 0
|
||||||
|
is returned if there are no more entries in the hash.
|
||||||
|
|
||||||
|
|
||||||
|
-- Function: size_t cfuhash_foreach_remove (cfuhash_table_t * HT,
|
||||||
|
cfuhash_remove_fn_t R_FN, cfuhash_free_fn_t FF, void * ARG)
|
||||||
|
Iterates over the key/value pairs in the hash, passing each one
|
||||||
|
to r_fn, and removes all entries for which r_fn returns true. If
|
||||||
|
ff is not NULL, it is the passed the data to be freed. arg is
|
||||||
|
passed to r_fn.
|
||||||
|
|
||||||
|
|
||||||
|
-- Function: size_t cfuhash_foreach (cfuhash_table_t * HT,
|
||||||
|
cfuhash_foreach_fn_t FE_FN, void * ARG)
|
||||||
|
Iterates over the key/value pairs in the hash, passing each one
|
||||||
|
to fe_fn, along with arg. This locks the hash, so do not call any
|
||||||
|
operations on the hash from within fe_fn unless you really know
|
||||||
|
what you're doing.
|
||||||
|
|
||||||
|
If the return value from fe_fn() is not zero, the iteration stops.
|
||||||
|
|
||||||
|
|
||||||
|
-- Function: int cfuhash_destroy (cfuhash_table_t * HT)
|
||||||
|
Frees all resources allocated by the hash.
|
||||||
|
|
||||||
|
|
||||||
|
-- Function: int cfuhash_destroy_with_free_fn (cfuhash_table_t * HT,
|
||||||
|
cfuhash_free_fn_t FF)
|
||||||
|
Frees all resources allocated by the hash. If ff is not NULL, it
|
||||||
|
is called for each hash entry with the value of the entry passed as
|
||||||
|
its only argument. If ff is not NULL, it overrides any function
|
||||||
|
set previously with cfuhash_set_free_function().
|
||||||
|
|
||||||
|
|
||||||
|
-- Function: int cfuhash_rehash (cfuhash_table_t * HT)
|
||||||
|
Rebuild the hash to better accomodate the number of entries. See
|
||||||
|
cfuhash_set_thresholds().
|
||||||
|
|
||||||
|
|
||||||
|
-- Function: size_t cfuhash_num_entries (cfuhash_table_t * HT)
|
||||||
|
Returns the number entries in the hash.
|
||||||
|
|
||||||
|
-- Function: size_t cfuhash_num_buckets (cfuhash_table_t * HT)
|
||||||
|
Returns the number of buckets allocated for the hash.
|
||||||
|
|
||||||
|
-- Function: size_t cfuhash_num_buckets_used (cfuhash_table_t * HT)
|
||||||
|
Returns the number of buckets actually used out of the total number
|
||||||
|
allocated for the hash.
|
||||||
|
|
||||||
|
|
||||||
|
-- Function: char * cfuhash_bencode_strings (cfuhash_table_t * HT)
|
||||||
|
Assumes all the keys and values are null-terminated strings and
|
||||||
|
returns a bencoded string representing the hash (see
|
||||||
|
http://www.bittorrent.com/protocol.html)
|
||||||
|
|
||||||
|
|
||||||
|
-- Function: int cfuhash_lock (cfuhash_table_t * HT)
|
||||||
|
Locks the hash. Use this with the each and next functions for
|
||||||
|
concurrency control. Note that the hash is locked automatically
|
||||||
|
when doing inserts and deletes, so if you lock the hash and then
|
||||||
|
try to insert something into it, you may get into a deadlock,
|
||||||
|
depending on your system defaults for how mutexes work.
|
||||||
|
|
||||||
|
|
||||||
|
-- Function: int cfuhash_unlock (cfuhash_table_t * HT)
|
||||||
|
Unlocks the hash. Use this with the each an next functions for
|
||||||
|
concurrency control. The caveat for cfuhash_lock() also applies to
|
||||||
|
this function.
|
||||||
|
|
||||||
|
|
||||||
|
-- Function: int cfuhash_pretty_print (cfuhash_table_t * HT, FILE * FP)
|
||||||
|
Pretty print the hash's key/value pairs to the stream fp. It is
|
||||||
|
assumed that all the keys and values are null-terminated strings.
|
||||||
|
|
||||||
|
|
||||||
|
These are like the _data versions of these functions, with the
|
||||||
|
following exceptions:
|
||||||
|
|
||||||
|
1) They assume that the key provided is a null-terminated string.
|
||||||
|
|
||||||
|
2) They don't worry about the size of the data.
|
||||||
|
|
||||||
|
3) Returned keys or values are the return value of the function.
|
||||||
|
|
||||||
|
-- Function: void * cfuhash_get (cfuhash_table_t * HT, const char *
|
||||||
|
KEY)
|
||||||
|
|
||||||
|
-- Function: int cfuhash_exists (cfuhash_table_t * HT, const char *
|
||||||
|
KEY);
|
||||||
|
|
||||||
|
-- Function: void * cfuhash_put (cfuhash_table_t * HT, const char *
|
||||||
|
KEY, void * DATA);
|
||||||
|
|
||||||
|
-- Function: void * cfuhash_delete (cfuhash_table_t * HT, const char *
|
||||||
|
KEY);
|
||||||
|
|
||||||
|
-- Function: int cfuhash_each (cfuhash_table_t * HT, char ** KEY, void
|
||||||
|
** DATA);
|
||||||
|
|
||||||
|
-- Function: int cfuhash_next (cfuhash_table_t * HT, char ** KEY, void
|
||||||
|
** DATA);
|
||||||
|
|
||||||
|
-- Function: void ** cfuhash_keys (cfuhash_table_t * HT, size_t *
|
||||||
|
NUM_KEYS, int FAST);
|
||||||
|
|
||||||
|
Valid flags for cfuhash_new() or cfuhash_set_flag):
|
||||||
|
|
||||||
|
-- CFUHASH_NOCOPY_KEYS:
|
||||||
|
Don't copy the key when adding an entry to the hash table.
|
||||||
|
|
||||||
|
-- CFUHASH_NO_LOCKING:
|
||||||
|
Don't not use any mutexes. Beware that this flag makes the hash
|
||||||
|
table non thread-safe.
|
||||||
|
|
||||||
|
-- CFUHASH_FROZEN:
|
||||||
|
Do not rehash (don't grow or shrink the number of buckets in the
|
||||||
|
hash table when the thresholds are reached).
|
||||||
|
|
||||||
|
-- CFUHASH_FROZEN_UNTIL_GROWS:
|
||||||
|
Do not rehash until the upper threshold is reached the first time
|
||||||
|
(useful for preallocating a large hash to avoid rehashing while
|
||||||
|
filling it).
|
||||||
|
|
||||||
|
-- CFUHASH_FREE_DATA:
|
||||||
|
Call free() on the values when cfuhash_destroy() is called.
|
||||||
|
|
||||||
|
-- CFUHASH_IGNORE_CASE:
|
||||||
|
Treat the keys case-insensitively.
|
||||||
|
|
||||||
|
|
||||||
|
File: libcfu.info, Node: Linked list, Next: Strings, Prev: Hash table, Up: Data structures
|
||||||
|
|
||||||
|
1.2 Linked list
|
||||||
|
===============
|
||||||
|
|
||||||
|
-- Special Form: typedef int (*cfulist_foreach_fn_t)(void * DATA,
|
||||||
|
size_t DATA_SIZE, void * ARG)
|
||||||
|
Function called for each element in the list when passed to
|
||||||
|
cfulist_foreach(). A non-zero return value means to stop
|
||||||
|
iteration.
|
||||||
|
|
||||||
|
-- Special Form: typedef void * (*cfulist_map_fn_t)(void *DATA, size_t
|
||||||
|
DATA_SIZE, void *ARG, size_t *NEW_DATA_SIZE)
|
||||||
|
Function called for each element in the list when passed to
|
||||||
|
cfulist_map(). The return value is used to build a new list.
|
||||||
|
|
||||||
|
-- Special Form: typedef void (*cfulist_free_fn_t)(void * DATA)
|
||||||
|
Function called to free the data in an element.
|
||||||
|
|
||||||
|
-- Function: cfulist_t * cfulist_new ();
|
||||||
|
Returns a new list.
|
||||||
|
|
||||||
|
-- Function: size_t cfulist_num_entries (cfulist_t *LIST)
|
||||||
|
Returns the number of entries in the list.
|
||||||
|
|
||||||
|
|
||||||
|
-- Function: int cfulist_push_data (cfulist_t * LIST, void * DATA,
|
||||||
|
size_t DATA_SIZE)
|
||||||
|
Push a value onto the end of the list.
|
||||||
|
|
||||||
|
-- Function: int cfulist_pop_data (cfulist_t * LIST, void ** DATA,
|
||||||
|
size_t * DATA_SIZE)
|
||||||
|
Pop a value from the end of the list (removing it from the list).
|
||||||
|
|
||||||
|
-- Function: int cfulist_unshift_data (cfulist_t * LIST, void * DATA,
|
||||||
|
size_t DATA_SIZE)
|
||||||
|
Add a value at the beginning of the list.
|
||||||
|
|
||||||
|
-- Function: int cfulist_shift_data (cfulist_t * LIST, void ** DATA,
|
||||||
|
size_t * DATA_SIZE)
|
||||||
|
Shift a value off the beginning of the list.
|
||||||
|
|
||||||
|
-- Function: int cfulist_enqueue_data (cfulist_t * LIST, void * DATA,
|
||||||
|
size_t DATA_SIZE)
|
||||||
|
Add a value at the end of the queue (equivalent to push)
|
||||||
|
|
||||||
|
-- Function: int cfulist_dequeue_data (cfulist_t * LIST, void ** DATA,
|
||||||
|
size_t * DATA_SIZE)
|
||||||
|
Remove the value at the beginning of the list (equivalent to
|
||||||
|
shift).
|
||||||
|
|
||||||
|
-- Function: int cfulist_first_data (cfulist_t * LIST, void ** DATA,
|
||||||
|
size_t * DATA_SIZE);
|
||||||
|
Return the first entry from the list (without removing it from the
|
||||||
|
list).
|
||||||
|
|
||||||
|
-- Function: int cfulist_last_data (cfulist_t * LIST, void ** DATA,
|
||||||
|
size_t * DATA_SIZE);
|
||||||
|
Return the last entry from the list (without removing it from the
|
||||||
|
list).
|
||||||
|
|
||||||
|
-- Function: int cfulist_nth_data (cfulist_t * LIST, void ** DATA,
|
||||||
|
size_t * DATA_SIZE, size_t N);
|
||||||
|
Return the nth entry from the list (without removing it from the
|
||||||
|
list). n starts at zero.
|
||||||
|
|
||||||
|
-- Function: void cfulist_reset_each (cfulist_t * LIST);
|
||||||
|
|
||||||
|
-- Function: int cfulist_each_data (cfulist_t * LIST, void ** DATA,
|
||||||
|
size_t * DATA_SIZE);
|
||||||
|
|
||||||
|
-- Function: int cfulist_next_data (cfulist_t * LIST, void ** DATA,
|
||||||
|
size_t * DATA_SIZE);
|
||||||
|
|
||||||
|
-- Function: size_t cfulist_foreach (cfulist_t * LIST,
|
||||||
|
cfulist_foreach_fn_t FE_FN, void * ARG);
|
||||||
|
Calls fe_fn() for each element in the list. Also passes arg on each
|
||||||
|
call. Do not try to manipulate the list inside fe_fn(), as the
|
||||||
|
list will be locked.
|
||||||
|
|
||||||
|
If fe_fn() returns a non-zero value, the iteration over the
|
||||||
|
elements stops.
|
||||||
|
|
||||||
|
-- Function: cfulist_t * cfulist_map (cfulist_t *LIST,
|
||||||
|
cfulist_map_fn_t MAP_FN, void *ARG);
|
||||||
|
Creates a new list from the list passed in. Calls map_fn() on each
|
||||||
|
element in the list. The return value is placed in the
|
||||||
|
corresponding position in the new list.
|
||||||
|
|
||||||
|
-- Function: void cfulist_destroy (cfulist_t * LIST)
|
||||||
|
Free all resources used by the list.
|
||||||
|
|
||||||
|
-- Function: void cfulist_destroy (cfulist_t * LIST, cfulist_free_fn_t
|
||||||
|
FREE_FN)
|
||||||
|
Free all resources used by the list. If free_fn is not NULL, call
|
||||||
|
it for each element of the list, passing the data to it as a void
|
||||||
|
*.
|
||||||
|
|
||||||
|
When you don't care about the size of the data
|
||||||
|
|
||||||
|
-- Function: int cfulist_push (cfulist_t * LIST, void * DATA)
|
||||||
|
|
||||||
|
-- Function: void * cfulist_pop (cfulist_t * LIST);
|
||||||
|
|
||||||
|
-- Function: int cfulist_unshift (cfulist_t * LIST, void * DATA);
|
||||||
|
|
||||||
|
-- Function: void * cfulist_shift (cfulist_t * LIST);
|
||||||
|
|
||||||
|
-- Function: int cfulist_enqueue (cfulist_t * IST, void * DATA);
|
||||||
|
|
||||||
|
-- Function: void * cfulist_dequeue (cfulist_t * LIST);
|
||||||
|
|
||||||
|
Strings - assume data is a null-terminated string - size is
|
||||||
|
calculated by strlen(data) + 1
|
||||||
|
|
||||||
|
-- Function: int cfulist_push_string (cfulist_t * LIST, char * DATA)
|
||||||
|
|
||||||
|
-- Function: char * cfulist_pop_string (cfulist_t * LIST);
|
||||||
|
|
||||||
|
-- Function: int cfulist_unshift_string (cfulist_t * LIST, char *
|
||||||
|
DATA);
|
||||||
|
|
||||||
|
-- Function: char * cfulist_shift_string (cfulist_t * LIST);
|
||||||
|
|
||||||
|
-- Function: int cfulist_enqueue_string (cfulist_t * LIST, char *
|
||||||
|
DATA);
|
||||||
|
|
||||||
|
-- Function: char * cfulist_dequeue_string (cfulist_t * LIST);
|
||||||
|
|
||||||
|
-- Function: char * cfulist_join (cfulist_t * LIST, const char *
|
||||||
|
DELIMITER)
|
||||||
|
|
||||||
|
|
||||||
|
File: libcfu.info, Node: Strings, Prev: Linked list, Up: Data structures
|
||||||
|
|
||||||
|
1.3 Strings
|
||||||
|
===========
|
||||||
|
|
||||||
|
-- Function: cfustring_t * cfustring_new (size_t INITIAL_SIZE)
|
||||||
|
Returns a new String.
|
||||||
|
|
||||||
|
-- Function: cfustring_t * cfustring_new_from_string (const char *
|
||||||
|
STRING)
|
||||||
|
Returns a new String initalized with the given string.
|
||||||
|
|
||||||
|
-- Function: int cfustring_dup (cfustring_t * CFU_STR, const char *
|
||||||
|
STRING)
|
||||||
|
Overwrite anything currently in cfu_str with string.
|
||||||
|
|
||||||
|
-- Function: int cfustring_clear (cfustring_t * CFU_STR)
|
||||||
|
Truncate the string.
|
||||||
|
|
||||||
|
-- Function: int cfustring_append (cfustring_t * CFU_STR, const char *
|
||||||
|
STR)
|
||||||
|
Append str to the end of the buffer in cfu_str.
|
||||||
|
|
||||||
|
-- Function: char * cfustring_get_buffer (cfustring_t * CFU_STR)
|
||||||
|
Get the buffer used to hold the string. Do not free() it, as it is
|
||||||
|
used directly by cfustring and will be destroyed when
|
||||||
|
cfustring_destroy() is called.
|
||||||
|
|
||||||
|
|
||||||
|
-- Function: char * cfustring_get_buffer_copy (cfustring_t * CFU_STR)
|
||||||
|
Same as cfustring_get_buffer(), except return a copy of the string.
|
||||||
|
Caller is responsible for deallocating the buffer with free().
|
||||||
|
|
||||||
|
|
||||||
|
-- Function: cfustring_t ** cfustring_split (cfustring_t * CFU_STR,
|
||||||
|
size_t * NUM_STRINGS, size_t LIMIT, ...)
|
||||||
|
Split cfu_str on one or more delimiting strings, e.g.,
|
||||||
|
cfustring_split(cfu_str, 2, 0, "\r\n", "\n"). Use a limit > 0 if
|
||||||
|
you want to only get back a certain number of strings and ignore
|
||||||
|
any extra delimiters.
|
||||||
|
|
||||||
|
|
||||||
|
-- Function: char ** cfustring_split_to_c_str (cfustring_t * CFU_STR,
|
||||||
|
size_t * NUM_STRINGS, size_t LIMIT, ...)
|
||||||
|
Same as cfustring_split(), except return an array of C-strings.
|
||||||
|
Caller is responsible for deallocating the buffers.
|
||||||
|
|
||||||
|
|
||||||
|
-- Function: int cfustring_destroy (cfustring_t * CFU_STR)
|
||||||
|
Free all resources allocated by cfu_str.
|
||||||
|
|
||||||
|
-- Function: char * cfustring_dup_c_str (const char * STR)
|
||||||
|
Duplicate the C string str. Caller must free with free().
|
||||||
|
|
||||||
|
-- Function: char * cfustring_dup_c_str_n (const char * STR, size_t N)
|
||||||
|
Same as cfustring_dup_c_str(), but only copy at most n chars
|
||||||
|
|
||||||
|
-- Function: size_t cfustring_sprintf (cfustring_t * CFU_STR, const
|
||||||
|
char * FMT, ...);
|
||||||
|
Like sprintf(), but writes to a self-extending string.
|
||||||
|
|
||||||
|
-- Function: size_t cfustring_vsprintf (cfustring_t * CFU_STR, const
|
||||||
|
char * FMT, va_list AP);
|
||||||
|
Like vsprintf(), but writes to a self-extending string.
|
||||||
|
|
||||||
|
-- Function: char * cfustring_sprintf_c_str (const char * FMT, ...)
|
||||||
|
Similar to sprintf(), but allocates a C string of the appropriate
|
||||||
|
size for you and returns it.
|
||||||
|
|
||||||
|
-- Function: char ** cfustring_c_str_split (const char * C_STR, size_t
|
||||||
|
* NUM_STRINGS, size_t LIMIT, ...)
|
||||||
|
Like cfustring_split_to_c_str(), but split a char * instead of a
|
||||||
|
cfustring_t *.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
File: libcfu.info, Node: Conf, Next: Options, Prev: Top, Up: Top
|
||||||
|
|
||||||
|
2 Conf
|
||||||
|
******
|
||||||
|
|
||||||
|
This needs to be better documented.
|
||||||
|
|
||||||
|
Apache-style conf files contain directives and containers.
|
||||||
|
Directives are simple one line specifications with or without
|
||||||
|
arguments, e.g.,
|
||||||
|
|
||||||
|
Doit Expires On LoadModule my_mod modules/my_mod.so
|
||||||
|
|
||||||
|
Containers have a type and a name associated with them and they in
|
||||||
|
turn contain directives and/or containers, e.g.,
|
||||||
|
|
||||||
|
<MyContainer test1> Expires Off <DB devdb>
|
||||||
|
DBHost db.example.com DBUser
|
||||||
|
test_user </DB> </MyContainer>
|
||||||
|
|
||||||
|
Values may be quoted, e.g.
|
||||||
|
|
||||||
|
DBUser "test user"
|
||||||
|
|
||||||
|
But must be specified on a single line. To escape quotes within a
|
||||||
|
quoted string, use the '\' character.
|
||||||
|
|
||||||
|
-- Function: int cfuconf_parse_file (char * FILE_PATH, cfuconf_t **
|
||||||
|
CONF, char ** ERROR)
|
||||||
|
Parse the apache-like conf file specified by file_path, returning
|
||||||
|
a pointer to a cfuconf_t structure in conf. Returns zero on
|
||||||
|
success, less than zero on error. If an error occurs and error
|
||||||
|
is not NULL, it will be set to an error message (which must be
|
||||||
|
free()'d by the caller).
|
||||||
|
|
||||||
|
|
||||||
|
-- Function: int cfuconf_parse_buffer (char * BUFFER, cfuconf_t **
|
||||||
|
CONF, char ** ERROR)
|
||||||
|
Same as cfuconf_parse_file(), except assume the contents of the
|
||||||
|
file are already in buffer.
|
||||||
|
|
||||||
|
|
||||||
|
-- Function: void cfuconf_destroy (cfuconf_t * CONF)
|
||||||
|
Free all resources used by the cfuconf_t structure
|
||||||
|
|
||||||
|
-- Function: cfuhash_table_t * cfuconf_get_containers (cfuconf_t *
|
||||||
|
CONF)
|
||||||
|
Get a hash of containers at the top level of conf
|
||||||
|
|
||||||
|
-- Function: cfuhash_table_t * cfuconf_get_directives (cfuconf_t *
|
||||||
|
CONF)
|
||||||
|
Get a hash of directives at the to level
|
||||||
|
|
||||||
|
-- Function: int cfuconf_get_directive_one_arg (cfuconf_t * CONF, char
|
||||||
|
* DIRECTIVE, char ** RVALUE)
|
||||||
|
Get the value of the given directive, assuming there is only one
|
||||||
|
argument
|
||||||
|
|
||||||
|
-- Function: int cfuconf_get_directive_two_args (cfuconf_t * CONF,
|
||||||
|
char * DIRECTIVE, char ** RVALUE, char ** RVALUE2)
|
||||||
|
Get the value of the given directive, assuming there are two
|
||||||
|
arguments
|
||||||
|
|
||||||
|
-- Function: int cfuconf_get_directive_n_args (cfuconf_t * CONF, char
|
||||||
|
* DIRECTIVE, size_t N, ...)
|
||||||
|
Get the value of the given directives, with n arguments
|
||||||
|
|
||||||
|
|
||||||
|
File: libcfu.info, Node: Options, Next: Thread queue, Prev: Conf, Up: Top
|
||||||
|
|
||||||
|
3 Options
|
||||||
|
*********
|
||||||
|
|
||||||
|
Command-line arguments can be parsed with the following:
|
||||||
|
|
||||||
|
|
||||||
|
cfuopt_t *opt = cfuopt_new();
|
||||||
|
cfuopt_add_entry(opt, "verbose|v!", &verbose, "Verbosity", "");
|
||||||
|
cfuopt_add_entry(opt, "file|f:s", &file, "File to load", "FILE");
|
||||||
|
cfuopt_add_entry(opt, "count|c|n=i", &count, "Count to run", "COUNT");
|
||||||
|
cfuopt_add_entry(opt, "scale|s:f", &scale, "Scaling factor", "SCALE");
|
||||||
|
cfuopt_parse(opt, &argc, &argv, &error);
|
||||||
|
/* do stuff here with the options */
|
||||||
|
cfuopt_destroy(opt);
|
||||||
|
free(file);
|
||||||
|
|
||||||
|
-- Function: cfuopt_t * cfuopt_new ()
|
||||||
|
Returns a new options context.
|
||||||
|
|
||||||
|
-- Function: void cfuopt_add_entry (cfuopt_t *CONTEXT, const char
|
||||||
|
*OPT_STR, void *ARG_DATA, const char *DESCRIPTION, const char
|
||||||
|
*ARG_DESCRIPTION)
|
||||||
|
Adds to the list of known options.
|
||||||
|
|
||||||
|
-- Function: void cfuopt_parse (cfuopt_t *CONTEXT, int *ARGC, char
|
||||||
|
***ARGV, char **ERROR)
|
||||||
|
Parses the command line and modifies argc and argv to account for
|
||||||
|
left over arguments.
|
||||||
|
|
||||||
|
-- Function: char * cfuopt_get_help_str (cfuopt_t *CONTEXT)
|
||||||
|
Returns a help string built from the entries added with
|
||||||
|
cfuopt_add_entry().
|
||||||
|
|
||||||
|
-- Function: void cfuopt_destroy (cfuopt_t *CONTEXT)
|
||||||
|
Frees up resources used by the option parser.
|
||||||
|
|
||||||
|
|
||||||
|
File: libcfu.info, Node: Thread queue, Next: Timer, Prev: Options, Up: Top
|
||||||
|
|
||||||
|
4 Thread queue
|
||||||
|
**************
|
||||||
|
|
||||||
|
cfuthread_queue provides a way to serialize requests for a resource
|
||||||
|
where you want the resource to be accessed from a single thread only.
|
||||||
|
For instance, for a database connection where making calls in separate
|
||||||
|
threads does not work properly, you can use cfuthread_queue.
|
||||||
|
cfuthread_queue_new() creates a new thread that waits for something to
|
||||||
|
be added to the queue. Once something is added, the thread will
|
||||||
|
process the data by calling the function you pass as an argument to the
|
||||||
|
cfuthread_queue_new() function.
|
||||||
|
|
||||||
|
-- Function: cfuthread_queue_t * cfuthread_queue_new
|
||||||
|
(cfuthread_queue_fn_t FN)
|
||||||
|
Creates a new thread queue structure that will run the given
|
||||||
|
function when a request is received.
|
||||||
|
|
||||||
|
|
||||||
|
-- Function: cfuthread_queue_t * cfuthread_queue_new_with_cleanup
|
||||||
|
(cfuthread_queue_fn_t FN, cfuthread_queue_init_t INIT_FN,
|
||||||
|
void * INIT_ARG, cfuthread_queue_cleanup_t CLEANUP_FN, void *
|
||||||
|
CLEANUP_ARG)
|
||||||
|
Same as cfuthread_queue_new(), but with an initialization
|
||||||
|
function that gets called with the argument init_arg when the
|
||||||
|
thread is created, and a cleanup function that gets called with
|
||||||
|
the argument cleanup_arg when the thread exits, e.g., when
|
||||||
|
cfuthread_queue_destroy() is called.
|
||||||
|
|
||||||
|
|
||||||
|
-- Function: void * cfuthread_queue_make_request (cfuthread_queue_t *
|
||||||
|
TQ, void * DATA)
|
||||||
|
Add a request to the queue. data will get passed to the function
|
||||||
|
fn given to cfuthread_queue_new when it reaches the front of the
|
||||||
|
queue.
|
||||||
|
|
||||||
|
|
||||||
|
-- Function: void cfuthread_queue_destroy (cfuthread_queue_t * TQ)
|
||||||
|
Free up resources used by the queue, in addition to canceling the
|
||||||
|
thread.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
File: libcfu.info, Node: Timer, Next: License, Prev: Thread queue, Up: Top
|
||||||
|
|
||||||
|
5 Timer
|
||||||
|
*******
|
||||||
|
|
||||||
|
-- Function: cfutime_t *cfutime_new ();
|
||||||
|
Return a new cfutime structure.
|
||||||
|
|
||||||
|
-- Function: void cfutime_begin (cfutime_t *TIME)
|
||||||
|
Start the timer.
|
||||||
|
|
||||||
|
-- Function: void cfutime_end (cfutime_t * TIME)
|
||||||
|
Stop the timer.
|
||||||
|
|
||||||
|
-- Function: double cfutime_elapsed (cfutime_t * TIME)
|
||||||
|
Return the number of seconds elapsed as a double.
|
||||||
|
|
||||||
|
-- Function: void cfutime_free (cfutime_t * TIME)
|
||||||
|
Deallocate resources allocated for time.
|
||||||
|
|
||||||
|
|
||||||
|
File: libcfu.info, Node: License, Prev: Timer, Up: Top
|
||||||
|
|
||||||
|
License
|
||||||
|
*******
|
||||||
|
|
||||||
|
Copyright (C) 2005 Don Owens All rights reserved.
|
||||||
|
|
||||||
|
This code is released under the BSD license:
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are
|
||||||
|
met:
|
||||||
|
|
||||||
|
* Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
* Redistributions in binary form must reproduce the above
|
||||||
|
copyright notice, this list of conditions and the following
|
||||||
|
disclaimer in the documentation and/or other materials provided with
|
||||||
|
the distribution.
|
||||||
|
|
||||||
|
* Neither the name of the author nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived from
|
||||||
|
this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||||
|
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||||
|
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||||
|
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||||
|
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
|
||||||
|
File: libcfu.info, Node: Concept index, Next: Function index, Prev: Top, Up: Top
|
||||||
|
|
||||||
|
Concept index
|
||||||
|
*************
|
||||||
|
|
||||||
|
|