home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-11-28 | 34.5 KB | 1,301 lines |
- Newsgroups: comp.sources.unix
- From: panos@anchor.cs.colorado.edu (Panos Tsirigotis)
- Subject: v27i107: clc - C Libraries Collection, Part01/20
- References: <1.754527080.23891@gw.home.vix.com>
- Sender: unix-sources-moderator@gw.home.vix.com
- Approved: vixie@gw.home.vix.com
-
- Submitted-By: panos@anchor.cs.colorado.edu (Panos Tsirigotis)
- Posting-Number: Volume 27, Issue 107
- Archive-Name: clc/part01
-
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then unpack
- # it by saving it into a file and typing "sh file". To overwrite existing
- # files, type "sh file -c". You can also feed this as standard input via
- # unshar, or by typing "sh <file", e.g.. If this archive is complete, you
- # will see the following message at the end:
- # "End of archive 1 (of 20)."
- # Contents: README fixman libs libs/include libs/lib libs/man libs/src
- # libs/src/dict libs/src/dict/CHANGELOG libs/src/dict/dll.h
- # libs/src/dict/dlltest.out libs/src/dict/htest.out libs/src/fsma
- # libs/src/fsma/impl.h libs/src/misc libs/src/misc/README
- # libs/src/misc/env.h libs/src/misc/ftwx.h libs/src/misc/misc.h
- # libs/src/pq libs/src/pq/hpqimpl.h libs/src/pq/pq.c
- # libs/src/pq/pq.h libs/src/pset libs/src/pset/ops.c libs/src/sio
- # libs/src/sio/CHANGELOG libs/src/sio/suite
- # libs/src/sio/suite/buftest.c libs/src/sio/suite/example.c
- # libs/src/sio/suite/tietest.c libs/src/str libs/src/str/CHANGELOG
- # libs/src/str/ss_bmh.h libs/src/str/ss_kmp.h libs/src/str/ss_rk.h
- # libs/src/str/ss_sbm.h libs/src/str/ss_so.h libs/src/timer
- # libs/src/timer/CHANGELOG libs/src/xlog libs/src/xlog/CHANGELOG
- # libs/src/xlog/slog.h
- # Wrapped by panos@eclipse on Sun Nov 28 14:48:15 1993
- PATH=/bin:/usr/bin:/usr/ucb ; export PATH
- if test -f 'README' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'README'\"
- else
- echo shar: Extracting \"'README'\" \(2025 characters\)
- sed "s/^X//" >'README' <<'END_OF_FILE'
- X
- XCLC is the acronym for my C Libraries Collection, a group of general
- Xpurpose C libraries. The following is a short description of what each
- Xlibrary does. Please read the man pages for more information.
- X
- Xdict : support for various types of data structures, including double
- X linked lists, hash tables and binary search trees (which can also
- X be balanced using the red-black balancing algorithms). The data
- X structures support operations for insertion/deletion/location of
- X an object, as well as operations for finding the minimum/maximum
- X object and for enumeration of all objects.
- X
- Xfsma : support for quick memory allocation/deallocation of fixed size
- X objects.
- X
- Xmisc : a collection of generic functions including management of
- X environment variables, a tree walk function to replace ftw(3),
- X functions to get the basename/dirname of a pathname etc.
- X
- Xpq : an implementation of priority queues using heaps.
- X
- Xpset : support for pointer sets, implemented as dynamic pointer arrays.
- X
- Xsio : supports fast stream I/O, optionally using memory mapping for input
- X if the operating system supports it.
- X
- Xstr : this library contains 4 types of functions: string matching
- X functions (offering the Boyer-Moore, Knuth-Morris-Pratt,
- X Rabin-Karp, and Shift-Or algorithms), string printing functions
- X (similar to sprintf), string parsing functions, and string
- X utility functions (convert a string to upper/lower case etc).
- X
- Xtimer : support for multiple timers by multiplexing the timers provided
- X by the operating system.
- X
- Xxlog : this library provides logging objects which can be connected
- X either to syslog or to a file. Objects connected to files
- X may be customized to not exceed a certain file size.
- X
- X
- XThe INSTALL file contains information on how to install any or all
- Xof these libraries.
- X
- XPlease send comments/bug-reports to panos@cs.colorado.edu
- X
- X -- Panos Tsirigotis, Nov. 26, 1993 --
- X
- END_OF_FILE
- if test 2025 -ne `wc -c <'README'`; then
- echo shar: \"'README'\" unpacked with wrong size!
- fi
- # end of 'README'
- fi
- if test -f 'fixman' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'fixman'\"
- else
- echo shar: Extracting \"'fixman'\" \(768 characters\)
- sed "s/^X//" >'fixman' <<'END_OF_FILE'
- X#!/bin/sh
- X
- Xscript_name=`basename $0`
- X
- Xusage="Usage: $script_name manpage manpage ..."
- X
- Xif test $# -eq 0 ; then echo $usage ; exit 1 ; fi
- X
- Xcatch_sigs="2 15"
- X
- X#
- X# We can't take any interrupts while processing the manpages
- X#
- Xtrap 'interrupt_occured=yes' $catch_sigs
- X
- Xtemp_file=/tmp/tmp.$$
- X
- Xfor i in $*
- Xdo
- X rm -f $temp_file
- X sed 's/[.]SB/.B/' $i > $temp_file # do the replacement
- X cmp -s $i $temp_file # and compare
- X if test $? -ne 0 ; then # if not equal, then
- X mv $i $i.orig && mv $temp_file $i # save original, and move
- X fi # the other one in its place
- X rm -f $temp_file
- X if test "$interrupt_occured" = "yes" ; then
- X echo "$script_name: Interrupt: quiting"
- X exit 1
- X fi
- Xdone
- X
- END_OF_FILE
- if test 768 -ne `wc -c <'fixman'`; then
- echo shar: \"'fixman'\" unpacked with wrong size!
- fi
- chmod +x 'fixman'
- # end of 'fixman'
- fi
- if test ! -d 'libs' ; then
- echo shar: Creating directory \"'libs'\"
- mkdir 'libs'
- fi
- if test ! -d 'libs/include' ; then
- echo shar: Creating directory \"'libs/include'\"
- mkdir 'libs/include'
- fi
- if test ! -d 'libs/lib' ; then
- echo shar: Creating directory \"'libs/lib'\"
- mkdir 'libs/lib'
- fi
- if test ! -d 'libs/man' ; then
- echo shar: Creating directory \"'libs/man'\"
- mkdir 'libs/man'
- fi
- if test ! -d 'libs/src' ; then
- echo shar: Creating directory \"'libs/src'\"
- mkdir 'libs/src'
- fi
- if test ! -d 'libs/src/dict' ; then
- echo shar: Creating directory \"'libs/src/dict'\"
- mkdir 'libs/src/dict'
- fi
- if test -f 'libs/src/dict/CHANGELOG' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'libs/src/dict/CHANGELOG'\"
- else
- echo shar: Extracting \"'libs/src/dict/CHANGELOG'\" \(623 characters\)
- sed "s/^X//" >'libs/src/dict/CHANGELOG' <<'END_OF_FILE'
- X
- X1.2.0: First release
- X This was never advertised but was obtainable via anonymous FTP.
- X
- X1.2.1: submitted to comp.sources.unix
- X The only change was that the README file became part of the archive.
- X There were no changes to the source code.
- X
- X1.2.2:
- X No source code changes.
- X The test programs are now included in the distribution.
- X An EXAMPLE section has been included in the dict.3 man page
- X
- X1.2.3:
- X Specifying a ko_comp function is now optional. If such a function
- X is not specified, use of <lib>_search will cause a segmentation
- X violation.
- X
- X1.2.4:
- X Bug fix: tree_header fields 'anchor' and 'nil' changed to type btnode_s
- END_OF_FILE
- if test 623 -ne `wc -c <'libs/src/dict/CHANGELOG'`; then
- echo shar: \"'libs/src/dict/CHANGELOG'\" unpacked with wrong size!
- fi
- # end of 'libs/src/dict/CHANGELOG'
- fi
- if test -f 'libs/src/dict/dll.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'libs/src/dict/dll.h'\"
- else
- echo shar: Extracting \"'libs/src/dict/dll.h'\" \(1077 characters\)
- sed "s/^X//" >'libs/src/dict/dll.h' <<'END_OF_FILE'
- X/*
- X * (c) Copyright 1993 by Panagiotis Tsirigotis
- X * All rights reserved. The file named COPYRIGHT specifies the terms
- X * and conditions for redistribution.
- X */
- X
- X#ifndef __DLL_H
- X#define __DLL_H
- X
- X/*
- X * $Id: dll.h,v 3.1 93/04/23 17:48:53 panos Exp $
- X */
- X
- X#include "dict.h"
- X
- Xdict_h dll_create
- X __ARGS( (
- X dict_function oo_compare,
- X dict_function ko_compare,
- X int flags,
- X int *errnop
- X ) ) ;
- Xvoid dll_destroy __ARGS( ( dict_h lh ) ) ;
- Xint dll_insert __ARGS( ( dict_h lh, dict_obj obj ) ) ;
- Xint dll_insert_uniq __ARGS( ( dict_h lh, dict_obj, dict_obj * ) ) ;
- Xint dll_delete __ARGS( ( dict_h lh, dict_obj obj ) ) ;
- Xdict_obj dll_search __ARGS( ( dict_h lh, dict_key key ) ) ;
- Xdict_obj dll_minimum __ARGS( ( dict_h lh ) ) ;
- Xdict_obj dll_maximum __ARGS( ( dict_h lh ) ) ;
- Xdict_obj dll_successor __ARGS( ( dict_h lh, dict_obj obj ) ) ;
- Xdict_obj dll_predecessor __ARGS( ( dict_h lh, dict_obj obj ) ) ;
- Xvoid dll_iterate __ARGS( ( dict_h lh, enum dict_direction ) ) ;
- Xdict_obj dll_nextobj __ARGS( ( dict_h lh ) ) ;
- X
- X#endif /* __DLL_H */
- X
- END_OF_FILE
- if test 1077 -ne `wc -c <'libs/src/dict/dll.h'`; then
- echo shar: \"'libs/src/dict/dll.h'\" unpacked with wrong size!
- fi
- # end of 'libs/src/dict/dll.h'
- fi
- if test -f 'libs/src/dict/dlltest.out' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'libs/src/dict/dlltest.out'\"
- else
- echo shar: Extracting \"'libs/src/dict/dlltest.out'\" \(199 characters\)
- sed "s/^X//" >'libs/src/dict/dlltest.out' <<'END_OF_FILE'
- XSuccessor test
- X1
- X2
- X3
- X4
- X5
- X6
- X7
- X8
- X9
- X10
- XPredecessor test
- X10
- X9
- X8
- X7
- X6
- X5
- X4
- X3
- X2
- X1
- XSearch/delete test
- XSuccessor test 2
- X1
- X2
- X3
- X4
- X5
- X6
- X8
- X9
- X10
- XPredecessor test 2
- X10
- X9
- X8
- X6
- X5
- X4
- X3
- X2
- X1
- XIteration test
- X1
- X2
- X3
- X4
- X6
- X8
- X9
- X10
- END_OF_FILE
- if test 199 -ne `wc -c <'libs/src/dict/dlltest.out'`; then
- echo shar: \"'libs/src/dict/dlltest.out'\" unpacked with wrong size!
- fi
- # end of 'libs/src/dict/dlltest.out'
- fi
- if test -f 'libs/src/dict/htest.out' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'libs/src/dict/htest.out'\"
- else
- echo shar: Extracting \"'libs/src/dict/htest.out'\" \(404 characters\)
- sed "s/^X//" >'libs/src/dict/htest.out' <<'END_OF_FILE'
- XSearch/delete test
- X10 found
- X9 found
- X8 found
- X7 not found
- X6 found
- X5 found
- X4 found
- X3 found
- X2 found
- X1 found
- XObject = 1
- XObject = 2
- XObject = 3
- XObject = 4
- XObject = 5
- XObject = 6
- XObject = 8
- XObject = 9
- XObject = 10
- XObject = 1
- XObject = 2
- XObject = 3
- XObject = 4
- XObject = 5
- XObject = 6
- XObject = 8
- XObject = 9
- XObject = 10
- XObject = 10
- XObject = 9
- XObject = 8
- XObject = 6
- XObject = 5
- XObject = 4
- XObject = 3
- XObject = 2
- XObject = 1
- END_OF_FILE
- if test 404 -ne `wc -c <'libs/src/dict/htest.out'`; then
- echo shar: \"'libs/src/dict/htest.out'\" unpacked with wrong size!
- fi
- # end of 'libs/src/dict/htest.out'
- fi
- if test ! -d 'libs/src/fsma' ; then
- echo shar: Creating directory \"'libs/src/fsma'\"
- mkdir 'libs/src/fsma'
- fi
- if test -f 'libs/src/fsma/impl.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'libs/src/fsma/impl.h'\"
- else
- echo shar: Extracting \"'libs/src/fsma/impl.h'\" \(572 characters\)
- sed "s/^X//" >'libs/src/fsma/impl.h' <<'END_OF_FILE'
- X/*
- X * (c) Copyright 1992 by Panagiotis Tsirigotis
- X * All rights reserved. The file named COPYRIGHT specifies the terms
- X * and conditions for redistribution.
- X */
- X
- X/*
- X * $Id: impl.h,v 5.1 1992/10/10 07:23:18 panos Exp $
- X */
- X
- X#ifndef NULL
- X#define NULL 0
- X#endif
- X
- X#ifndef FALSE
- X#define FALSE 0
- X#define TRUE 1
- X#endif
- X
- X#define PRIVATE static
- X
- X#define SLOTS_PER_CHUNK 100
- X
- X#define POINTER __fsma_pointer
- X#define MINSIZE sizeof( POINTER )
- X
- X#define CHUNK_HEADER( p ) ((union __fsma_chunk_header *)(p))
- X
- END_OF_FILE
- if test 572 -ne `wc -c <'libs/src/fsma/impl.h'`; then
- echo shar: \"'libs/src/fsma/impl.h'\" unpacked with wrong size!
- fi
- # end of 'libs/src/fsma/impl.h'
- fi
- if test ! -d 'libs/src/misc' ; then
- echo shar: Creating directory \"'libs/src/misc'\"
- mkdir 'libs/src/misc'
- fi
- if test -f 'libs/src/misc/README' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'libs/src/misc/README'\"
- else
- echo shar: Extracting \"'libs/src/misc/README'\" \(439 characters\)
- sed "s/^X//" >'libs/src/misc/README' <<'END_OF_FILE'
- X
- X
- XThis library is made of 3 parts:
- X ftwx, misc, env
- X
- Xenv is a collection of environment processing functions.
- Xmisc is a collection of miscellaneous functions.
- Xftwx is a replacement for the standard ftw(3) function.
- X
- XWhen installing this library you may need to define the following
- Xflags in the Makefile:
- X OLD_DIR if your system does not have the file /usr/include/dirent.h
- X __FTWX_NO_FTW if your system does not have the ftw(3) function
- X
- END_OF_FILE
- if test 439 -ne `wc -c <'libs/src/misc/README'`; then
- echo shar: \"'libs/src/misc/README'\" unpacked with wrong size!
- fi
- # end of 'libs/src/misc/README'
- fi
- if test -f 'libs/src/misc/env.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'libs/src/misc/env.h'\"
- else
- echo shar: Extracting \"'libs/src/misc/env.h'\" \(1147 characters\)
- sed "s/^X//" >'libs/src/misc/env.h' <<'END_OF_FILE'
- X/*
- X * (c) Copyright 1992 by Panagiotis Tsirigotis
- X * All rights reserved. The file named COPYRIGHT specifies the terms
- X * and conditions for redistribution.
- X */
- X
- X#ifndef __ENV_H
- X#define __ENV_H
- X
- X/*
- X * $Id: env.h,v 1.2 1992/10/31 03:09:33 panos Exp $
- X */
- X
- Xstruct __env
- X{
- X unsigned max_vars ;
- X unsigned n_vars ;
- X char **vars ;
- X} ;
- X
- Xtypedef struct __env *env_h ;
- X
- X#define ENV_NULL ((env_h)0)
- X
- X/*
- X * Return values
- X */
- X#define ENV_ERR (-1)
- X#define ENV_OK 0
- X
- X/*
- X * Error codes
- X */
- X#define ENV_ENOMEM 1
- X#define ENV_EBADVAR 2
- X#define ENV_EBADSTRING 3
- X
- X
- X#ifdef __ARGS
- X#undef __ARGS
- X#endif
- X
- X#ifdef PROTOTYPES
- X# define __ARGS( s ) s
- X#else
- X# define __ARGS( s ) ()
- X#endif
- X
- Xenv_h env_create __ARGS( ( env_h ) ) ;
- Xvoid env_destroy __ARGS( ( env_h ) ) ;
- Xenv_h env_make __ARGS( ( char **env_strings ) ) ;
- Xint env_addvar __ARGS( ( env_h, env_h from_env, char *var ) ) ;
- Xint env_addstr __ARGS( ( env_h, char *str ) ) ;
- Xint env_remvar __ARGS( ( env_h, char *var ) ) ;
- Xchar *env_lookup __ARGS( ( env_h, char *var ) ) ;
- X
- X#define env_getvars( env ) (env)->vars
- X
- Xextern int env_errno ;
- X
- X#endif /* __ENV_H */
- X
- END_OF_FILE
- if test 1147 -ne `wc -c <'libs/src/misc/env.h'`; then
- echo shar: \"'libs/src/misc/env.h'\" unpacked with wrong size!
- fi
- # end of 'libs/src/misc/env.h'
- fi
- if test -f 'libs/src/misc/ftwx.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'libs/src/misc/ftwx.h'\"
- else
- echo shar: Extracting \"'libs/src/misc/ftwx.h'\" \(702 characters\)
- sed "s/^X//" >'libs/src/misc/ftwx.h' <<'END_OF_FILE'
- X/*
- X * (c) Copyright 1992 by Panagiotis Tsirigotis
- X * All rights reserved. The file named COPYRIGHT specifies the terms
- X * and conditions for redistribution.
- X */
- X
- X
- X#ifndef __FTWX_H
- X#define __FTWX_H
- X
- X/*
- X * $Id: ftwx.h,v 2.1 1992/10/01 00:41:02 panos Exp $
- X */
- X
- X#ifndef __FTWX_NO_FTW
- X#include <ftw.h>
- X#else
- X#define FTW_F 0
- X#define FTW_D 1
- X#define FTW_DNR 2
- X#define FTW_NS 3
- X#endif
- X
- X
- X/*
- X * Flags
- X */
- X#define FTWX_ALL -1
- X#define FTWX_FOLLOW 0x1
- X
- X
- X#ifdef __ARGS
- X#undef _ARGS
- X#endif
- X
- X#ifdef PROTOTYPES
- X# define __ARGS( s ) s
- X#else
- X# define __ARGS( s ) ()
- X#endif
- X
- Xint ftwx __ARGS( ( char *path, int (*func)(), int depth, int flags ) ) ;
- X
- X#endif /* __FTWX_H */
- X
- END_OF_FILE
- if test 702 -ne `wc -c <'libs/src/misc/ftwx.h'`; then
- echo shar: \"'libs/src/misc/ftwx.h'\" unpacked with wrong size!
- fi
- # end of 'libs/src/misc/ftwx.h'
- fi
- if test -f 'libs/src/misc/misc.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'libs/src/misc/misc.h'\"
- else
- echo shar: Extracting \"'libs/src/misc/misc.h'\" \(806 characters\)
- sed "s/^X//" >'libs/src/misc/misc.h' <<'END_OF_FILE'
- X/*
- X * (c) Copyright 1992 by Panagiotis Tsirigotis
- X * All rights reserved. The file named COPYRIGHT specifies the terms
- X * and conditions for redistribution.
- X */
- X
- X
- X#ifndef __MISC_H
- X#define __MISC_H
- X
- X
- X/*
- X * $Id: misc.h,v 2.1 1992/10/01 00:41:34 panos Exp $
- X */
- X
- X/*
- X * Align to a power of 2
- X */
- X#define align2( num, al ) (((num)+(al)-1) & ~((al)-1))
- X
- X#ifdef __ARGS
- X#undef __ARGS
- X#endif
- X
- X#ifdef PROTOTYPES
- X# define __ARGS( s ) s
- X#else
- X# define __ARGS( s ) ()
- X#endif
- X
- X
- Xchar *make_string __ARGS( ( unsigned count, ... ) ) ;
- Xchar *make_pathname __ARGS( ( unsigned count, ... ) ) ;
- X
- Xchar **argv_copy_and_clear __ARGS( ( char **argv, int start, int count ) ) ;
- Xchar *dirname __ARGS( ( char *pathname ) ) ;
- Xchar *basename __ARGS( ( char *pathname ) ) ;
- X
- X#endif /* __MISC_H */
- X
- END_OF_FILE
- if test 806 -ne `wc -c <'libs/src/misc/misc.h'`; then
- echo shar: \"'libs/src/misc/misc.h'\" unpacked with wrong size!
- fi
- # end of 'libs/src/misc/misc.h'
- fi
- if test ! -d 'libs/src/pq' ; then
- echo shar: Creating directory \"'libs/src/pq'\"
- mkdir 'libs/src/pq'
- fi
- if test -f 'libs/src/pq/hpqimpl.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'libs/src/pq/hpqimpl.h'\"
- else
- echo shar: Extracting \"'libs/src/pq/hpqimpl.h'\" \(785 characters\)
- sed "s/^X//" >'libs/src/pq/hpqimpl.h' <<'END_OF_FILE'
- X/*
- X * (c) Copyright 1993 by Panagiotis Tsirigotis
- X * All rights reserved. The file named COPYRIGHT specifies the terms
- X * and conditions for redistribution.
- X */
- X
- X/*
- X * $Id: hpqimpl.h,v 1.1 1992/11/23 16:25:25 panos Exp $
- X */
- X
- X#include "hpq.h"
- X
- Xtypedef struct __hpq_header header_s ;
- X
- X#define HHP( p ) ((header_s *)p)
- X
- X#define HANDLE_ERROR( flags, retval, errp, errval, msg ) \
- X if ( flags & PQ_RETURN_ERROR ) \
- X { \
- X *errp = errval ; \
- X return( retval ) ; \
- X } \
- X else \
- X { \
- X char *s = msg ; \
- X \
- X (void) write( 2, s, strlen( s ) ) ; \
- X abort() ; \
- X _exit( 1 ) ; \
- X /* NOTREACHED */ \
- X }
- X
- X
- END_OF_FILE
- if test 785 -ne `wc -c <'libs/src/pq/hpqimpl.h'`; then
- echo shar: \"'libs/src/pq/hpqimpl.h'\" unpacked with wrong size!
- fi
- # end of 'libs/src/pq/hpqimpl.h'
- fi
- if test -f 'libs/src/pq/pq.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'libs/src/pq/pq.c'\"
- else
- echo shar: Extracting \"'libs/src/pq/pq.c'\" \(289 characters\)
- sed "s/^X//" >'libs/src/pq/pq.c' <<'END_OF_FILE'
- X/*
- X * (c) Copyright 1993 by Panagiotis Tsirigotis
- X * All rights reserved. The file named COPYRIGHT specifies the terms
- X * and conditions for redistribution.
- X */
- X
- Xstatic char RCSid[] = "$Id: pq.c,v 1.1 1992/11/23 16:25:25 panos Exp $" ;
- Xstatic char version[] = VERSION ;
- X
- Xint pq_errno ;
- X
- END_OF_FILE
- if test 289 -ne `wc -c <'libs/src/pq/pq.c'`; then
- echo shar: \"'libs/src/pq/pq.c'\" unpacked with wrong size!
- fi
- # end of 'libs/src/pq/pq.c'
- fi
- if test -f 'libs/src/pq/pq.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'libs/src/pq/pq.h'\"
- else
- echo shar: Extracting \"'libs/src/pq/pq.h'\" \(686 characters\)
- sed "s/^X//" >'libs/src/pq/pq.h' <<'END_OF_FILE'
- X/*
- X * (c) Copyright 1993 by Panagiotis Tsirigotis
- X * All rights reserved. The file named COPYRIGHT specifies the terms
- X * and conditions for redistribution.
- X */
- X
- X#ifndef __PQ_H
- X#define __PQ_H
- X
- X/*
- X * $Id: pq.h,v 1.4 1993/04/01 02:14:52 panos Exp $
- X */
- X
- X/*
- X * Return values
- X */
- X#define PQ_OK 0
- X#define PQ_ERR (-1)
- X
- Xextern int pq_errno ;
- X
- X/*
- X * pq_errno values
- X */
- X#define PQ_ENOERROR 0
- X#define PQ_ENOFUNC 1
- X#define PQ_ENOMEM 2
- X#define PQ_ENULLOBJECT 3
- X#define PQ_ENOTFOUND 4
- X#define PQ_ENOTSUPPORTED 5
- X
- X/*
- X * flag values
- X */
- X#define PQ_NOFLAGS 0x0
- X#define PQ_RETURN_ERROR 0x1
- X
- Xtypedef void *pq_h ;
- Xtypedef void *pq_obj ;
- X
- X#include "hpq.h"
- X
- X#endif /* __PQ_H */
- X
- END_OF_FILE
- if test 686 -ne `wc -c <'libs/src/pq/pq.h'`; then
- echo shar: \"'libs/src/pq/pq.h'\" unpacked with wrong size!
- fi
- # end of 'libs/src/pq/pq.h'
- fi
- if test ! -d 'libs/src/pset' ; then
- echo shar: Creating directory \"'libs/src/pset'\"
- mkdir 'libs/src/pset'
- fi
- if test -f 'libs/src/pset/ops.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'libs/src/pset/ops.c'\"
- else
- echo shar: Extracting \"'libs/src/pset/ops.c'\" \(946 characters\)
- sed "s/^X//" >'libs/src/pset/ops.c' <<'END_OF_FILE'
- X/*
- X * (c) Copyright 1992, 1993 by Panagiotis Tsirigotis
- X * All rights reserved. The file named COPYRIGHT specifies the terms
- X * and conditions for redistribution.
- X */
- X
- Xstatic char RCSid[] = "$Id: ops.c,v 3.2 93/11/23 19:49:05 panos Exp $" ;
- X
- X#include "pset.h"
- X
- X#define PRIVATE static
- X
- X#ifndef NULL
- X#define NULL 0
- X#endif
- X
- X
- X/*
- X * Remove all NULL pointers from a pset
- X */
- Xvoid pset_compact( pset )
- X register pset_h pset ;
- X{
- X register unsigned u ;
- X
- X for ( u = 0 ; u < pset_count( pset ) ; )
- X if ( pset_pointer( pset, u ) != NULL )
- X u++ ;
- X else
- X pset_remove_index( pset, u ) ;
- X}
- X
- X
- X/*
- X * Apply a function to all pointers of a pset
- X */
- Xvoid pset_apply( pset, func, arg )
- X register pset_h pset ;
- X register void (*func)() ;
- X register __pset_pointer arg ;
- X{
- X register unsigned u ;
- X
- X for ( u = 0 ; u < pset_count( pset ) ; u++ )
- X if ( arg )
- X (*func)( arg, pset_pointer( pset, u ) ) ;
- X else
- X (*func)( pset_pointer( pset, u ) ) ;
- X}
- X
- END_OF_FILE
- if test 946 -ne `wc -c <'libs/src/pset/ops.c'`; then
- echo shar: \"'libs/src/pset/ops.c'\" unpacked with wrong size!
- fi
- # end of 'libs/src/pset/ops.c'
- fi
- if test ! -d 'libs/src/sio' ; then
- echo shar: Creating directory \"'libs/src/sio'\"
- mkdir 'libs/src/sio'
- fi
- if test -f 'libs/src/sio/CHANGELOG' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'libs/src/sio/CHANGELOG'\"
- else
- echo shar: Extracting \"'libs/src/sio/CHANGELOG'\" \(1106 characters\)
- sed "s/^X//" >'libs/src/sio/CHANGELOG' <<'END_OF_FILE'
- X
- X1.0.x-1.4.x:
- X - These version have not been released.
- X
- X1.5.0:
- X - Added the function Smorefds
- X - Improved the handling of pointers in Sprint
- X
- X1.5.3:
- X - Fixed a bug in Srdline
- X
- X1.5.6:
- X - Added multiple ways of determining the number of available fds
- X
- X1.6.0:
- X - Updated the way SIO is configured. Instead of multiple configuration
- X files, one per OS/machine, there is now a single configuration header
- X file where the user can define via preprocessor flags the features
- X supported by the particular OS/machine.
- X
- X1.6.1:
- X - Simplified the Sprint-related configuration flags
- X - Fixed a bug in the events code
- X - Replaced all uses of memcpy with sio_memcopy
- X
- X1.6.2:
- X - Fixed a bug in the INS_CHAR macro: the buffer size was not respected
- X when printing to strings. This had no effect on the SIO library,
- X but it did affect the strx_* functions of the STR library
- X
- X1.6.3:
- X - The values for INCLUDEDIR and MANDIR in the Makefile were reversed
- X (this might have been confusing to people trying to install the
- X library).
- X - Updated the sio manpage with respect to the handling of interrupted
- X system calls.
- X
- END_OF_FILE
- if test 1106 -ne `wc -c <'libs/src/sio/CHANGELOG'`; then
- echo shar: \"'libs/src/sio/CHANGELOG'\" unpacked with wrong size!
- fi
- # end of 'libs/src/sio/CHANGELOG'
- fi
- if test ! -d 'libs/src/sio/suite' ; then
- echo shar: Creating directory \"'libs/src/sio/suite'\"
- mkdir 'libs/src/sio/suite'
- fi
- if test -f 'libs/src/sio/suite/buftest.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'libs/src/sio/suite/buftest.c'\"
- else
- echo shar: Extracting \"'libs/src/sio/suite/buftest.c'\" \(748 characters\)
- sed "s/^X//" >'libs/src/sio/suite/buftest.c' <<'END_OF_FILE'
- X/*
- X * (c) Copyright 1992, 1993 by Panagiotis Tsirigotis
- X * All rights reserved. The file named COPYRIGHT specifies the terms
- X * and conditions for redistribution.
- X */
- X
- Xstatic char RCSid[] = "$Id: buftest.c,v 8.1 1993/03/13 01:23:09 panos Exp $" ;
- X
- X#include "sio.h"
- X
- Xmain()
- X{
- X int i ;
- X int sleep_interval = 3 ;
- X
- X if ( Sbuftype( 1, SIO_LINEBUF ) == SIO_ERR )
- X {
- X Sprint( 2, "Sbuftype failed\n" ) ;
- X exit( 1 ) ;
- X }
- X
- X for ( i = 0 ; i < 10 ; i++ )
- X {
- X Sprint( 1, "Line %d\n", i ) ;
- X if ( i == 5 )
- X {
- X Sprint( 1, "Now switching to full buffering\n" ) ;
- X sleep_interval = 2 ;
- X if ( Sbuftype( 1, SIO_FULLBUF ) == SIO_ERR )
- X {
- X Sprint( 2, "2nd Sbuftype failed\n" ) ;
- X exit( 1 ) ;
- X }
- X }
- X sleep( sleep_interval ) ;
- X }
- X exit( 0 ) ;
- X}
- X
- END_OF_FILE
- if test 748 -ne `wc -c <'libs/src/sio/suite/buftest.c'`; then
- echo shar: \"'libs/src/sio/suite/buftest.c'\" unpacked with wrong size!
- fi
- # end of 'libs/src/sio/suite/buftest.c'
- fi
- if test -f 'libs/src/sio/suite/example.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'libs/src/sio/suite/example.c'\"
- else
- echo shar: Extracting \"'libs/src/sio/suite/example.c'\" \(569 characters\)
- sed "s/^X//" >'libs/src/sio/suite/example.c' <<'END_OF_FILE'
- X/*
- X * (c) Copyright 1992, 1993 by Panagiotis Tsirigotis
- X * All rights reserved. The file named COPYRIGHT specifies the terms
- X * and conditions for redistribution.
- X */
- X
- Xstatic char RCSid[] = "$Id: example.c,v 8.1 1993/03/13 01:21:48 panos Exp $" ;
- X
- X#include "sio.h"
- X
- Xmain( argc, argv )
- X int argc ;
- X char *argv[] ;
- X{
- X char *file = (argc > 1) ? argv[ 1 ] : "tee.file" ;
- X int fd = creat( file, 0644 ) ;
- X long length ;
- X char *s ;
- X
- X while ( s = Sfetch( 0, &length ) )
- X {
- X Swrite( 1, s, length ) ;
- X Swrite( fd, s, length ) ;
- X }
- X exit( 0 ) ;
- X}
- X
- END_OF_FILE
- if test 569 -ne `wc -c <'libs/src/sio/suite/example.c'`; then
- echo shar: \"'libs/src/sio/suite/example.c'\" unpacked with wrong size!
- fi
- # end of 'libs/src/sio/suite/example.c'
- fi
- if test -f 'libs/src/sio/suite/tietest.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'libs/src/sio/suite/tietest.c'\"
- else
- echo shar: Extracting \"'libs/src/sio/suite/tietest.c'\" \(669 characters\)
- sed "s/^X//" >'libs/src/sio/suite/tietest.c' <<'END_OF_FILE'
- X/*
- X * (c) Copyright 1992, 1993 by Panagiotis Tsirigotis
- X * All rights reserved. The file named COPYRIGHT specifies the terms
- X * and conditions for redistribution.
- X */
- X
- Xstatic char RCSid[] = "$Id: tietest.c,v 8.1 1993/03/13 01:24:07 panos Exp $" ;
- X
- X#include "sio.h"
- X#include <stdio.h>
- X
- Xmain()
- X{
- X char *s ;
- X
- X Stie( 0, 1 ) ;
- X Sprint( 1, "Enter 1st command --> " ) ;
- X s = Srdline( 0 ) ;
- X Sprint( 1, "Received command: %s\n", s ) ;
- X Sprint( 1, "Enter 2nd command --> " ) ;
- X s = Srdline( 0 ) ;
- X Sprint( 1, "Received command: %s\n", s ) ;
- X Suntie( 0 ) ;
- X Sprint( 1, "Enter 3rd command --> " ) ;
- X s = Srdline( 0 ) ;
- X Sprint( 1, "Received command: %s\n", s ) ;
- X exit( 0 ) ;
- X}
- END_OF_FILE
- if test 669 -ne `wc -c <'libs/src/sio/suite/tietest.c'`; then
- echo shar: \"'libs/src/sio/suite/tietest.c'\" unpacked with wrong size!
- fi
- # end of 'libs/src/sio/suite/tietest.c'
- fi
- if test ! -d 'libs/src/str' ; then
- echo shar: Creating directory \"'libs/src/str'\"
- mkdir 'libs/src/str'
- fi
- if test -f 'libs/src/str/CHANGELOG' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'libs/src/str/CHANGELOG'\"
- else
- echo shar: Extracting \"'libs/src/str/CHANGELOG'\" \(507 characters\)
- sed "s/^X//" >'libs/src/str/CHANGELOG' <<'END_OF_FILE'
- X
- X1.2.0:
- X First release (as part of xinetd 1.3)
- X
- X1.3.2:
- X Added the string matching functions
- X
- X1.3.3: (posted to alt.sources)
- X Changed the way the library is configured
- X
- X1.4.0:
- X Added the shift-or string matching algorithm
- X Implemented the automatic switching to the proper search algorithm
- X Added the STRS_NOSWITCH flag to disallow switching
- X Added the STRS_PATLEN flag
- X
- X1.4.1:
- X Moved definition of u_wide_int from ss_rk.h to ss_impl.h
- X
- X1.4.2:
- X Update the README file to remove all references to mystique.
- X
- END_OF_FILE
- if test 507 -ne `wc -c <'libs/src/str/CHANGELOG'`; then
- echo shar: \"'libs/src/str/CHANGELOG'\" unpacked with wrong size!
- fi
- # end of 'libs/src/str/CHANGELOG'
- fi
- if test -f 'libs/src/str/ss_bmh.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'libs/src/str/ss_bmh.h'\"
- else
- echo shar: Extracting \"'libs/src/str/ss_bmh.h'\" \(366 characters\)
- sed "s/^X//" >'libs/src/str/ss_bmh.h' <<'END_OF_FILE'
- X/*
- X * (c) Copyright 1992, 1993 by Panagiotis Tsirigotis
- X * All rights reserved. The file named COPYRIGHT specifies the terms
- X * and conditions for redistribution.
- X */
- X
- X#ifndef SS_BMH_H
- X#define SS_BMH_H
- X
- X/*
- X * $Id: ss_bmh.h,v 3.1 1993/06/13 02:42:53 panos Exp $
- X */
- X
- Xtypedef unsigned shift_int ;
- X
- Xstruct bmh_header
- X{
- X shift_int *shift ;
- X} ;
- X
- X#endif /* SS_BMH_H */
- X
- END_OF_FILE
- if test 366 -ne `wc -c <'libs/src/str/ss_bmh.h'`; then
- echo shar: \"'libs/src/str/ss_bmh.h'\" unpacked with wrong size!
- fi
- # end of 'libs/src/str/ss_bmh.h'
- fi
- if test -f 'libs/src/str/ss_kmp.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'libs/src/str/ss_kmp.h'\"
- else
- echo shar: Extracting \"'libs/src/str/ss_kmp.h'\" \(381 characters\)
- sed "s/^X//" >'libs/src/str/ss_kmp.h' <<'END_OF_FILE'
- X/*
- X * (c) Copyright 1992, 1993 by Panagiotis Tsirigotis
- X * All rights reserved. The file named COPYRIGHT specifies the terms
- X * and conditions for redistribution.
- X */
- X
- X#ifndef SS_KMP_H
- X#define SS_KMP_H
- X
- X/*
- X * $Id: ss_kmp.h,v 3.1 1993/06/13 02:44:52 panos Exp $
- X */
- X
- Xtypedef int next_int ; /* must be signed */
- X
- Xstruct kmp_header
- X{
- X next_int *next ;
- X} ;
- X
- X#endif /* SS_KMP_H */
- X
- END_OF_FILE
- if test 381 -ne `wc -c <'libs/src/str/ss_kmp.h'`; then
- echo shar: \"'libs/src/str/ss_kmp.h'\" unpacked with wrong size!
- fi
- # end of 'libs/src/str/ss_kmp.h'
- fi
- if test -f 'libs/src/str/ss_rk.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'libs/src/str/ss_rk.h'\"
- else
- echo shar: Extracting \"'libs/src/str/ss_rk.h'\" \(579 characters\)
- sed "s/^X//" >'libs/src/str/ss_rk.h' <<'END_OF_FILE'
- X/*
- X * (c) Copyright 1992, 1993 by Panagiotis Tsirigotis
- X * All rights reserved. The file named COPYRIGHT specifies the terms
- X * and conditions for redistribution.
- X */
- X
- X#ifndef SS_RK_H
- X#define SS_RK_H
- X
- X/*
- X * $Id: ss_rk.h,v 3.2 1993/06/16 00:06:34 panos Exp $
- X */
- X
- Xstruct rk_header
- X{
- X u_wide_int rk_digit1 ; /* in the appropriate radix */
- X u_wide_int rk_patval ;
- X} ;
- X
- X#if WIDE_INT_SIZE == 32
- X# define PRIME 16777213
- X#else
- X# if WIDE_INT_SIZE == 16
- X# define PRIME 251
- X# else
- X int WIDE_INT_SIZE_has_bad_value = or_is_undefined ;
- X# endif
- X#endif
- X
- X#endif /* SS_RK_H */
- X
- END_OF_FILE
- if test 579 -ne `wc -c <'libs/src/str/ss_rk.h'`; then
- echo shar: \"'libs/src/str/ss_rk.h'\" unpacked with wrong size!
- fi
- # end of 'libs/src/str/ss_rk.h'
- fi
- if test -f 'libs/src/str/ss_sbm.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'libs/src/str/ss_sbm.h'\"
- else
- echo shar: Extracting \"'libs/src/str/ss_sbm.h'\" \(393 characters\)
- sed "s/^X//" >'libs/src/str/ss_sbm.h' <<'END_OF_FILE'
- X/*
- X * (c) Copyright 1992, 1993 by Panagiotis Tsirigotis
- X * All rights reserved. The file named COPYRIGHT specifies the terms
- X * and conditions for redistribution.
- X */
- X
- X
- X#ifndef SS_SBM_H
- X#define SS_SBM_H
- X
- X/*
- X * $Id: ss_sbm.h,v 3.1 1993/06/13 02:46:00 panos Exp $
- X */
- X
- Xtypedef int last_int ; /* must be signed */
- X
- Xstruct sbm_header
- X{
- X last_int *last_occurrence ;
- X} ;
- X
- X#endif /* SS_SBM_H */
- X
- END_OF_FILE
- if test 393 -ne `wc -c <'libs/src/str/ss_sbm.h'`; then
- echo shar: \"'libs/src/str/ss_sbm.h'\" unpacked with wrong size!
- fi
- # end of 'libs/src/str/ss_sbm.h'
- fi
- if test -f 'libs/src/str/ss_so.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'libs/src/str/ss_so.h'\"
- else
- echo shar: Extracting \"'libs/src/str/ss_so.h'\" \(353 characters\)
- sed "s/^X//" >'libs/src/str/ss_so.h' <<'END_OF_FILE'
- X/*
- X * (c) Copyright 1992, 1993 by Panagiotis Tsirigotis
- X * All rights reserved. The file named COPYRIGHT specifies the terms
- X * and conditions for redistribution.
- X */
- X
- X#ifndef SS_SO_H
- X#define SS_SO_H
- X
- X/*
- X * $Id: ss_so.h,v 3.1 1993/06/13 02:46:47 panos Exp $
- X */
- X
- Xstruct so_header
- X{
- X wide_int *mask ;
- X wide_int offset_mask ;
- X} ;
- X
- X#endif /* SS_SO_H */
- END_OF_FILE
- if test 353 -ne `wc -c <'libs/src/str/ss_so.h'`; then
- echo shar: \"'libs/src/str/ss_so.h'\" unpacked with wrong size!
- fi
- # end of 'libs/src/str/ss_so.h'
- fi
- if test ! -d 'libs/src/timer' ; then
- echo shar: Creating directory \"'libs/src/timer'\"
- mkdir 'libs/src/timer'
- fi
- if test -f 'libs/src/timer/CHANGELOG' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'libs/src/timer/CHANGELOG'\"
- else
- echo shar: Extracting \"'libs/src/timer/CHANGELOG'\" \(206 characters\)
- sed "s/^X//" >'libs/src/timer/CHANGELOG' <<'END_OF_FILE'
- X
- X1.2.2:
- X Posted as part of xinetd
- X
- X1.3.0:
- X - Minor fixes to the Makefile
- X - The STATES file was added to the distribution
- X - Preprocessor flags were added to selectively disable timers of
- X specific types.
- END_OF_FILE
- if test 206 -ne `wc -c <'libs/src/timer/CHANGELOG'`; then
- echo shar: \"'libs/src/timer/CHANGELOG'\" unpacked with wrong size!
- fi
- # end of 'libs/src/timer/CHANGELOG'
- fi
- if test ! -d 'libs/src/xlog' ; then
- echo shar: Creating directory \"'libs/src/xlog'\"
- mkdir 'libs/src/xlog'
- fi
- if test -f 'libs/src/xlog/CHANGELOG' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'libs/src/xlog/CHANGELOG'\"
- else
- echo shar: Extracting \"'libs/src/xlog/CHANGELOG'\" \(527 characters\)
- sed "s/^X//" >'libs/src/xlog/CHANGELOG' <<'END_OF_FILE'
- X
- X1.0.8:
- X First release
- X
- X1.0.9:
- X Fixed bug in the syslog xlogs.
- X
- X1.1.2:
- X * Timestamps are now always included
- X * If NO_SYSLOG is defined, syslog xlogs become unavailable (this was
- X available in 1.0.9 but it didn't work right).
- X
- X1.1.3:
- X * corrected macros SYSLOG/FILELOG in slog.h/filelog.h
- X * removed slp_ident_is_malloced field from struct syslog_parms (slog.h)
- X * Conditional use of LOG_PID/LOG_NOWAIT (slog.c)
- X * slog_control returns XLOG_EBADOP for XLOG_GETFD (slog.c)
- X * documented how xlog_control should work (xlog.3)
- X
- END_OF_FILE
- if test 527 -ne `wc -c <'libs/src/xlog/CHANGELOG'`; then
- echo shar: \"'libs/src/xlog/CHANGELOG'\" unpacked with wrong size!
- fi
- # end of 'libs/src/xlog/CHANGELOG'
- fi
- if test -f 'libs/src/xlog/slog.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'libs/src/xlog/slog.h'\"
- else
- echo shar: Extracting \"'libs/src/xlog/slog.h'\" \(584 characters\)
- sed "s/^X//" >'libs/src/xlog/slog.h' <<'END_OF_FILE'
- X/*
- X * (c) Copyright 1992, 1993 by Panagiotis Tsirigotis
- X * All rights reserved. The file named COPYRIGHT specifies the terms
- X * and conditions for redistribution.
- X */
- X
- X
- X/*
- X * $Id: slog.h,v 2.2 1993/10/28 01:37:08 panos Exp $
- X */
- X
- X
- Xstruct syslog
- X{
- X int sl_facility ;
- X int sl_default_level ;
- X} ;
- X
- X
- Xstruct syslog_parms
- X{
- X int slp_n_xlogs ; /* # of xlogs using syslog */
- X int slp_logopts ; /* used at openlog */
- X int slp_facility ;
- X char *slp_ident ; /* used at openlog */
- X} ;
- X
- X#define SYSLOG( xp ) ((struct syslog *)(xp)->xl_data)
- X
- END_OF_FILE
- if test 584 -ne `wc -c <'libs/src/xlog/slog.h'`; then
- echo shar: \"'libs/src/xlog/slog.h'\" unpacked with wrong size!
- fi
- # end of 'libs/src/xlog/slog.h'
- fi
- echo shar: End of archive 1 \(of 20\).
- cp /dev/null ark1isdone
- MISSING=""
- for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ; do
- if test ! -f ark${I}isdone ; then
- MISSING="${MISSING} ${I}"
- fi
- done
- if test "${MISSING}" = "" ; then
- echo You have unpacked all 20 archives.
- rm -f ark[1-9]isdone ark[1-9][0-9]isdone
- else
- echo You still need to unpack the following archives:
- echo " " ${MISSING}
- fi
- ## End of shell archive.
- exit 0
-