home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-11-28 | 34.1 KB | 1,360 lines |
- Newsgroups: comp.sources.unix
- From: panos@anchor.cs.colorado.edu (Panos Tsirigotis)
- Subject: v27i110: clc - C Libraries Collection, Part04/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 110
- Archive-Name: clc/part04
-
- #! /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 4 (of 20)."
- # Contents: libs/src/dict/bst.3 libs/src/dict/bsttest.c
- # libs/src/dict/dll.3 libs/src/dict/dlltest.c libs/src/fsma/fsma.h
- # libs/src/misc/ftwx.3 libs/src/misc/misc.3 libs/src/pset/pset.c
- # libs/src/sio/suite/Makefile libs/src/timer/ostimer.h
- # libs/src/timer/timemacros.3 libs/src/timer/timer.h
- # Wrapped by panos@eclipse on Sun Nov 28 14:48:15 1993
- PATH=/bin:/usr/bin:/usr/ucb ; export PATH
- if test -f 'libs/src/dict/bst.3' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'libs/src/dict/bst.3'\"
- else
- echo shar: Extracting \"'libs/src/dict/bst.3'\" \(2035 characters\)
- sed "s/^X//" >'libs/src/dict/bst.3' <<'END_OF_FILE'
- 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.\" $Id: bst.3,v 3.3 93/11/23 20:07:28 panos Exp $
- X.TH BST 3X "23 April 1993"
- X.SH NAME
- Xbst_create, bst_destroy, bst_insert, bst_insert_uniq, bst_delete, bst_search, bst_minimum, bst_maximum, bst_successor, bst_predecessor, bst_iterate, bst_nextobj - binary search tree management functions
- X.SH SYNOPSIS
- X.LP
- X.nf
- X.ft B
- X#include "bst.h"
- X.LP
- X.ft B
- Xdict_h bst_create( oo_compare, ko_compare, flags, errnop )
- Xint (*oo_compare)( dict_obj, dict_obj ) ;
- Xint (*ko_compare)( dict_key, dict_obj ) ;
- Xint flags ;
- Xint *errnop ;
- X.LP
- X.ft B
- Xvoid bst_destroy( handle )
- Xdict_h handle ;
- X.LP
- X.ft B
- Xint bst_insert( handle, object )
- Xdict_h handle ;
- Xdict_obj object ;
- X.LP
- X.ft B
- Xint bst_insert_uniq( handle, object, objectp )
- Xdict_h handle ;
- Xdict_obj object ;
- Xdict_obj *objectp ;
- X.LP
- X.ft B
- Xint bst_delete( handle, object )
- Xdict_h handle ;
- Xdict_obj object ;
- X.LP
- X.ft B
- Xdict_obj bst_search( handle, key )
- Xdict_h handle ;
- Xdict_key key ;
- X.LP
- X.ft B
- Xdict_obj bst_minimum( handle )
- Xdict_h handle ;
- X.LP
- X.ft B
- Xdict_obj bst_maximum( handle )
- Xdict_h handle ;
- X.LP
- X.ft B
- Xdict_obj bst_successor( handle, object )
- Xdict_h handle ;
- Xdict_obj object ;
- X.LP
- X.ft B
- Xdict_obj bst_predecessor( handle, object )
- Xdict_h handle ;
- Xdict_obj object ;
- X.LP
- X.ft B
- Xvoid bst_iterate( handle, direction )
- Xdict_h handle ;
- Xenum dict_direction direction ;
- X.LP
- X.ft B
- Xdict_obj bst_nextobj( handle )
- Xdict_h handle ;
- X.SH DESCRIPTION
- X.LP
- XThis library supports dictionary functions using binary search trees.
- XIt follows the standard library interface which is described in
- X.I "dict(3)."
- XThe flags supported by
- X.B bst_create()
- Xinclude:
- X.RS
- X.TP
- X.SB DICT_RETURN_ERROR
- X.TP
- X.SB DICT_UNIQUE_KEYS
- X.TP
- X.SB DICT_ORDERED
- X.TP
- X.SB DICT_BALANCED_TREE
- Xthe tree will be kept balanced (the implementation uses red-black trees
- Xto enforce this property).
- X.RE
- X.SH "SEE ALSO"
- Xdict(3)
- X.SH "RETURN VALUES"
- XCheck
- X.I "dict(3)"
- Xfor function return values and error codes.
- END_OF_FILE
- if test 2035 -ne `wc -c <'libs/src/dict/bst.3'`; then
- echo shar: \"'libs/src/dict/bst.3'\" unpacked with wrong size!
- fi
- # end of 'libs/src/dict/bst.3'
- fi
- if test -f 'libs/src/dict/bsttest.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'libs/src/dict/bsttest.c'\"
- else
- echo shar: Extracting \"'libs/src/dict/bsttest.c'\" \(2082 characters\)
- sed "s/^X//" >'libs/src/dict/bsttest.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: bsttest.c,v 3.3 93/09/17 00:50:33 panos Exp $" ;
- X
- X#ifndef NULL
- X#define NULL 0
- X#endif
- X
- X#include "bst.h"
- X
- X
- Xint_comp( p1, p2 )
- X char *p1, *p2 ;
- X{
- X int i1 = *(int *)p1 ;
- X int i2 = *(int *)p2 ;
- X
- X return( i1 - i2 ) ;
- X}
- X
- Xvoid printval( ip )
- X int *ip ;
- X{
- X printf( "%d\n", *ip ) ;
- X}
- X
- X
- X#define N 100
- Xint nums[ N ] ;
- X
- Xint main( argc, argv )
- X int argc ;
- X char *argv[] ;
- X{
- X dict_h bh ;
- X int i ;
- X int *ip ;
- X int j ;
- X int flags = DICT_NOFLAGS ;
- X struct bst_depth d ;
- X
- X if ( argc == 2 && argv[1][0] == 'b' )
- X flags |= DICT_BALANCED_TREE ;
- X
- X bh = bst_create( int_comp, int_comp, flags, (int *)0 ) ;
- X
- X for ( i = 0 ; i < N ; i++ )
- X {
- X#ifdef notdef
- X nums[ i ] = random() % 100 ;
- X#else
- X nums[ i ] = N-i ;
- X#endif
- X if ( bst_insert( bh, &nums[ i ] ) != DICT_OK )
- X {
- X printf( "Failed at %d\n", i ) ;
- X exit( 1 ) ;
- X }
- X }
- X
- X /*
- X * If the tree is balanced, this call will make sure that
- X * max_depth <= 2*min_depth
- X */
- X bst_getdepth( bh, &d ) ;
- X
- X bst_traverse( bh, BST_INORDER, printval ) ;
- X putchar( '\n' ) ;
- X
- X printf( "Successor test\n" ) ;
- X for ( ip=(int *)bst_minimum( bh ) ; ip ; ip=(int *)bst_successor( bh, ip ) )
- X printf( "%d ", *ip ) ;
- X putchar( '\n' ) ;
- X
- X printf( "Predecessor test\n" ) ;
- X for ( ip=(int *)bst_maximum( bh ) ;ip; ip=(int *)bst_predecessor( bh, ip ) )
- X printf( "%d ", *ip ) ;
- X putchar( '\n' ) ;
- X
- X printf( "Search/delete test\n" ) ;
- X i = 7 ;
- X ip = (int *) bst_search( bh, &i ) ;
- X if ( ip == NULL )
- X printf( "Search failed\n" ) ;
- X else
- X if ( bst_delete( bh, ip ) != DICT_OK )
- X {
- X printf( "Delete failed\n" ) ;
- X exit( 0 ) ;
- X }
- X
- X printf( "Successor test 2\n" ) ;
- X for ( ip=(int *)bst_minimum( bh ) ; ip ; ip=(int *)bst_successor( bh, ip ) )
- X printf( "%d ", *ip ) ;
- X putchar( '\n' ) ;
- X
- X printf( "Predecessor test 2\n" ) ;
- X for ( ip=(int *)bst_maximum( bh ) ;ip; ip=(int *)bst_predecessor( bh, ip ) )
- X printf( "%d ", *ip ) ;
- X putchar( '\n' ) ;
- X exit( 0 ) ;
- X}
- END_OF_FILE
- if test 2082 -ne `wc -c <'libs/src/dict/bsttest.c'`; then
- echo shar: \"'libs/src/dict/bsttest.c'\" unpacked with wrong size!
- fi
- # end of 'libs/src/dict/bsttest.c'
- fi
- if test -f 'libs/src/dict/dll.3' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'libs/src/dict/dll.3'\"
- else
- echo shar: Extracting \"'libs/src/dict/dll.3'\" \(2523 characters\)
- sed "s/^X//" >'libs/src/dict/dll.3' <<'END_OF_FILE'
- 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.\" $Id: dll.3,v 3.5 93/11/23 20:07:28 panos Exp $
- X.TH DLL 3X "23 April 1993"
- X.SH NAME
- Xdll_create, dll_destroy, dll_insert, dll_insert_uniq, dll_delete, dll_search, dll_minimum, dll_maximum, dll_successor, dll_predecessor, dll_iterate, dll_nextobj - double linked list management functions
- X.SH SYNOPSIS
- X.LP
- X.nf
- X.ft B
- X#include "dll.h"
- X.LP
- X.ft B
- Xdict_h dll_create( oo_compare, ko_compare, flags, errnop )
- Xint (*oo_compare)( dict_obj, dict_obj ) ;
- Xint (*ko_compare)( dict_key, dict_obj ) ;
- Xint flags ;
- Xint *errnop ;
- X.LP
- X.ft B
- Xvoid dll_destroy( handle )
- Xdict_h handle ;
- X.LP
- X.ft B
- Xint dll_insert( handle, object )
- Xdict_h handle ;
- Xdict_obj object ;
- X.LP
- X.ft B
- Xint dll_insert_uniq( handle, object, objectp )
- Xdict_h handle ;
- Xdict_obj object ;
- Xdict_obj *objectp ;
- X.LP
- X.ft B
- Xint dll_delete( handle, object )
- Xdict_h handle ;
- Xdict_obj object ;
- X.LP
- X.ft B
- Xdict_obj dll_search( handle, key )
- Xdict_h handle ;
- Xdict_key key ;
- X.LP
- X.ft B
- Xdict_obj dll_minimum( handle )
- Xdict_h handle ;
- X.LP
- X.ft B
- Xdict_obj dll_maximum( handle )
- Xdict_h handle ;
- X.LP
- X.ft B
- Xdict_obj dll_successor( handle, object )
- Xdict_h handle ;
- Xdict_obj object ;
- X.LP
- X.ft B
- Xdict_obj dll_predecessor( handle, object )
- Xdict_h handle ;
- Xdict_obj object ;
- X.LP
- X.ft B
- Xvoid dll_iterate( handle, direction )
- Xdict_h handle ;
- Xenum dict_direction direction ;
- X.LP
- X.ft B
- Xdict_obj dll_nextobj( handle )
- Xdict_h handle ;
- X.SH DESCRIPTION
- X.LP
- XThis library supports dictionary functions using double linked lists.
- XIt follows the standard library interface which is explained in
- X.I "dict(3)."
- XThe flags supported by
- X.B dll_create()
- Xinclude:
- X.RS
- X.TP
- X.SB DICT_RETURN_ERROR
- X.TP
- X.SB DICT_UNIQUE_KEYS
- X.TP
- X.SB DICT_UNORDERED
- X.TP
- X.SB DICT_ORDERED
- X.RE
- X.LP
- XIf the flag
- X.B DICT_UNORDERED
- Xis used when a list is created, a
- X.B dll_insert()
- Xoperation will always insert an object at the beginning of the list.
- XThis allows such a list to be used to enforce an LRU policy by
- Xdeleting the most recently found node and inserting it back.
- X.LP
- X.B dll_minimum()
- Xreturns the object with the minimum key value if the list is sorted, or
- Xthe object at the beginning of the list if the list is not sorted.
- X.LP
- X.B dll_maximum()
- Xreturns the object with the maximum key value if the list is sorted, or
- Xthe object at the end of the list if the list is not sorted.
- X.SH "SEE ALSO"
- Xdict(3)
- X.SH "RETURN VALUES"
- XCheck
- X.I "dict(3)"
- Xfor function return values and error codes.
- END_OF_FILE
- if test 2523 -ne `wc -c <'libs/src/dict/dll.3'`; then
- echo shar: \"'libs/src/dict/dll.3'\" unpacked with wrong size!
- fi
- # end of 'libs/src/dict/dll.3'
- fi
- if test -f 'libs/src/dict/dlltest.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'libs/src/dict/dlltest.c'\"
- else
- echo shar: Extracting \"'libs/src/dict/dlltest.c'\" \(2100 characters\)
- sed "s/^X//" >'libs/src/dict/dlltest.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: dlltest.c,v 3.2 93/09/17 00:22:07 panos Exp $" ;
- X
- X
- X#ifndef NULL
- X#define NULL 0
- X#endif
- X
- X#include "dll.h"
- X
- X
- X#define COMPARE( i1, i2 ) \
- X if ( i1 < i2 ) \
- X return( -1 ) ; \
- X else if ( i1 == i2 ) \
- X return( 0 ) ; \
- X else \
- X return( 1 ) ;
- X
- X#define INTP( p ) ((int *)(p))
- X
- Xstatic int int_comp( p1, p2 )
- X char *p1, *p2 ;
- X{
- X int i1 = *INTP( p1 ) ;
- X int i2 = *INTP( p2 ) ;
- X
- X COMPARE( i1, i2 ) ;
- X}
- X
- X
- Xstatic int int_kcomp( p1, p2 )
- X char *p1, *p2 ;
- X{
- X int k = *INTP( p1 ) ;
- X int obj = *INTP( p2 ) ;
- X
- X COMPARE( k, obj ) ;
- X}
- X
- X
- X#define N 10
- Xint nums[ N ] ;
- X
- Xmain()
- X{
- X dict_h lh ;
- X int i ;
- X int *ip ;
- X
- X lh = dll_create( int_comp, int_kcomp, 0, NULL ) ;
- X
- X for ( i = 0 ; i < N ; i++ )
- X {
- X nums[ i ] = 10-i ;
- X if ( dll_insert( lh, &nums[ i ] ) != DICT_OK )
- X {
- X printf( "Failed at %d\n", i ) ;
- X exit( 1 ) ;
- X }
- X }
- X
- X printf( "Successor test\n" ) ;
- X for ( ip=INTP(dll_minimum( lh )) ; ip ; ip=INTP(dll_successor( lh, ip )) )
- X printf( "%d\n", *ip ) ;
- X printf( "Predecessor test\n" ) ;
- X for ( ip=INTP(dll_maximum( lh )) ; ip ; ip=INTP(dll_predecessor( lh, ip )) )
- X printf( "%d\n", *ip ) ;
- X
- X printf( "Search/delete test\n" ) ;
- X i = 7 ;
- X ip = INTP( dll_search( lh, &i ) ) ;
- X if ( ip == NULL )
- X printf( "Search failed\n" ) ;
- X else
- X if ( dll_delete( lh, ip ) != DICT_OK )
- X {
- X printf( "Delete failed\n" ) ;
- X exit( 0 ) ;
- X }
- X
- X printf( "Successor test 2\n" ) ;
- X for ( ip=INTP(dll_minimum( lh )) ; ip ; ip=INTP(dll_successor( lh, ip )) )
- X printf( "%d\n", *ip ) ;
- X printf( "Predecessor test 2\n" ) ;
- X for ( ip=INTP(dll_maximum( lh )) ; ip ; ip=INTP(dll_predecessor( lh, ip )) )
- X printf( "%d\n", *ip ) ;
- X
- X printf( "Iteration test\n" ) ;
- X dll_iterate( lh, DICT_FROM_START ) ;
- X while ( ip = INTP( dll_nextobj( lh ) ) )
- X if ( *ip == 5 )
- X (void) dll_delete( lh, ip ) ;
- X else
- X printf( "%d\n", *ip ) ;
- X
- X exit( 0 ) ;
- X}
- END_OF_FILE
- if test 2100 -ne `wc -c <'libs/src/dict/dlltest.c'`; then
- echo shar: \"'libs/src/dict/dlltest.c'\" unpacked with wrong size!
- fi
- # end of 'libs/src/dict/dlltest.c'
- fi
- if test -f 'libs/src/fsma/fsma.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'libs/src/fsma/fsma.h'\"
- else
- echo shar: Extracting \"'libs/src/fsma/fsma.h'\" \(2026 characters\)
- sed "s/^X//" >'libs/src/fsma/fsma.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 __FSMA_H
- X#define __FSMA_H
- X
- X/*
- X * $Id: fsma.h,v 5.4 1992/10/20 21:20:34 panos Exp $
- X */
- X
- X#define __FSMA_ALIGNMENT 8
- X
- Xunion __fsma_chunk_header
- X{
- X union __fsma_chunk_header *next_chunk ;
- X char bytes[ __FSMA_ALIGNMENT ] ;
- X} ;
- X
- Xtypedef char *__fsma_pointer ;
- X
- Xstruct __fsma_header
- X{
- X union __fsma_chunk_header *chunk_chain ;
- X __fsma_pointer next_free ;
- X __fsma_pointer temp ;
- X unsigned slots_in_chunk ;
- X unsigned slot_size ;
- X unsigned chunk_size ;
- X int flags ;
- X int is_inlined ; /* header is inlined (boolean) */
- X} ;
- X
- Xtypedef struct __fsma_header *fsma_h ;
- X
- X/*
- X * Flags
- X */
- X#define FSM_NOFLAGS 0x0
- X#define FSM_RETURN_ERROR 0x1
- X#define FSM_ZERO_ALLOC 0x2
- X#define FSM_ZERO_FREE 0x4
- X#define FSM_ZERO_DESTROY 0x8
- X
- X
- X/*
- X * INTERFACE
- 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
- Xfsma_h fsm_create __ARGS( ( unsigned size, unsigned slots, int flags ) ) ;
- Xvoid fsm_destroy __ARGS( ( fsma_h handle ) ) ;
- Xchar *_fsm_alloc __ARGS( ( fsma_h handle ) ) ;
- Xvoid _fsm_free __ARGS( ( fsma_h handle, char *ptr ) ) ;
- X
- X#define fsm_alloc( fsma ) \
- X ( \
- X ( ! (fsma)->next_free || (fsma)->flags & FSM_ZERO_ALLOC ) \
- X ? _fsm_alloc( fsma ) \
- X : ((fsma)->temp = (fsma)->next_free, \
- X (fsma)->next_free = *(__fsma_pointer *) (fsma)->next_free, \
- X (char *) (fsma)->temp) \
- X )
- X
- X#define fsm_free( fsma, p ) \
- X if ( (fsma)->flags & FSM_ZERO_FREE ) \
- X _fsm_free( fsma, p ) ; \
- X else \
- X (fsma)->temp = (p), \
- X *(__fsma_pointer *) (fsma)->temp = (fsma)->next_free, \
- X (fsma)->next_free = (fsma)->temp
- X
- X#define fsm_size( fsma ) (fsma)->slot_size
- X
- X#endif /* __FSMA_H */
- X
- END_OF_FILE
- if test 2026 -ne `wc -c <'libs/src/fsma/fsma.h'`; then
- echo shar: \"'libs/src/fsma/fsma.h'\" unpacked with wrong size!
- fi
- # end of 'libs/src/fsma/fsma.h'
- fi
- if test -f 'libs/src/misc/ftwx.3' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'libs/src/misc/ftwx.3'\"
- else
- echo shar: Extracting \"'libs/src/misc/ftwx.3'\" \(2552 characters\)
- sed "s/^X//" >'libs/src/misc/ftwx.3' <<'END_OF_FILE'
- 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.\" $Id: ftwx.3,v 2.2 1992/10/31 03:08:39 panos Exp $
- X.TH FTWX 3X "25 January 1992"
- X.SH NAME
- Xftwx -- file tree walk
- X.SH SYNOPSIS
- X.LP
- X.nf
- X.ft B
- X#include "ftwx.h"
- X.LP
- X.ft B
- X.ft B
- X.ft B
- Xint ftwx( path, func, depth, flags )
- Xchar *path ;
- Xint (*func)() ;
- Xint depth ;
- Xint flags ;
- X.SH DESCRIPTION
- X.LP
- X.B ftwx()
- Xis an extension to \fIftw(3)\fR that optionally follows symbolic
- Xlinks (the default is not to follow them). It recursively descends
- Xthe directory tree whose root is \fIpath\fR. For each object it finds
- X(an object is anything that is in the file system name space,
- Xlike a directory, a socket, a regular file, a device etc.)
- Xit invokes \fIfunc()\fR passing
- Xit a pointer to a string containing the object path name (the first
- Xcomponent of the path will be \fIpath\fR), a pointer to a \fIstat()\fR
- Xstructure that contains information about the object, and a flag (of
- Xtype \fIint\fR). The user function is never invoked for the directory
- Xentries "." and "..".
- XPossible flag values are:
- X.TP 10
- X.SB FTW_D
- Xthe object is a directory
- X.TP
- X.SB FTW_DNR
- Xthe object is a directory that is not readable
- X.TP
- X.SB FTW_F
- Xthe object is not a directory
- X.TP
- X.SB FTW_NS
- Xthe \fIstat()\fR of the object failed. The value of the pointer passed
- Xto the user function is undefined. This flag value will be returned
- Xfor directory entries of a directory for which execute access is not
- Xpermitted.
- X.LP
- X\fBftwx\fR visits a directory before visiting any of the files in
- Xthe directory. The tree walk continues until the tree is exhausted,
- Xthe user function returns a negative value or some error occurs
- X(since -1 indicates an error in \fBftwx()\fR, the user function
- Xshould not return that value).
- XIf the user function returns a positive value for a directory, that
- Xdirectory is not traversed.
- XSymbolic links are followed if the \fIflag\fR is \fBFTWX_FOLLOW\fR.
- X.LP
- XThe \fBdepth\fR argument determines how deep in the tree to go. The
- Xoriginal \fIpath\fR is at depth 0. If \fIdepth\fR is \fBFTWX_ALL\fR,
- Xthere is no depth limit. However since \fBftwx()\fR uses a file
- Xdescriptor for each level of the tree, there is a limit to
- Xthe tree depth that it can process that depends on the number
- Xof available file descriptors.
- X.SH "RETURN VALUES"
- X.LP
- X\fBftwx()\fR
- Xreturns 0 if is successful, -1 if an error occurs (\fIerrno\fR is set)
- Xand the (negative) value returned by the user function if that occurs.
- X.SH "SEE ALSO"
- X.LP
- Xftw(3)
- END_OF_FILE
- if test 2552 -ne `wc -c <'libs/src/misc/ftwx.3'`; then
- echo shar: \"'libs/src/misc/ftwx.3'\" unpacked with wrong size!
- fi
- # end of 'libs/src/misc/ftwx.3'
- fi
- if test -f 'libs/src/misc/misc.3' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'libs/src/misc/misc.3'\"
- else
- echo shar: Extracting \"'libs/src/misc/misc.3'\" \(2525 characters\)
- sed "s/^X//" >'libs/src/misc/misc.3' <<'END_OF_FILE'
- 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.\" $Id: misc.3,v 2.2 1992/10/31 03:08:54 panos Exp $
- X.TH MISC 3X "25 January 1992"
- X.SH NAME
- Xmake_string, make_pathname, argv_copy_and_clear, basename, dirname - miscellaneous functions
- X.SH SYNOPSIS
- X.LP
- X.nf
- X.ft B
- X#include "misc.h"
- X.LP
- X.ft B
- Xchar *make_string( count, ... )
- Xunsigned count ;
- X.LP
- X.ft B
- Xchar *make_pathname( count, ... )
- Xunsigned count ;
- X.LP
- X.ft B
- Xchar **argv_copy_and_clear( argv, start, count )
- Xchar **argv ;
- Xint start, count ;
- X.LP
- X.ft B
- Xchar *dirname( path )
- Xchar *path ;
- X.LP
- X.ft B
- Xchar *basename( path )
- Xchar *path ;
- X.SH DESCRIPTION
- X.LP
- XThis library contain miscellaneous functions, hence the name.
- X.LP
- X.B make_string()
- Xcreates a string by catenating the list of strings passed as arguments.
- X\fIcount\fR indicates how many strings there are.
- XStrings that are
- X.SM NULL
- Xpointers are ignored.
- X\fBmake_string()\fR returns malloc'ed memory.
- X.LP
- X.B make_pathname()
- Xcreates a pathname by catenating the list of pathname components passed
- Xas arguments and inserting slashes between them.
- X\fIcount\fR indicates how many components there are.
- X\fBmake_pathname()\fR returns malloc'ed memory.
- X.LP
- X.B argv_copy_and_clear()
- Xcreates a new argv array of size \fIcount\fR, and fills it with the
- Xcontents of \fIargv\fR from \fIstart\fR up to \fIstart+count-1\fR.
- XThe original \fIargv\fR entries in that range are cleared by filling
- Xthem with
- X.SM SPACEs.
- X.LP
- X.B dirname()
- Xreturns in a malloced string containing all but the last of
- Xcomponent of \fIpath\fR. There are 2 special cases:
- Xfirst when the
- X\fIpath\fR is "/", \fBdirname()\fR will return "/",
- Xand second, when the \fIpath\fR does not contain any '/',
- X\fBdirname()\fR will return ".".
- X.LP
- X.B basename()
- Xreturns a pointer to the last component of \fIpath\fR.
- X.SH "RETURN VALUES"
- X.LP
- X\fBmake_string()\fR returns a pointer to the new string.
- XIt returns
- X.SM NULL
- Xif \fIcount\fR is 0.
- X.LP
- X\fBmake_pathname()\fR returns a pointer to the new pathname.
- XIt returns
- X.SM NULL
- Xif \fIcount\fR is 0.
- X.LP
- X\fBargv_copy_and_clear()\fR returns the new argv array. It returns
- X.SM NULL
- Xif \fImalloc\fR fails to allocate more memory.
- X.LP
- X\fBdirname()\fR returns a new string or
- X.SM NULL
- Xif \fImalloc\fR fails to allocate more memory.
- X.LP
- X\fBbasename()\fR returns a pointer to the last component of \fIpath\fR.
- X.SH BUGS
- X.LP
- XThe behavior of \fBdirname()\fR and \fBbasename()\fR is undefined if
- Xthey are given a zero-length string.
- END_OF_FILE
- if test 2525 -ne `wc -c <'libs/src/misc/misc.3'`; then
- echo shar: \"'libs/src/misc/misc.3'\" unpacked with wrong size!
- fi
- # end of 'libs/src/misc/misc.3'
- fi
- if test -f 'libs/src/pset/pset.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'libs/src/pset/pset.c'\"
- else
- echo shar: Extracting \"'libs/src/pset/pset.c'\" \(2242 characters\)
- sed "s/^X//" >'libs/src/pset/pset.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: pset.c,v 3.1 93/03/06 18:48:57 panos Exp $" ;
- Xstatic char version[] = VERSION ;
- X
- X#include "pset.h"
- X
- X#ifndef NULL
- X#define NULL 0
- X#endif
- X
- X#define ALLOC_START 20
- X#define ALLOC_STEP 10
- X
- X#define POINTER __pset_pointer
- X
- Xchar *malloc(), *realloc() ;
- X
- X
- X/*
- X * Create a pointer set and return a handle to it.
- X * Some space is initially allocated for the set.
- X */
- Xpset_h pset_create( alloc_start, alloc_step )
- X unsigned alloc_start, alloc_step ;
- X{
- X pset_h pset ;
- X unsigned start ;
- X
- X pset = (pset_h) malloc( sizeof( struct __pset ) ) ;
- X if ( pset == NULL )
- X return( NULL ) ;
- X
- X start = ( alloc_start == 0 ) ? ALLOC_START : alloc_start ;
- X pset->ptrs = (POINTER *) malloc( start * sizeof( POINTER ) ) ;
- X if ( pset->ptrs == NULL )
- X {
- X free( (char *) pset ) ;
- X return( NULL ) ;
- X }
- X
- X pset->max = start ;
- X pset->count = 0 ;
- X pset->alloc_step = ( alloc_step == 0 ) ? ALLOC_STEP : alloc_step ;
- X return( pset ) ;
- X}
- X
- X
- X/*
- X * Destroy a pset
- X */
- Xvoid pset_destroy( pset )
- X pset_h pset ;
- X{
- X free( (char *) pset->ptrs ) ;
- X free( (char *) pset ) ;
- X}
- X
- X
- X/*
- X * Insert a pointer to a pset
- X */
- XPOINTER pset_insert( pset, p )
- X pset_h pset ;
- X POINTER p ;
- X{
- X if ( pset->count >= pset->max )
- X {
- X unsigned new_max = pset->max + pset->alloc_step ;
- X POINTER *new_ptrs ;
- X
- X new_ptrs = (POINTER *) realloc(
- X (char *)pset->ptrs, new_max * sizeof( POINTER ) ) ;
- X if ( new_ptrs == NULL )
- X return( NULL ) ;
- X pset->max = new_max ;
- X pset->ptrs = new_ptrs ;
- X }
- X return( pset->ptrs[ pset->count++ ] = p ) ;
- X}
- X
- X
- X/*
- X * Remove a pointer from a pset
- X */
- Xvoid pset_delete( pset, ptr )
- X register pset_h pset ;
- X register POINTER ptr ;
- X{
- X register unsigned u = pset->count ;
- X
- X if ( u == 0 )
- X return ;
- X
- X do
- X {
- X u-- ;
- X if ( pset->ptrs[ u ] == ptr )
- X {
- X pset->ptrs[ u ] = pset->ptrs[ --pset->count ] ;
- X return ;
- X }
- X }
- X while ( u ) ;
- X}
- X
- X
- X/*
- X * Create a pset iterator
- X */
- Xpsi_h psi_create( pset )
- X pset_h pset ;
- X{
- X psi_h iter = (psi_h) malloc( sizeof( struct __pset_iterator ) ) ;
- X
- X if ( iter == NULL )
- X return( NULL ) ;
- X iter->pset = pset ;
- X return( iter ) ;
- X}
- X
- X
- END_OF_FILE
- if test 2242 -ne `wc -c <'libs/src/pset/pset.c'`; then
- echo shar: \"'libs/src/pset/pset.c'\" unpacked with wrong size!
- fi
- # end of 'libs/src/pset/pset.c'
- fi
- if test -f 'libs/src/sio/suite/Makefile' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'libs/src/sio/suite/Makefile'\"
- else
- echo shar: Extracting \"'libs/src/sio/suite/Makefile'\" \(2571 characters\)
- sed "s/^X//" >'libs/src/sio/suite/Makefile' <<'END_OF_FILE'
- 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# $Id: Makefile,v 8.2 1993/09/08 06:00:25 panos Exp $
- X#
- X
- XCC = cc -I..
- X
- X#
- X# NOTE: When using the test scripts, DEFS is provided as an
- X# argument to make, the setting of it here has no effect.
- X#
- XDEFS =
- XCFLAGS = -g $(DEFS) $(MORE_DEFS)
- XLIBOBJS = ../libsio.a
- X
- XDISTRIBUTION_FILES=copytest.c example.c print.c tietest.c buftest.c fdtest.c tester sprint_test testlib README
- X
- XALL=Sread Swrite Sputchar Sgetchar Srdline \
- X Sgetc Sputc Sfetch Sflush Sundo switch \
- X Sprint buftest tietest switch2 example fdtest evtest
- X
- Xevtest: evtest.c $(LIBOBJS)
- X $(CC) $(CFLAGS) -o $@ evtest.c $(LIBOBJS) $(LDFLAGS) || rm -f $@
- X
- Xfdtest: fdtest.c $(LIBOBJS)
- X $(CC) $(CFLAGS) -o $@ fdtest.c $(LIBOBJS) $(LDFLAGS) || rm -f $@
- X
- Xbuftest: buftest.c $(LIBOBJS)
- X $(CC) $(CFLAGS) -o $@ buftest.c $(LIBOBJS) $(LDFLAGS) || rm -f $@
- X
- XSprint: print.c $(LIBOBJS)
- X $(CC) $(CFLAGS) -o $@ print.c $(LIBOBJS) $(LDFLAGS) || rm -f $@
- X
- XSputchar: copytest.c $(LIBOBJS)
- X $(CC) $(CFLAGS) -o $@ copytest.c $(LIBOBJS) $(LDFLAGS) || rm -f $@
- X
- XSgetchar: copytest.c $(LIBOBJS)
- X $(CC) $(CFLAGS) -o $@ copytest.c $(LIBOBJS) $(LDFLAGS) || rm -f $@
- X
- XSrdline: copytest.c $(LIBOBJS)
- X $(CC) $(CFLAGS) -o $@ copytest.c $(LIBOBJS) || rm -f $@
- X
- XSread: copytest.c $(LIBOBJS)
- X $(CC) $(CFLAGS) -o $@ copytest.c $(LIBOBJS) $(LDFLAGS) || rm -f $@
- X
- XSwrite: copytest.c $(LIBOBJS)
- X $(CC) $(CFLAGS) -o $@ copytest.c $(LIBOBJS) $(LDFLAGS) || rm -f $@
- X
- XSgetc: copytest.c $(LIBOBJS)
- X $(CC) $(CFLAGS) -o $@ copytest.c $(LIBOBJS) $(LDFLAGS) || rm -f $@
- X
- XSputc: copytest.c $(LIBOBJS)
- X $(CC) $(CFLAGS) -o $@ copytest.c $(LIBOBJS) $(LDFLAGS) || rm -f $@
- X
- XSfetch: copytest.c $(LIBOBJS)
- X $(CC) $(CFLAGS) -o $@ copytest.c $(LIBOBJS) $(LDFLAGS) || rm -f $@
- X
- XSflush: copytest.c $(LIBOBJS)
- X $(CC) $(CFLAGS) -o $@ copytest.c $(LIBOBJS) $(LDFLAGS) || rm -f $@
- X
- XSundo: copytest.c $(LIBOBJS)
- X $(CC) $(CFLAGS) -o $@ copytest.c $(LIBOBJS) $(LDFLAGS) || rm -f $@
- X
- Xswitch: copytest.c $(LIBOBJS)
- X $(CC) $(CFLAGS) -o $@ copytest.c $(LIBOBJS) $(LDFLAGS) || rm -f $@
- X
- Xswitch2: copytest.c $(LIBOBJS)
- X $(CC) $(CFLAGS) -o $@ copytest.c $(LIBOBJS) $(LDFLAGS) || rm -f $@
- X
- Xtietest: tietest.c $(LIBOBJS)
- X $(CC) $(CFLAGS) -o $@ tietest.c $(LIBOBJS) $(LDFLAGS) || rm -f $@
- X
- Xexample: example.c $(LIBOBJS)
- X $(CC) $(CFLAGS) -o $@ example.c $(LIBOBJS) $(LDFLAGS) || rm -f $@
- X
- Xclean:
- X rm -f $(ALL) core
- X
- Xcheckout: $(DISTRIBUTION_FILES)
- X
- X$(DISTRIBUTION_FILES):
- X co $@
- X
- Xdist:
- X -co -q $(DISTRIBUTION_FILES)
- END_OF_FILE
- if test 2571 -ne `wc -c <'libs/src/sio/suite/Makefile'`; then
- echo shar: \"'libs/src/sio/suite/Makefile'\" unpacked with wrong size!
- fi
- # end of 'libs/src/sio/suite/Makefile'
- fi
- if test -f 'libs/src/timer/ostimer.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'libs/src/timer/ostimer.h'\"
- else
- echo shar: Extracting \"'libs/src/timer/ostimer.h'\" \(1998 characters\)
- sed "s/^X//" >'libs/src/timer/ostimer.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 OSTIMER_H
- X#define OSTIMER_H
- X
- X/*
- X * Include signal.h to get sigset_t
- X */
- X#ifndef NO_POSIX_SIGS
- X#include <signal.h>
- X#endif
- X
- X#include "pq.h"
- X
- X/*
- X * Holds a list of timers ordered by expiration time (the one at the
- X * head of the list is the one that will expire first).
- X */
- Xstruct timer_q
- X{
- X pq_h tq_handle ;
- X int tq_errno ;
- X} ;
- X
- X/*
- X * Macros to handle the priority queue
- X */
- X#define timer_pq_insert( tpq, tp ) pq_insert( tpq, (char *) tp )
- X#define timer_pq_head( tpq ) (struct timer *) pq_head( tpq )
- X#define timer_pq_extract_head( tpq ) (struct timer *) pq_extract_head( tpq )
- X#define timer_pq_delete( tpq, tp ) pq_delete( tpq, (char *) tp )
- X
- X
- Xtypedef enum { AVAILABLE, UNAVAILABLE } availability_e ;
- X
- X/*
- X * Description of a timer provided by the operating system
- X */
- Xstruct os_timer
- X{
- X availability_e ost_availability ;
- X int ost_systype ; /* e.g. ITIMER_REAL */
- X int ost_signal ; /* what signal is generated */
- X /* upon expiration */
- X enum timer_types ost_timertype ; /* e.g. TIMER_REAL */
- X void (*ost_handler)() ; /* what function to invoke */
- X void (*ost_get_current_time)() ;
- X /* how to find the current time */
- X struct timer_q ost_timerq ; /* list of timers of this type */
- X#ifndef NO_POSIX_SIGS
- X sigset_t ost_block_mask ; /* signal mask to blocks this timer */
- X#else
- X int ost_block_mask ;
- X#endif
- X} ;
- X
- Xtypedef struct os_timer ostimer_s ;
- X
- X#define OSTIMER_NULL ((ostimer_s *)0)
- X
- X#define SIGSET_NULL ((sigset_t *)0)
- X
- X/*
- X * Public functions
- X */
- Xostimer_s *__ostimer_init() ;
- Xint __ostimer_newtimer() ;
- Xint __ostimer_add() ;
- Xvoid __ostimer_interrupt() ;
- Xvoid __ostimer_remove() ;
- Xvoid __ostimer_blockall() ;
- Xvoid __ostimer_unblockall() ;
- Xvoid __ostimer_unblockall_except() ;
- X
- X#endif /* OSTIMER_H */
- X
- END_OF_FILE
- if test 1998 -ne `wc -c <'libs/src/timer/ostimer.h'`; then
- echo shar: \"'libs/src/timer/ostimer.h'\" unpacked with wrong size!
- fi
- # end of 'libs/src/timer/ostimer.h'
- fi
- if test -f 'libs/src/timer/timemacros.3' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'libs/src/timer/timemacros.3'\"
- else
- echo shar: Extracting \"'libs/src/timer/timemacros.3'\" \(2098 characters\)
- sed "s/^X//" >'libs/src/timer/timemacros.3' <<'END_OF_FILE'
- 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.\" $Id: timemacros.3,v 5.1 93/11/26 12:09:33 panos Exp $
- X.TH TIMEMACROS 3X "20 April 1993"
- X.SH NAME
- XTV_ADD, TV_SUB, TV_LT, TV_LE, TV_GT. TV_GE, TV_EQ, TV_NE, TV_ISZERO, TV_ZERO, TVP_ADD, TVP_SUB, TVP_LT, TVP_LE, TVP_GT, TVP_GE, TVP_EQ, TVP_NE, TVP_ISZERO, TVP_ZERO - macros for manipulating timeval structures
- X.SH SYNOPSIS
- X.LP
- X.nf
- X.ft B
- X#include "timemacros.h"
- X.LP
- X.ft B
- Xvoid TV_ADD( tv_res, tv1, tv2 )
- Xstruct timeval tv_res, tv1, tv2 ;
- X.LP
- X.ft B
- Xvoid TV_SUB( tv_res, tv1, tv2 )
- Xstruct timeval tv_res, tv1, tv2 ;
- X.LP
- X.ft B
- Xvoid TV_ZERO( tv )
- Xstruct timeval tv ;
- X.LP
- X.ft B
- Xint TV_LT( tv1, tv2 )
- Xstruct timeval tv1, tv2 ;
- X.LP
- X.ft B
- Xint TV_LE( tv1, tv2 )
- Xstruct timeval tv1, tv2 ;
- X.LP
- X.ft B
- Xint TV_GT( tv1, tv2 )
- Xstruct timeval tv1, tv2 ;
- X.LP
- X.ft B
- Xint TV_GE( tv1, tv2 )
- Xstruct timeval tv1, tv2 ;
- X.LP
- X.ft B
- Xint TV_EQ( tv1, tv2 )
- Xstruct timeval tv1, tv2 ;
- X.LP
- X.ft B
- Xint TV_NE( tv1, tv2 )
- Xstruct timeval tv1, tv2 ;
- X.LP
- X.ft B
- Xint TV_ISZERO( tv )
- Xstruct timeval tv ;
- X.SH DESCRIPTION
- XThere are 2 groups of macros: the
- X.I "TV_*"
- Xmacros expect arguments that are
- X.I "struct timeval's"
- Xwhile the
- X.I "TVP_*"
- Xmacros expect arguments that are pointers to
- X.I "struct timeval."
- XIn the following only the
- X.I "TV_*"
- Xmacros will be described.
- X.LP
- X.B "TV_ADD()"
- Xadds
- X.I tv1
- Xand
- X.I tv2
- Xand puts the result in
- X.I tv_res.
- XThe result is "normalized" if the number of microseconds in
- X.I tv_res
- Xexceeds 1 million.
- X.LP
- X.B "TV_SUB()"
- Xperforms the subtraction
- X.I "tv1-tv2"
- Xand places the result in
- X.I tv_res.
- XThe result is "normalized" if the number of microseconds in
- X.I tv_res
- Xbecomes negative.
- X.LP
- X.B "TV_ZERO()"
- Xsets
- X.I tv
- Xto zero seconds and zero microseconds.
- X.LP
- X.B "TV_LT(),"
- X.B "TV_LE(),"
- X.B "TV_GT(),"
- X.B "TV_GE(),"
- X.B "TV_EQ(),"
- Xand
- X.B "TV_NE()"
- Xreturn
- X.SM TRUE
- Xif
- X.I tv1
- Xis
- Xless than,
- Xless than or equal,
- Xgreater than,
- Xgreater than or equal,
- Xequal,
- Xor
- Xnot equal
- Xto
- X.I tv2,
- Xrespectively.
- X.LP
- X.B "TV_ISZERO()"
- Xreturns
- X.SM TRUE
- Xif
- X.I tv
- Xis equal to zero.
- END_OF_FILE
- if test 2098 -ne `wc -c <'libs/src/timer/timemacros.3'`; then
- echo shar: \"'libs/src/timer/timemacros.3'\" unpacked with wrong size!
- fi
- # end of 'libs/src/timer/timemacros.3'
- fi
- if test -f 'libs/src/timer/timer.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'libs/src/timer/timer.h'\"
- else
- echo shar: Extracting \"'libs/src/timer/timer.h'\" \(1993 characters\)
- sed "s/^X//" >'libs/src/timer/timer.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 __TIMER_H
- X#define __TIMER_H
- X
- X/*
- X * $Id: timer.h,v 5.1 93/11/26 12:37:23 panos Exp $
- X */
- X
- X#include <sys/time.h>
- X#include <setjmp.h>
- X
- X/*
- X * Return values
- X */
- X#define TIMER_OK 0
- X#define TIMER_ERR (-1)
- X
- X/*
- X * errno values
- X */
- X#define TIMER_ENOMEM 1
- X#define TIMER_EBADTYPE 2
- X#define TIMER_EBADSTATE 3
- X#define TIMER_EBADTIME 4
- X#define TIMER_ESIGPROBLEM 5
- X#define TIMER_ECANTINSERT 6
- X#define TIMER_ENOTAVAILABLE 7
- X
- X/*
- X * flags
- X */
- X#define TIMER_NOFLAGS 0x0
- X#define TIMER_RETURN_ERROR 0x1
- X#define TIMER_INC_VAR 0x2
- X#define TIMER_BLOCK_SAME 0x4
- X#define TIMER_BLOCK_ALL 0x8
- X#define TIMER_LONGJMP 0x10
- X
- Xenum timer_types { TIMER_REAL = 0, TIMER_VIRTUAL = 1, TIMER_PROF = 2 } ;
- Xenum timer_timetypes { TIMER_ABSOLUTE, TIMER_RELATIVE } ;
- X
- Xstruct timer_action
- X{
- X int ta_flags ;
- X void (*ta_func)() ;
- X void *ta_arg ;
- X jmp_buf ta_env ;
- 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
- Xtypedef void *timer_h ;
- X
- Xtimer_h timer_create __ARGS( (
- X enum timer_types type,
- X int flags,
- X int *errnop
- X ) ) ;
- Xvoid timer_destroy __ARGS( ( timer_h handle ) ) ;
- X
- Xint timer_start __ARGS( (
- X timer_h handle,
- X struct itimerval *itvp,
- X enum timer_times time_type,
- X struct timer_action *ap
- X ) ) ;
- Xvoid timer_stop __ARGS( ( timer_h handle ) ) ;
- X
- Xvoid timer_block __ARGS( ( timer_h handle ) ) ;
- Xvoid timer_unblock __ARGS( ( timer_h handle ) ) ;
- X
- Xunsigned timer_expirations __ARGS( ( timer_h handle ) ) ;
- X
- Xvoid timer_block_all __ARGS( ( enum timer_types type ) ) ;
- Xvoid timer_unblock_all __ARGS( ( enum timer_types type ) ) ;
- X
- Xchar *timer_strerr __ARGS( ( timer_h handle ) ) ;
- X
- Xextern int timer_errno ;
- X
- X#endif /* __TIMER_H */
- X
- END_OF_FILE
- if test 1993 -ne `wc -c <'libs/src/timer/timer.h'`; then
- echo shar: \"'libs/src/timer/timer.h'\" unpacked with wrong size!
- fi
- # end of 'libs/src/timer/timer.h'
- fi
- echo shar: End of archive 4 \(of 20\).
- cp /dev/null ark4isdone
- 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
-