home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / unix / volume27 / clc / part06 < prev    next >
Encoding:
Text File  |  1993-11-28  |  31.9 KB  |  1,187 lines

  1. Newsgroups: comp.sources.unix
  2. From: panos@anchor.cs.colorado.edu (Panos Tsirigotis)
  3. Subject: v27i112: clc - C Libraries Collection, Part06/20
  4. References: <1.754527080.23891@gw.home.vix.com>
  5. Sender: unix-sources-moderator@gw.home.vix.com
  6. Approved: vixie@gw.home.vix.com
  7.  
  8. Submitted-By: panos@anchor.cs.colorado.edu (Panos Tsirigotis)
  9. Posting-Number: Volume 27, Issue 112
  10. Archive-Name: clc/part06
  11.  
  12. #! /bin/sh
  13. # This is a shell archive.  Remove anything before this line, then unpack
  14. # it by saving it into a file and typing "sh file".  To overwrite existing
  15. # files, type "sh file -c".  You can also feed this as standard input via
  16. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  17. # will see the following message at the end:
  18. #        "End of archive 6 (of 20)."
  19. # Contents:  libs/src/dict/ht.3 libs/src/fsma/Makefile
  20. #   libs/src/fsma/fsma.3 libs/src/misc/misc.c libs/src/pq/pq.3
  21. #   libs/src/pset/Makefile libs/src/sio/events.h libs/src/str/README
  22. # Wrapped by panos@eclipse on Sun Nov 28 14:48:16 1993
  23. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  24. if test -f 'libs/src/dict/ht.3' -a "${1}" != "-c" ; then 
  25.   echo shar: Will not clobber existing file \"'libs/src/dict/ht.3'\"
  26. else
  27. echo shar: Extracting \"'libs/src/dict/ht.3'\" \(3388 characters\)
  28. sed "s/^X//" >'libs/src/dict/ht.3' <<'END_OF_FILE'
  29. X.\"(c) Copyright 1993 by Panagiotis Tsirigotis
  30. X.\"All rights reserved.  The file named COPYRIGHT specifies the terms 
  31. X.\"and conditions for redistribution.
  32. X.\"
  33. X.\" $Id: ht.3,v 3.4 93/11/23 20:07:28 panos Exp $
  34. X.TH HT 3X "23 April 1993"
  35. X.SH NAME
  36. Xht_create, ht_destroy, ht_insert, ht_insert_uniq, ht_delete, ht_search, ht_minimum, ht_maximum, ht_successor, ht_predecessor, ht_iterate, ht_nextobj - hash table management functions
  37. X.SH SYNOPSIS
  38. X.LP
  39. X.nf
  40. X.ft B
  41. X#include "dict.h"
  42. X#include "ht.h"
  43. X.LP
  44. X.ft B
  45. Xdict_h ht_create( oo_compare, ko_compare, flags, errnop, argsp )
  46. Xint (*oo_compare)( dict_obj, dict_obj ) ;
  47. Xint (*ko_compare)( dict_key, dict_obj ) ;
  48. Xint flags ;
  49. Xint *errnop ;
  50. Xstruct ht_args *argsp ;
  51. X.LP
  52. X.ft B
  53. Xvoid ht_destroy( handle )
  54. Xdict_h handle ;
  55. X.LP
  56. X.ft B
  57. Xint ht_insert( handle, object )
  58. Xdict_h handle ;
  59. Xdict_obj object ;
  60. X.LP
  61. X.ft B
  62. Xint ht_insert_uniq( handle, object, objectp )
  63. Xdict_h handle ;
  64. Xdict_obj object ;
  65. Xdict_obj *objectp ;
  66. X.LP
  67. X.ft B
  68. Xint ht_delete( handle, object )
  69. Xdict_h handle ;
  70. Xdict_obj object ;
  71. X.LP
  72. X.ft B
  73. Xdict_obj ht_search( handle, key )
  74. Xdict_h handle ;
  75. Xdict_key key ;
  76. X.LP
  77. X.ft B
  78. Xdict_obj ht_minimum( handle )
  79. Xdict_h handle ;
  80. X.LP
  81. X.ft B
  82. Xdict_obj ht_maximum( handle )
  83. Xdict_h handle ;
  84. X.LP
  85. X.ft B
  86. Xdict_obj ht_successor( handle, object )
  87. Xdict_h handle ;
  88. Xdict_obj object ;
  89. X.LP
  90. X.ft B
  91. Xdict_obj ht_predecessor( handle, object )
  92. Xdict_h handle ;
  93. Xdict_obj object ;
  94. X.LP
  95. X.ft B
  96. Xvoid ht_iterate( handle, direction )
  97. Xdict_h handle ;
  98. Xenum dict_direction direction ;
  99. X.LP
  100. X.ft B
  101. Xdict_obj ht_nextobj( handle )
  102. Xdict_h handle ;
  103. X.SH DESCRIPTION
  104. XThis library supports dictionary functions using hash tables.
  105. XA hash table is an array of linked lists which contain objects with the 
  106. Xsame hash value.
  107. X.LP
  108. X.B ht_create()
  109. Xsupports the following flags:
  110. X.RS
  111. X.TP
  112. X.SB DICT_RETURN_ERROR
  113. X.TP
  114. X.SB DICT_UNIQUE_KEYS
  115. X.TP
  116. X.SB DICT_UNORDERED
  117. X.RE
  118. X.LP
  119. XThe
  120. X.I argsp
  121. Xargument points to this structure:
  122. X.RS
  123. X.LP
  124. X.nf
  125. Xstruct ht_args
  126. X{
  127. X.RS
  128. Xunsigned ht_table_entries ;
  129. Xunsigned ht_bucket_entries ;
  130. Xht_func ht_objvalue ;
  131. Xht_func ht_keyvalue ;
  132. X.RE
  133. X} ;
  134. X.RE
  135. X.fi
  136. X.LP
  137. Xwhere
  138. X.I ht_func
  139. Xis defined as:
  140. X.LP
  141. X.nf
  142. X.RS
  143. Xtypedef ht_val (*ht_func)() ;
  144. X.RE
  145. X.fi
  146. X.LP
  147. XThe
  148. X.I ht_table_entries
  149. Xfield determines the number of entries in the hash table.
  150. XThe hash function used is a modulo function, so 
  151. Xin order to make sure that a proper number is used, the 
  152. X.I ht_table_entries
  153. Xis treated as a hint about the order of the number of entries of the table.
  154. XIf it is
  155. X.B 0
  156. Xthen a default number of entries will be used.
  157. XEvery entry in the table points to a linked list of buckets where the
  158. Xobjects are kept. The
  159. X.I ht_bucket_entries
  160. Xfield determines the number of objects in each bucket. If it is
  161. X.B 0
  162. Xa default number will be used. Otherwise, it is treated as a hint
  163. Xfor the number of entries in each bucket.
  164. XThe fields 
  165. X.I ht_table_entries
  166. Xand
  167. X.I ht_bucket_entries
  168. Xare treated as value-result parameters. On return from this function
  169. Xthey will contain the actual values that will be used for this hash
  170. Xtable.
  171. X.LP
  172. XA hash table does not order the objects stored in it; therefore the
  173. X.I direction
  174. Xargument in the
  175. X.B "ht_iterate()"
  176. Xcall is ignored.
  177. XFurthermore, the 
  178. X.B ht_minimum(),
  179. X.B ht_maxumim(),
  180. X.B ht_successor(),
  181. Xand
  182. X.B ht_predecessor()
  183. Xoperations can be used to enumerate the objects in a hash table but the
  184. Xenumeration order is arbitrary.
  185. X.SH "SEE ALSO"
  186. Xdict(3)
  187. X.SH "RETURN VALUES"
  188. XCheck
  189. X.I "dict(3)"
  190. Xfor function return values and error codes.
  191. END_OF_FILE
  192. if test 3388 -ne `wc -c <'libs/src/dict/ht.3'`; then
  193.     echo shar: \"'libs/src/dict/ht.3'\" unpacked with wrong size!
  194. fi
  195. # end of 'libs/src/dict/ht.3'
  196. fi
  197. if test -f 'libs/src/fsma/Makefile' -a "${1}" != "-c" ; then 
  198.   echo shar: Will not clobber existing file \"'libs/src/fsma/Makefile'\"
  199. else
  200. echo shar: Extracting \"'libs/src/fsma/Makefile'\" \(3441 characters\)
  201. sed "s/^X//" >'libs/src/fsma/Makefile' <<'END_OF_FILE'
  202. X# (c) Copyright 1992 by Panagiotis Tsirigotis
  203. X# All rights reserved.  The file named COPYRIGHT specifies the terms 
  204. X# and conditions for redistribution.
  205. X
  206. X#
  207. X# $Id: Makefile,v 5.6 1993/09/16 22:14:00 panos Exp $
  208. X#
  209. X# Based on Library makefile template: *Revision: 1.15 *
  210. X#
  211. X
  212. X# 
  213. X# Available entries:
  214. X#         lib             --> creates the library
  215. X#        install        --> installs the library (archive, man page(s), header(s))
  216. X#        uninstall    --> uninstall the library
  217. X#        clean            --> removes all .o and .a files
  218. X#        spotless        --> clean + uninstall
  219. X#         lint            --> lints a file (usage: make lint MODULE=foo.c)
  220. X#        tags            --> creates a tags file (from the SOURCES and HEADERS)
  221. X#        checkout     --> checkout all files
  222. X#        dist            --> distribution support
  223. X#
  224. X
  225. XNAME                = fsma
  226. XVERSION            = 2.0.2
  227. X
  228. XHEADERS            = fsma.h impl.h
  229. XSOURCES            = fsma.c
  230. XOBJECTS            = fsma.o
  231. X
  232. XMANFILES            = fsma.3
  233. XINCLUDEFILES    = fsma.h
  234. X
  235. X# The following variables are used by the 'install' entry and
  236. X# should be customized:
  237. X#     LIBDIR:     where the library will be placed
  238. X#     INCUDEDIR:  where the include files will be placed
  239. X#     MANDIR:     where the man pages will be placed
  240. X#
  241. XLIBDIR            = $(HOME)/.links/libraries/$(ARCH)
  242. XMANDIR            = $(HOME)/.links/manpages/man3
  243. XINCLUDEDIR        = $(HOME)/.links/includes
  244. X
  245. XDEFS                =                # used for command line defined flags
  246. XDEBUG                = -g                # -g or -O
  247. XVERSION_DEF        = -DVERSION=\"FSMA\ Version\ $(VERSION)\"
  248. X
  249. XCPP_DEFS            = $(VERSION_DEF) $(DEFS)
  250. X
  251. X#
  252. X# The following variables shouldn't need to be changed
  253. X#
  254. XLINT_FLAGS        = -hbux
  255. XCPP_FLAGS        = $(CPP_DEFS)
  256. XCC_FLAGS            = $(DEBUG)
  257. XCFLAGS            = $(CPP_FLAGS) $(CC_FLAGS)
  258. X
  259. XINSTALL            = install -c
  260. XFMODE                = -m 640            # used by install
  261. XRANLIB            = ranlib
  262. X
  263. XPAGER                = less
  264. X
  265. X
  266. XLIBNAME            = lib$(NAME).a
  267. X
  268. Xlib: $(LIBNAME)
  269. X
  270. Xlibopt: clean
  271. X    make DEBUG=-O lib
  272. X    $(INSTALL) $(FMODE) $(LIBNAME) $(LIBDIR)/optimized
  273. X
  274. X$(LIBNAME): $(OBJECTS)
  275. X    ar r $@ $?
  276. X    $(RANLIB) $@
  277. X
  278. Xlint:
  279. X    lint $(CPP_FLAGS) $(LINT_FLAGS) $(MODULE) 2>&1 | $(PAGER)
  280. X
  281. Xinstall: $(LIBNAME)
  282. X    @if test "$(LIBDIR)" -a "$(INCLUDEDIR)" -a "$(MANDIR)" ;\
  283. X    then \
  284. X        $(INSTALL) $(FMODE) $(LIBNAME) $(LIBDIR) ;\
  285. X        echo "Installed $(LIBNAME) to $(LIBDIR)" ;\
  286. X        for i in $(INCLUDEFILES); do $(INSTALL) $(FMODE) $$i $(INCLUDEDIR) ; done ;\
  287. X        echo Installed $(INCLUDEFILES) to $(INCLUDEDIR) ;\
  288. X        for i in $(MANFILES) ; do $(INSTALL) $(FMODE) $$i $(MANDIR) ; done ;\
  289. X        echo Installed $(MANFILES) to $(MANDIR) ;\
  290. X    else \
  291. X        echo "You forgot to set one of the following variables: LIBDIR,INCLUDEDIR,MANDIR" ;\
  292. X    fi
  293. X
  294. Xuninstall:
  295. X    a=`pwd` ; cd $(INCLUDEDIR) ;\
  296. X    if test $$a != `pwd` ; then rm -f $(INCLUDEFILES) ; fi
  297. X    a=`pwd` ; cd $(LIBDIR) ;\
  298. X    if test $$a != `pwd` ; then rm -f $(LIBNAME) ; fi
  299. X    a=`pwd` ; cd $(MANDIR) ;\
  300. X    if test $$a != `pwd` ; then rm -f $(MANFILES) ; fi
  301. X
  302. Xclean:
  303. X    rm -f $(OBJECTS) $(LIBNAME) core
  304. X
  305. Xspotless: clean uninstall
  306. X
  307. Xtags: $(SOURCES) $(HEADERS)
  308. X    ctags -w $(SOURCES) $(HEADERS)
  309. X
  310. Xcheckout:
  311. X    co $(SOURCES) $(HEADERS) $(MANFILES)
  312. X
  313. X#
  314. X# Distribution section
  315. X# This section contains the 2 targets for distribution support: dist, dirs
  316. X# "dist" checks out all files to be distributed
  317. X# "dirs" prints a list of directories to be included in the distribution.
  318. X# These directories should have a Makefile with a "dist" target
  319. X#
  320. XDISTRIBUTION_FILES    = $(SOURCES) $(HEADERS) $(MANFILES)
  321. XDIRS                        =
  322. X
  323. Xdist:
  324. X    -co -q $(DISTRIBUTION_FILES)
  325. X
  326. Xdirs:
  327. X    @echo $(DIRS)
  328. X
  329. X#
  330. X# PUT HERE THE RULES TO MAKE THE OBJECT FILES
  331. X#
  332. Xfsma.o: fsma.h impl.h
  333. X
  334. X#
  335. X# Test program
  336. X#
  337. Xftest: ftest.c $(LIBNAME)
  338. X    $(CC) -g ftest.c -o $@ $(LIBNAME)
  339. X
  340. END_OF_FILE
  341. if test 3441 -ne `wc -c <'libs/src/fsma/Makefile'`; then
  342.     echo shar: \"'libs/src/fsma/Makefile'\" unpacked with wrong size!
  343. fi
  344. # end of 'libs/src/fsma/Makefile'
  345. fi
  346. if test -f 'libs/src/fsma/fsma.3' -a "${1}" != "-c" ; then 
  347.   echo shar: Will not clobber existing file \"'libs/src/fsma/fsma.3'\"
  348. else
  349. echo shar: Extracting \"'libs/src/fsma/fsma.3'\" \(3227 characters\)
  350. sed "s/^X//" >'libs/src/fsma/fsma.3' <<'END_OF_FILE'
  351. X.\"(c) Copyright 1992 by Panagiotis Tsirigotis
  352. X.\"All rights reserved.  The file named COPYRIGHT specifies the terms 
  353. X.\"and conditions for redistribution.
  354. X.\"
  355. X.\" $Id: fsma.3,v 5.1 1992/10/10 07:23:18 panos Exp $
  356. X.TH FSMA 3X "10 October 1992"
  357. X.SH NAME
  358. Xfsm_create, fsm_destroy, fsm_alloc, fsm_free, fsm_size - fixed size memory allocator
  359. X.SH SYNOPSIS
  360. X.LP
  361. X.nf
  362. X.ft B
  363. X#include "fsma.h"
  364. X.LP
  365. X.ft B
  366. Xfsma_h fsm_create( size, slots_per_chunk, flags )
  367. Xunsigned size ;
  368. Xunsigned slots_per_chunk ;
  369. Xint flags ;
  370. X.LP
  371. X.ft B
  372. Xvoid fsm_destroy( handle )
  373. Xfsma_h handle ;
  374. X.LP
  375. X.ft B
  376. Xchar *fsm_alloc( handle )
  377. Xfsma_h handle ;
  378. X.LP
  379. X.ft B
  380. Xvoid fsm_free( handle, ptr )
  381. Xfsma_h handle ;
  382. Xchar *ptr ;
  383. X.LP
  384. X.ft B
  385. Xunsigned fsm_size( handle )
  386. Xfsma_h handle ;
  387. X.SH DESCRIPTION
  388. XThe fixed-size memory allocator routines allocate and free memory in 
  389. Xfixed-size quantities.
  390. XThe basic operation is as follows: first \fBfsm_create()\fR
  391. Xis called to create an allocator for objects that are \fIsize\fR
  392. Xbytes big. It returns an allocator handle (whose type is \fIfsma_h\fR).
  393. XEverytime \fBfsm_alloc()\fR
  394. Xis called with that handle as an argument, it will return a pointer
  395. Xto a memory block of \fIsize\fR bytes.
  396. X.B fsm_alloc()
  397. Xworks by allocating big chunks of memory, breaking them into
  398. Xblocks of \fIsize\fR bytes
  399. Xand then allocating from that pool of blocks.
  400. X.LP
  401. X.B fsm_create()
  402. Xcreates a memory allocator for objects of \fIsize\fR bytes. The second
  403. Xargument determines the size of the chunks that are allocated
  404. Xbecause it defines how many objects should fit in a chunk. If
  405. X\fIslots_per_chunk\fR is 0, \fBfsm_create()\fR will use a default chunk size.
  406. XThe \fIflags\fR argument is formed by ORing one or more of the following
  407. Xconstants:
  408. X.TP 20
  409. X.SB FSM_RETURN_ERROR
  410. Xdetermines the behavior of the particular allocator
  411. Xin case of a \fBmalloc()\fR failure. When used, the call that
  412. Xfailed will return a value that indicates failure
  413. X(the default behavior is to terminate the process)
  414. X.TP
  415. X.SB FSM_ZERO_ALLOC
  416. Xwill cause memory blocks returned from the specified allocator
  417. Xby \fBfsm_alloc()\fR to be zeroed.
  418. X.TP
  419. X.SB FSM_ZERO_FREE
  420. Xwill cause memory blocks returned to the specified allocator by 
  421. X\fBfsm_free()\fR to be zeroed.
  422. X(this will help catch references to an object after free'ing it).
  423. X.TP
  424. X.SB FSM_ZERO_DESTROY
  425. Xwill cause all memory associated with the allocator to be zeroed
  426. Xwhen the allocator is destroyed.
  427. X.LP
  428. XThe constant \fBFSM_NOFLAGS\fR can be used to specify no flags.
  429. X.LP
  430. X.B fsm_destroy()
  431. Xdestroys an allocator and frees all memory allocated by it.
  432. X.LP
  433. X.B fsm_alloc()
  434. Xallocates a memory block from the specified allocator. The block
  435. Xwill be properly aligned.
  436. X.LP
  437. X.B fsm_free()
  438. Xreturns a block to the specified allocator.
  439. X.LP
  440. X.B fsm_size()
  441. Xreturns the size of blocks that are handed out by the specified allocator.
  442. X.SH RETURN VALUES
  443. X.LP
  444. X.B fsm_create()
  445. Xreturns an allocator handle, or
  446. X.SM NULL
  447. Xif the request fails.
  448. X.LP
  449. X.B fsm_alloc()
  450. Xreturns a pointer to a memory block of the appropriate size or
  451. X.SM NULL
  452. Xif the request fails.
  453. X.SH NOTES
  454. X.B fsm_alloc(),
  455. X.B fsm_free()
  456. Xand
  457. X.B fsm_size()
  458. Xare macros, so the & operator cannot be applied to them
  459. X(if that is needed, you can use the functions
  460. X.B _fsm_alloc()
  461. Xand
  462. X.B _fsm_free()
  463. Xthat perform the same job as the macros).
  464. END_OF_FILE
  465. if test 3227 -ne `wc -c <'libs/src/fsma/fsma.3'`; then
  466.     echo shar: \"'libs/src/fsma/fsma.3'\" unpacked with wrong size!
  467. fi
  468. # end of 'libs/src/fsma/fsma.3'
  469. fi
  470. if test -f 'libs/src/misc/misc.c' -a "${1}" != "-c" ; then 
  471.   echo shar: Will not clobber existing file \"'libs/src/misc/misc.c'\"
  472. else
  473. echo shar: Extracting \"'libs/src/misc/misc.c'\" \(3395 characters\)
  474. sed "s/^X//" >'libs/src/misc/misc.c' <<'END_OF_FILE'
  475. X/*
  476. X * (c) Copyright 1992 by Panagiotis Tsirigotis
  477. X * All rights reserved.  The file named COPYRIGHT specifies the terms 
  478. X * and conditions for redistribution.
  479. X */
  480. X
  481. Xstatic char RCSid[] = "$Id: misc.c,v 2.1 1992/10/01 00:38:29 panos Exp $" ;
  482. Xstatic char misc_version[] = VERSION ;
  483. X
  484. X#include <varargs.h>
  485. X
  486. X/*
  487. X * MISCELLANEOUS FUNCTIONS
  488. X */
  489. X
  490. X#include "misc.h"
  491. X
  492. X#ifndef NULL
  493. X#define NULL        0
  494. X#endif
  495. X
  496. Xchar *strncpy() ;
  497. Xchar *strrchr() ;
  498. X
  499. X
  500. X/*
  501. X * Create a new argv array,
  502. X * copy the original to the new one,
  503. X * and clear the old one
  504. X */
  505. Xchar **argv_copy_and_clear( org_argv, start, count )
  506. X    char **org_argv ;                            /* original argv */
  507. X    int start ;                                    /* from where to start copy/clear */
  508. X    int count ;                                    /* how many entries to copy/clear */
  509. X{
  510. X    char **new_argv ;
  511. X    char *p ;
  512. X    int i ;
  513. X    int j ;
  514. X    char *malloc() ;
  515. X
  516. X    new_argv = (char **) malloc( count * sizeof( char * ) ) ;
  517. X    if ( new_argv == NULL )
  518. X        return( NULL ) ;
  519. X
  520. X    for ( i = 0 ; i < count ; i++ )
  521. X    {
  522. X        new_argv[ i ] = make_string( 1, org_argv[ start+i ] ) ;
  523. X        if ( new_argv[ i ] == NULL )
  524. X        {
  525. X            for ( j = i-1 ; j >= 0 ; j-- )
  526. X                free( new_argv[ j ] ) ;
  527. X            free( (char *) new_argv ) ;
  528. X            return( NULL ) ;
  529. X        }
  530. X        for ( p = org_argv[ start+i ] ; *p ; p++ )
  531. X            *p = ' ' ;
  532. X    }
  533. X    return( new_argv ) ;
  534. X}
  535. X
  536. X
  537. X/*
  538. X * We always return a pointer in pathname
  539. X */
  540. Xchar *basename( pathname )
  541. X    char *pathname ;
  542. X{
  543. X    char *s = strrchr( pathname, '/' ) ;
  544. X
  545. X    if ( s == NULL )
  546. X        return( pathname ) ;
  547. X    else
  548. X        return( s+1 ) ;
  549. X}
  550. X
  551. X
  552. X/*
  553. X * We always return a malloced string
  554. X *
  555. X * There are 2 special cases:
  556. X *
  557. X *        1) pathname == "/"
  558. X *                In this case we return "/"
  559. X *        2) pathname does not contain a '/'
  560. X *                In this case we return "."
  561. X */
  562. Xchar *dirname( pathname )
  563. X    char *pathname ;
  564. X{
  565. X    int len ;
  566. X    char *s = strrchr( pathname, '/' ) ;
  567. X    char *p ;
  568. X    char *malloc() ;
  569. X
  570. X    if ( s == NULL )
  571. X        return( make_string( 1, "." ) ) ;
  572. X    else
  573. X    {
  574. X        len = s - pathname ;
  575. X        if ( len == 0 )
  576. X            return( make_string( 1, "/" ) ) ;
  577. X    }
  578. X
  579. X    p = malloc( len+1 ) ;
  580. X    if ( p == NULL )
  581. X        return( NULL ) ;
  582. X    else
  583. X    {
  584. X        strncpy( p, pathname, len )[ len ] = '\0' ;
  585. X        return( p ) ;
  586. X    }
  587. X}
  588. X
  589. X
  590. Xchar *make_string( count, va_alist )
  591. X    register unsigned count ;
  592. X    va_dcl
  593. X{
  594. X    va_list ap ;
  595. X    register unsigned i ;
  596. X    register unsigned len = 0 ;
  597. X    register char *s, *p ;
  598. X    char *new_string ;
  599. X
  600. X    if ( count == 0 )
  601. X        return( NULL ) ;
  602. X
  603. X    va_start( ap ) ;
  604. X    for ( i = 0 ; i < count ; i++ )
  605. X    {
  606. X        s = va_arg( ap, char * ) ;
  607. X        if ( s == NULL )
  608. X            continue ;
  609. X        len += strlen( s ) ;
  610. X    }
  611. X    va_end( ap ) ;
  612. X
  613. X    new_string = malloc( len + 1 ) ;
  614. X    if ( new_string == NULL )
  615. X        return( NULL ) ;
  616. X
  617. X    p = new_string ;
  618. X    va_start( ap ) ;
  619. X    for ( i = 0 ; i < count ; i++ )
  620. X    {
  621. X        s = va_arg( ap, char * ) ;
  622. X        if ( s == NULL )
  623. X            continue ;
  624. X        while ( *p++ = *s++ ) ;
  625. X        p-- ;
  626. X    }
  627. X    va_end( ap ) ;
  628. X    return( new_string ) ;
  629. X}
  630. X
  631. X
  632. Xchar *make_pathname( count, va_alist )
  633. X    register unsigned count ;
  634. X    va_dcl
  635. X{
  636. X    va_list ap ;
  637. X    register unsigned i ;
  638. X    register unsigned len = 0 ;
  639. X    register char *s, *p ;
  640. X    char *pathname ;
  641. X
  642. X    if ( count == 0 )
  643. X        return( NULL ) ;
  644. X
  645. X    va_start( ap ) ;
  646. X    for ( i = 0 ; i < count ; i++ )
  647. X    {
  648. X        s = va_arg( ap, char * ) ;
  649. X        len += strlen( s ) ;
  650. X    }
  651. X    va_end( ap ) ;
  652. X
  653. X    pathname = malloc( len + count ) ;
  654. X    if ( pathname == NULL )
  655. X        return( NULL ) ;
  656. X    
  657. X    p = pathname ;
  658. X    va_start( ap ) ;
  659. X    for ( i = 0 ; i < count ; i++ )
  660. X    {
  661. X        s = va_arg( ap, char * ) ;
  662. X        while ( *p++ = *s++ ) ;
  663. X        *(p-1) = '/' ;            /* change '\0' to '/' */
  664. X    }
  665. X    *(p-1) = '\0' ;
  666. X    return( pathname ) ;
  667. X}
  668. X
  669. END_OF_FILE
  670. if test 3395 -ne `wc -c <'libs/src/misc/misc.c'`; then
  671.     echo shar: \"'libs/src/misc/misc.c'\" unpacked with wrong size!
  672. fi
  673. # end of 'libs/src/misc/misc.c'
  674. fi
  675. if test -f 'libs/src/pq/pq.3' -a "${1}" != "-c" ; then 
  676.   echo shar: Will not clobber existing file \"'libs/src/pq/pq.3'\"
  677. else
  678. echo shar: Extracting \"'libs/src/pq/pq.3'\" \(3310 characters\)
  679. sed "s/^X//" >'libs/src/pq/pq.3' <<'END_OF_FILE'
  680. X.\"(c) Copyright 1993 by Panagiotis Tsirigotis
  681. X.\"All rights reserved.  The file named COPYRIGHT specifies the terms 
  682. X.\"and conditions for redistribution.
  683. X.\"
  684. X.\" $Id: pq.3,v 1.4 1993/05/06 06:52:47 panos Exp $
  685. X.TH PQ 3PT "22 December 1991"
  686. X.SH NAME
  687. Xpq_create, pq_destroy, pq_head, pq_extract_head, pq_insert, pq_delete - functions that manage priority queues
  688. X.SH SYNOPSIS
  689. X.LP
  690. X.nf
  691. X.ft B
  692. X#include "pq.h"
  693. X.LP
  694. X.ft B
  695. Xpq_h pq_create( func, flags, errnop )
  696. Xint (*func)() ;
  697. Xint flags ;
  698. Xint *errnop ;
  699. X.LP
  700. X.ft B
  701. Xvoid pq_destroy( pq )
  702. Xpq_h pq ;
  703. X.LP
  704. X.ft B
  705. Xpq_obj pq_head( pq )
  706. Xpq_h pq ;
  707. X.LP
  708. X.ft B
  709. Xpq_obj pq_extract_head( pq )
  710. Xpq_h pq ;
  711. X.LP
  712. X.ft B
  713. Xint pq_insert( pq, object )
  714. Xpq_h pq ;
  715. Xpq_obj object ;
  716. X.LP
  717. X.ft B
  718. Xint pq_delete( pq, object )
  719. Xpq_h pq ;
  720. Xpq_obj object ;
  721. X.SH DESCRIPTION
  722. X.LP
  723. XThis library handles priority queues that contain objects. Objects are
  724. Xof type
  725. X.I pq_obj
  726. Xwhich is a pointer type.
  727. XThe object at the head of a priority queue is the 
  728. X.I best
  729. Xobject. The
  730. Xuser defines the ordering by providing a function that compares objects
  731. Xwhen the priority queue is created.
  732. X.LP
  733. X.B pq_create()
  734. Xcreates a priority queue and returns a handle to be used for operations
  735. Xon that queue. \fIfunc\fR is a pointer to a function that takes 2 objects
  736. Xas arguments and returns 1 if the first object is 
  737. X.I "better" 
  738. Xthan the
  739. Xsecond and 0 otherwise. The only possible value for the \fIflags\fR
  740. Xargument is \fBPQ_RETURN_ERROR\fR which if used will cause queue
  741. Xoperations applied on the specific priority queue to return an error
  742. Xstatus if they fail (the default is to terminate the program with
  743. Xan appropriate error message). The value \fBPQ_NOFLAGS\fR can be
  744. Xused to specify no flags.
  745. XThe \fIerrnop\fR argument is a pointer to an integer where an
  746. Xerror code will be stored if an operation fails
  747. X(and \fBPQ_RETURN_ERROR\fR is used). If no pointer is specified,
  748. Xerror codes are placed in the global variable \fIpq_error\fR.
  749. X.LP
  750. X.B pq_destroy()
  751. Xis used to destroy a priority queue.
  752. X.LP
  753. X.B pq_head()
  754. Xreturns the object at the head of the priority queue.
  755. X.LP
  756. X.B pq_extract_head()
  757. Xextracts and returns the object at the head of the priority queue.
  758. X.LP
  759. X.B pq_insert()
  760. Xinserts the given \fIobject\fR in the priority queue.
  761. X.LP
  762. X.B pq_delete()
  763. Xdeletes the given \fIobject\fR from the priority queue.
  764. X.SH "RETURN VALUES"
  765. X.LP
  766. XIn the following, values for \fIpq_errno\fR will be stored in the
  767. Xuser-specified variable if one was provided.
  768. X.LP
  769. X.B pq_create()
  770. Xreturns a priority queue handle if successful, or 
  771. X.SM NULL
  772. Xif it fails.
  773. XPossible \fIpq_errno\fR values:
  774. X.RS
  775. X.TP 20
  776. X.SB PQ_ENOFUNC
  777. XThe object comparison function is missing.
  778. X.TP
  779. X.SB PQ_ENOMEM
  780. XThe program ran out of memory.
  781. X.RE
  782. X.LP
  783. X.B pq_insert()
  784. Xreturns \fBPQ_OK\fR if successful and \fBPQ_ERR\fR if it fails.
  785. XPossible \fIpq_errno\fR values:
  786. X.RS
  787. X.TP 20
  788. X.SB PQ_ENULLOBJECT
  789. XThe object value is
  790. X.SM NULL.
  791. X.TP
  792. X.SB PQ_ENOMEM
  793. XThe program ran out of memory.
  794. X.RE
  795. X.LP
  796. X.B pq_head()
  797. Xreturns the object at the head of the queue or
  798. X.SM NULL
  799. Xif the queue is empty.
  800. X.LP
  801. X.B pq_extract_head()
  802. Xreturns the object at the head of the queue or
  803. X.SM NULL
  804. Xif the queue is empty.
  805. X.LP
  806. X.B pq_delete()
  807. Xreturns \fBPQ_OK\fR if successful and \fBPQ_ERR\fR if it fails.
  808. XPossible \fIpq_errno\fR values:
  809. X.RS
  810. X.TP 20
  811. X.SB PQ_ENULLOBJECT
  812. XThe object value is
  813. X.SM NULL.
  814. X.TP
  815. X.SB PQ_ENOTFOUND
  816. XThe object is not in the queue.
  817. X.RE
  818. END_OF_FILE
  819. if test 3310 -ne `wc -c <'libs/src/pq/pq.3'`; then
  820.     echo shar: \"'libs/src/pq/pq.3'\" unpacked with wrong size!
  821. fi
  822. # end of 'libs/src/pq/pq.3'
  823. fi
  824. if test -f 'libs/src/pset/Makefile' -a "${1}" != "-c" ; then 
  825.   echo shar: Will not clobber existing file \"'libs/src/pset/Makefile'\"
  826. else
  827. echo shar: Extracting \"'libs/src/pset/Makefile'\" \(3361 characters\)
  828. sed "s/^X//" >'libs/src/pset/Makefile' <<'END_OF_FILE'
  829. X# (c) Copyright 1992, 1993 by Panagiotis Tsirigotis
  830. X# All rights reserved.  The file named COPYRIGHT specifies the terms 
  831. X# and conditions for redistribution.
  832. X
  833. X#
  834. X# $Id: Makefile,v 3.3 93/11/23 19:49:23 panos Exp $
  835. X#
  836. X# Based on Library makefile template: *Revision: 1.15 *
  837. X#
  838. X
  839. X# 
  840. X# Available entries:
  841. X#         lib             --> creates the library
  842. X#        install        --> installs the library (archive, man page(s), header(s))
  843. X#        uninstall    --> uninstall the library
  844. X#        clean            --> removes all .o and .a files
  845. X#        spotless        --> clean + uninstall
  846. X#         lint            --> lints a file (usage: make lint MODULE=foo.c)
  847. X#        tags            --> creates a tags file (from the SOURCES and HEADERS)
  848. X#        checkout     --> checkout all files
  849. X#        dist            --> distribution support
  850. X#
  851. X
  852. XNAME                = pset
  853. XVERSION            = 1.2.1
  854. X
  855. XHEADERS            = pset.h
  856. XSOURCES            = pset.c ops.c
  857. XOBJECTS            = pset.o ops.o
  858. X
  859. XMANFILES            = pset.3 psi.3
  860. XINCLUDEFILES    = pset.h
  861. X
  862. X# The following variables are used by the 'install' entry and
  863. X# should be customized:
  864. X#     LIBDIR:     where the library will be placed
  865. X#     INCUDEDIR:  where the include files will be placed
  866. X#     MANDIR:     where the man pages will be placed
  867. X#
  868. XLIBDIR            = $(HOME)/.links/libraries/$(ARCH)
  869. XMANDIR            = $(HOME)/.links/manpages/man3
  870. XINCLUDEDIR        = $(HOME)/.links/includes
  871. X
  872. XDEFS                =                # used for command line defined flags
  873. XDEBUG                = -g                # -g or -O
  874. XVERSION_DEF        = -DVERSION=\"PSET\ Version\ $(VERSION)\"
  875. X
  876. XCPP_DEFS            = $(VERSION_DEF) $(DEFS)
  877. X
  878. X#
  879. X# The following variables shouldn't need to be changed
  880. X#
  881. XLINT_FLAGS        = -hbux
  882. XCPP_FLAGS        = $(CPP_DEFS)
  883. XCC_FLAGS            = $(DEBUG)
  884. XCFLAGS            = $(CPP_FLAGS) $(CC_FLAGS)
  885. X
  886. XINSTALL            = install -c
  887. XFMODE                = -m 640            # used by install
  888. XRANLIB            = ranlib
  889. X
  890. XPAGER                = less
  891. X
  892. X
  893. XLIBNAME            = lib$(NAME).a
  894. X
  895. Xlib: $(LIBNAME)
  896. X
  897. Xlibopt: clean
  898. X    make DEBUG=-O lib
  899. X    mv $(LIBNAME) $(LIBDIR)/optimized
  900. X
  901. X$(LIBNAME): $(OBJECTS)
  902. X    ar r $@ $?
  903. X    $(RANLIB) $@
  904. X
  905. Xlint:
  906. X    lint $(CPP_FLAGS) $(LINT_FLAGS) $(MODULE) 2>&1 | $(PAGER)
  907. X
  908. Xinstall: $(LIBNAME)
  909. X    @if test "$(LIBDIR)" -a "$(INCLUDEDIR)" -a "$(MANDIR)" ;\
  910. X    then \
  911. X        $(INSTALL) $(FMODE) $(LIBNAME) $(LIBDIR) ;\
  912. X        echo "Installed $(LIBNAME) to $(LIBDIR)" ;\
  913. X        for i in $(INCLUDEFILES); do $(INSTALL) $(FMODE) $$i $(INCLUDEDIR) ; done ;\
  914. X        echo Installed $(INCLUDEFILES) to $(INCLUDEDIR) ;\
  915. X        for i in $(MANFILES) ; do $(INSTALL) $(FMODE) $$i $(MANDIR) ; done ;\
  916. X        echo Installed $(MANFILES) to $(MANDIR) ;\
  917. X    else \
  918. X        echo "You forgot to set one of the following variables: LIBDIR,INCLUDEDIR,MANDIR" ;\
  919. X    fi
  920. X
  921. Xuninstall:
  922. X    a=`pwd` ; cd $(INCLUDEDIR) ;\
  923. X    if test $$a != `pwd` ; then rm -f $(INCLUDEFILES) ; fi
  924. X    a=`pwd` ; cd $(LIBDIR) ;\
  925. X    if test $$a != `pwd` ; then rm -f $(LIBNAME) ; fi
  926. X    a=`pwd` ; cd $(MANDIR) ;\
  927. X    if test $$a != `pwd` ; then rm -f $(MANFILES) ; fi
  928. X
  929. Xclean:
  930. X    rm -f $(OBJECTS) $(LIBNAME) core
  931. X
  932. Xspotless: clean uninstall
  933. X
  934. Xtags: $(SOURCES) $(HEADERS)
  935. X    ctags -w $(SOURCES) $(HEADERS)
  936. X
  937. Xcheckout:
  938. X    co $(SOURCES) $(HEADERS) $(MANFILES)
  939. X
  940. X#
  941. X# Distribution section
  942. X# This section contains the 2 targets for distribution support: dist, dirs
  943. X# "dist" checks out all files to be distributed
  944. X# "dirs" prints a list of directories to be included in the distribution.
  945. X# These directories should have a Makefile with a "dist" target
  946. X#
  947. XDISTRIBUTION_FILES    = $(SOURCES) $(HEADERS) $(MANFILES) COPYRIGHT
  948. XDIRS                        =
  949. X
  950. Xdist:
  951. X    -co -q $(DISTRIBUTION_FILES)
  952. X
  953. Xdirs:
  954. X    @echo $(DIRS)
  955. X
  956. X#
  957. X# PUT HERE THE RULES TO MAKE THE OBJECT FILES
  958. X#
  959. Xpset.o: pset.h
  960. X
  961. END_OF_FILE
  962. if test 3361 -ne `wc -c <'libs/src/pset/Makefile'`; then
  963.     echo shar: \"'libs/src/pset/Makefile'\" unpacked with wrong size!
  964. fi
  965. # end of 'libs/src/pset/Makefile'
  966. fi
  967. if test -f 'libs/src/sio/events.h' -a "${1}" != "-c" ; then 
  968.   echo shar: Will not clobber existing file \"'libs/src/sio/events.h'\"
  969. else
  970. echo shar: Extracting \"'libs/src/sio/events.h'\" \(3168 characters\)
  971. sed "s/^X//" >'libs/src/sio/events.h' <<'END_OF_FILE'
  972. X/*
  973. X * (c) Copyright 1992, 1993 by Panagiotis Tsirigotis
  974. X * All rights reserved.  The file named COPYRIGHT specifies the terms 
  975. X * and conditions for redistribution.
  976. X */
  977. X
  978. X
  979. X/*
  980. X * $Id: events.h,v 8.1 1993/03/13 01:13:58 panos Exp $
  981. X */
  982. X
  983. X/*
  984. X * Event codes
  985. X * 
  986. X * We use a 2 letter code so that events that accumulate in a buffer
  987. X * can be displayed as a string
  988. X * We follow the convention that the first event letter is a capitalized
  989. X * and the second letter is in lower case. This allows one to easily
  990. X * recognize events in an event string.
  991. X */
  992. X
  993. X/*
  994. X * The ENCODE macro takes 2 characters and creates a short integer
  995. X * The size of the short integer is assumed to be 16-bits.
  996. X * The macro makes sure that regardless of the endianess of the machine,
  997. X * the low order byte contains the 1st character and the high order byte
  998. X * contains the 2nd character.
  999. X */
  1000. X#ifdef LITTLE_ENDIAN
  1001. X#define ENCODE( c1, c2 )                    ( (c1) + ( (c2) << 8 ) )
  1002. X#else        /* BIG_ENDIAN */
  1003. X#define ENCODE( c1, c2 )                    ( (c2) + ( (c1) << 8 ) )
  1004. X#endif
  1005. X
  1006. X/*
  1007. X * Event codes for SIO interface functions
  1008. X * We use the first 2 lettes after the initial 'S'
  1009. X */
  1010. X#define EV_SGETC                        ENCODE( 'G', 'e' )
  1011. X#define EV_SPUTC                        ENCODE( 'P', 'u' )
  1012. X#define EV_SREAD                        ENCODE( 'R', 'e' )
  1013. X#define EV_SWRITE                        ENCODE( 'W', 'r' ) 
  1014. X#define EV_SRDLINE                    ENCODE( 'R', 'd' )
  1015. X#define EV_SFETCH                        ENCODE( 'F', 'e' )
  1016. X#define EV_SUNDO                        ENCODE( 'U', 'n' )
  1017. X#define EV_SDONE                        ENCODE( 'D', 'o' )
  1018. X#define EV_SFLUSH                        ENCODE( 'F', 'l' )
  1019. X#define EV_SCLOSE                        ENCODE( 'C', 'l' )
  1020. X#define EV_STIE                        ENCODE( 'T', 'i' )
  1021. X#define EV_SUNTIE                        ENCODE( 'U', 't' )
  1022. X#define EV_SBUFTYPE                    ENCODE( 'B', 'u' )
  1023. X
  1024. X/*
  1025. X * Event codes for internal functions
  1026. X * For the __sio_<name> functions we use 'S' and the first letter of <name>
  1027. X * For the rest we use the first letter from the first two components of
  1028. X * their name, for example for try_memory_mapping we use Tm.
  1029. X */
  1030. X#define EV_SIO_INIT                    ENCODE( 'S', 'i' )
  1031. X#define EV_SIO_SWITCH                ENCODE( 'S', 's' )
  1032. X#define EV_SIO_READF                    ENCODE( 'S', 'r' )
  1033. X#define EV_SIO_WRITEF                ENCODE( 'S', 'w' )
  1034. X#define EV_SIO_EXTEND_BUFFER        ENCODE( 'S', 'e' )
  1035. X#define EV_SIO_MORE                    ENCODE( 'S', 'm' )
  1036. X#define EV_TRY_MEMORY_MAPPING        ENCODE( 'T', 'm' )
  1037. X#define EV_INITIAL_MAP                ENCODE( 'I', 'm' )
  1038. X#define EV_MAP_UNIT                    ENCODE( 'M', 'u' )
  1039. X#define EV_INIT_INPUT_STREAM        ENCODE( 'I', 'i' )
  1040. X#define EV_INIT_OUTPUT_STREAM        ENCODE( 'I', 'o' )
  1041. X
  1042. X/*
  1043. X * The # of entries must be a power of 2
  1044. X */
  1045. X#define EVENT_ENTRIES        512
  1046. X
  1047. Xstruct events
  1048. X{
  1049. X    short next ;
  1050. X    short start ;
  1051. X    short *codes ;            /* malloc'ed memory */
  1052. X} ;
  1053. X
  1054. Xtypedef struct events events_s ;
  1055. X
  1056. Xextern events_s *__sio_events ;
  1057. X
  1058. X
  1059. X#define ADD( index, x )                (index) += x ;                                \
  1060. X                                            (index) &= ( EVENT_ENTRIES - 1 )
  1061. X
  1062. X#define EVENT( fd, code )                                                            \
  1063. X                    {                                                                        \
  1064. X                        events_s *evp = &__sio_events[ fd ] ;                    \
  1065. X                                                                                            \
  1066. X                        if ( evp->codes != NULL )                                    \
  1067. X                        {                                                                    \
  1068. X                            evp->codes[ evp->next ] = code ;                        \
  1069. X                            ADD( evp->next, 1 ) ;                                    \
  1070. X                            if ( evp->next == evp->start )                        \
  1071. X                            { ADD( evp->start, 1 ) ; }                                \
  1072. X                        }                                                                    \
  1073. X                    }
  1074. X
  1075. END_OF_FILE
  1076. if test 3168 -ne `wc -c <'libs/src/sio/events.h'`; then
  1077.     echo shar: \"'libs/src/sio/events.h'\" unpacked with wrong size!
  1078. fi
  1079. # end of 'libs/src/sio/events.h'
  1080. fi
  1081. if test -f 'libs/src/str/README' -a "${1}" != "-c" ; then 
  1082.   echo shar: Will not clobber existing file \"'libs/src/str/README'\"
  1083. else
  1084. echo shar: Extracting \"'libs/src/str/README'\" \(3369 characters\)
  1085. sed "s/^X//" >'libs/src/str/README' <<'END_OF_FILE'
  1086. X======================================================================
  1087. XNOTE: I use vi with a tabstop value of 3. Using the same tabstop
  1088. X        value will make the text/code look properly indented.
  1089. X======================================================================
  1090. X
  1091. X
  1092. X1. What is this library about ?
  1093. X
  1094. XThe STR library consists of string handling functions. These
  1095. Xfunctions can be separated into 4 groups:
  1096. X
  1097. XA. String matching functions. A variety of algorithms are available
  1098. X    for string matching:
  1099. X            brute force
  1100. X            Rabin-Karp
  1101. X            Knuth-Morris-Pratt
  1102. X            Boyer-Moore
  1103. X            Shift-or
  1104. X
  1105. XB. String printing functions (similar to sprintf). These functions offer
  1106. X    2 significant advantages over sprintf:
  1107. X        1) they include functions that will *not* overrun the string buffer 
  1108. X            provided
  1109. X        2) they include functions returning "char *" as well as functions
  1110. X            returning "int" so that one can pick the most appropriate one.
  1111. X
  1112. XC. String parsing functions. These functions offer an easy way of breaking
  1113. X    a string into substrings.
  1114. X
  1115. XD. String utility functions. This group includes functions that will
  1116. X    convert a string to upper/lower case etc.
  1117. X
  1118. X
  1119. X2. Setting up the STR library
  1120. X
  1121. XAll you need to do is type 'make'. This will create the library in the
  1122. Xcurrent directory.  The string printing functions use (and therefore
  1123. Xrequire) the underlying format conversion facility of my SIO (Stream
  1124. XI/O) library. If you got this library as part of a program distribution,
  1125. Xthen the SIO library should also be part of that distribution if the
  1126. Xprogram requires it.  If the SIO library is not present, then you
  1127. Xhave the following options:
  1128. Xa) If you don't want to bother with it, you can define the
  1129. X    flag NO_SIO in the Makefile (check the Makefile comments on how to do
  1130. X    this) which will turn all string printing functions to no-ops.
  1131. Xb) You can get the SIO library via anonymous FTP from any site that
  1132. X    archives comp.sources.unix; SIO is part of the xinetd distribution
  1133. X    which appeared in Volume 26 of comp.sources.unix
  1134. Xc) You can send email to me (panos@cs.colorado.edu) and I will mail it to you
  1135. X
  1136. XNote that if you do find SIO via some other way, or if you already have
  1137. Xit, make sure that the version you use is 1.6.2 or later; versions
  1138. Xprior to 1.6.2 will result in identical behavior between the
  1139. Xstrx_*print* and the str_*print* functions.
  1140. X
  1141. XTo install the library and the associated man pages and include files
  1142. Xtype 'make install'. This will install the library in LIBDIR, the man
  1143. Xpages in MANDIR and the include files in INCLUDEDIR.  LIBDIR,
  1144. XINCLUDEDIR, and MANDIR are Makefile variables that you can edit in the
  1145. XMakefile or override when you invoke 'make'.
  1146. X
  1147. X
  1148. X
  1149. X3. Epilogue
  1150. X
  1151. XPlease send bug-reports/comments to panos@cs.colorado.edu
  1152. X
  1153. XFeel free to modify the library to suit your needs.  If you want to
  1154. Xdistribute modifications to this library, please read the COPYRIGHT
  1155. Xfile.  It basically says that you are free to redistribute as long as
  1156. Xyou retain the original copyright notice and you make sure that your
  1157. Xmodifications are identifiable. In order to achieve this I have
  1158. Xreserved the first 3 components of the version number (for example,
  1159. X1.4.2) and you can identify your mods by appending another component to
  1160. Xthat version number (for example, 1.4.2.A2). Also, if you distribute a
  1161. Xmodified version of the library, you take full responsibility for any
  1162. Xbugs in the code (not just your code; the whole thing).
  1163. X
  1164. END_OF_FILE
  1165. if test 3369 -ne `wc -c <'libs/src/str/README'`; then
  1166.     echo shar: \"'libs/src/str/README'\" unpacked with wrong size!
  1167. fi
  1168. # end of 'libs/src/str/README'
  1169. fi
  1170. echo shar: End of archive 6 \(of 20\).
  1171. cp /dev/null ark6isdone
  1172. MISSING=""
  1173. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ; do
  1174.     if test ! -f ark${I}isdone ; then
  1175.     MISSING="${MISSING} ${I}"
  1176.     fi
  1177. done
  1178. if test "${MISSING}" = "" ; then
  1179.     echo You have unpacked all 20 archives.
  1180.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  1181. else
  1182.     echo You still need to unpack the following archives:
  1183.     echo "        " ${MISSING}
  1184. fi
  1185. ##  End of shell archive.
  1186. exit 0
  1187.