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

  1. Newsgroups: comp.sources.unix
  2. From: panos@anchor.cs.colorado.edu (Panos Tsirigotis)
  3. Subject: v27i113: clc - C Libraries Collection, Part07/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 113
  10. Archive-Name: clc/part07
  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 7 (of 20)."
  19. # Contents:  libs/src/dict/README libs/src/dict/dict.c
  20. #   libs/src/misc/Makefile libs/src/pq/Makefile libs/src/str/str.h
  21. #   libs/src/str/strprint.c libs/src/str/strutil.c
  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/README' -a "${1}" != "-c" ; then 
  25.   echo shar: Will not clobber existing file \"'libs/src/dict/README'\"
  26. else
  27. echo shar: Extracting \"'libs/src/dict/README'\" \(3537 characters\)
  28. sed "s/^X//" >'libs/src/dict/README' <<'END_OF_FILE'
  29. X---------------------------------------------------------------------------
  30. XNote: All files will appear properly indented if you set your tabstop to 3.
  31. X---------------------------------------------------------------------------
  32. X
  33. XThis library includes support for the following types of data structures:
  34. X
  35. X    double linked lists
  36. X    hash tables
  37. X    binary search trees (balanced trees are also supported)
  38. X
  39. XThe data structures are designed to support dictionary operations.
  40. XDictionary operations are the operations of insertion, location and
  41. Xdeletion of objects from a set.  The data structures also include
  42. Xoperations for the location of the maximum/minimum element of a set and
  43. Xoperations for set enumeration.
  44. X
  45. XThe code should work on any system with a reasonable C compiler.
  46. XI have compiled it on SunOS 4.1 and Ultrix 4.2 using the bundled C
  47. Xcompiler of those systems.  It also compiles with no warnings using gcc 2.1
  48. X
  49. XIn order to use this library in your programs, you will need to add
  50. Xthe following linker options to the cc command line:
  51. X    -ldict -lfsma
  52. XThe former identifies the library with all the dictionary operations,
  53. Xcalled "dict", and the latter identifies a support library, called "fsma",
  54. Xwhich is used by the "dict" library. The distribution includes both
  55. Xlibraries, and the installation procedure makes sure that both libraries
  56. Xare compiled and installed.
  57. X
  58. XPlease send all comments/bug-reports to panos@cs.colorado.edu.
  59. X
  60. X----------------------------------------------------------------------
  61. X
  62. XTesting the code
  63. X
  64. XI have included 3 sample programs that test this library:
  65. X    dlltest    :     tests the double linked list implementation
  66. X    htest        :    tests the hash tables implementation
  67. X    bsttest     :     tests the binary search tree implementation (note: this 
  68. X                    program requires that the library be compiled with the 
  69. X                    BST_DEBUG preprocessor flag; check the Makefile for more
  70. X                    details)
  71. X
  72. XIn order to do the test, follow these steps (we will assume that the hash 
  73. Xtable implementation is to be tested):
  74. X
  75. X    1. Make the program:
  76. X            make LIBDIR=../../lib INCLUDEDIR=../../include htest
  77. X        This assumes that you have not modified the values of LIBDIR and
  78. X        INCLUDEDIR in the top level Makefile.
  79. X    2. Run the program:
  80. X            htest > HTEST.OUTPUT
  81. X    3. Compare the output with the standard output which is part of the
  82. X        distribution (this is the file "htest.out", and there are similar
  83. X        files for the rest of the test programs).
  84. X            cmp HTEST.OUTPUT htest.out
  85. X        These two files should be the same.
  86. X
  87. XFor the binary search tree implementation, the test program, "bsttest",
  88. Xcan be invoked in 2 ways: without arguments, and with a single argument "b".
  89. XThe latter form will make the tree be balanced; however, the
  90. Xoutput of the program should be the same as when the tree is not
  91. Xbalanced, so you can use the same output file to do the comparison.
  92. X
  93. XTo illustrate the advantage of the balanced search tree implementation,
  94. Xyou can run the program "bstcomp" (which you can compile by typing
  95. X"make bstcomp"). This program will create a binary tree and then
  96. Xtry to find an element in it.
  97. XFor example,
  98. X    bstcomp 20000
  99. Xwill do 20000 searches for an element in a binary search tree. The tree
  100. Xhas 1000 nodes, and it is artificially created to make sure that it is skewed
  101. X(i.e. the maximum depth is 1000). The search is made for the node which
  102. Xis at depth 1000.
  103. XBy invoking the program as:
  104. X    bstcomp b 20000
  105. Xthe same 1000-node tree will be balanced, and the time to make the 20000 
  106. Xsearches for the same node will be a fraction of the time when the tree 
  107. Xwas not balanced.
  108. X
  109. END_OF_FILE
  110. if test 3537 -ne `wc -c <'libs/src/dict/README'`; then
  111.     echo shar: \"'libs/src/dict/README'\" unpacked with wrong size!
  112. fi
  113. # end of 'libs/src/dict/README'
  114. fi
  115. if test -f 'libs/src/dict/dict.c' -a "${1}" != "-c" ; then 
  116.   echo shar: Will not clobber existing file \"'libs/src/dict/dict.c'\"
  117. else
  118. echo shar: Extracting \"'libs/src/dict/dict.c'\" \(3586 characters\)
  119. sed "s/^X//" >'libs/src/dict/dict.c' <<'END_OF_FILE'
  120. X/*
  121. X * (c) Copyright 1993 by Panagiotis Tsirigotis
  122. X * All rights reserved.  The file named COPYRIGHT specifies the terms 
  123. X * and conditions for redistribution.
  124. X */
  125. X
  126. Xstatic char RCSid[] = "$Id: dict.c,v 3.3 93/11/14 22:24:54 panos Exp $" ;
  127. Xstatic char version[] = VERSION ;
  128. X
  129. X#include "dictimpl.h"
  130. X
  131. Xint dict_errno ;
  132. X
  133. Xstruct name_value
  134. X{
  135. X    int nv_value ;
  136. X    char *nv_name ;
  137. X} ;
  138. X
  139. X
  140. Xstatic struct name_value error_codes[] =
  141. X    {
  142. X        {    DICT_ENOMEM,            "out of memory"                                            },
  143. X        {    DICT_ENOTFOUND,        "object not found"                                        },
  144. X        {    DICT_ENOOOCOMP,        "object-object comparison function is missing"    },
  145. X        {    DICT_ENOKOCOMP,        "key-object comparison function is missing"        },
  146. X        {    DICT_ENULLOBJECT,        "object is NULL"                                            },
  147. X        {    DICT_EEXISTS,            "object exists"                                            },
  148. X        {    DICT_ENOHVFUNC,        "hashvalue extraction function is missing"        },
  149. X        {    DICT_EBADOBJECT,        "object does not exist"                                    },
  150. X        {    DICT_EBADORDER,        "bad order flag"                                            },
  151. X        {    DICT_EORDER,            "specified order not supported"                        },
  152. X        {    DICT_ENOERROR,            NULL                                                            }
  153. X    } ;
  154. X
  155. X
  156. Xvoid __dict_terminate( prefix, msg )
  157. X    char *prefix ;
  158. X    char *msg ;
  159. X{
  160. X    static char buf[ 80 ] ;
  161. X    char *strcat() ;
  162. X    char *strcpy() ;
  163. X
  164. X    (void) strcpy( buf, "DICT " ) ;
  165. X    (void) strcat( buf, prefix ) ;
  166. X    (void) strcat( buf, ": " ) ;
  167. X    (void) strcat( buf, msg ) ;
  168. X    (void) strcat( buf, "\n" ) ;
  169. X    (void) write( 2, buf, strlen( buf ) ) ;
  170. X    abort() ;
  171. X    _exit( 1 ) ;
  172. X    /* NOTREACHED */
  173. X}
  174. X
  175. X
  176. Xvoid __dict_fatal_error( caller, error_code )
  177. X    char            *caller ;
  178. X    int            error_code ;
  179. X{
  180. X    struct name_value *nvp ;
  181. X    char *msg ;
  182. X
  183. X    /*
  184. X     * Lookup error message
  185. X     */
  186. X    msg = "unknown error" ;
  187. X    for ( nvp = error_codes ; nvp->nv_name ; nvp++ )
  188. X        if ( nvp->nv_value == error_code )
  189. X        {
  190. X            msg = nvp->nv_name ;
  191. X            break ;
  192. X        }
  193. X    __dict_terminate( caller, msg ) ;
  194. X}
  195. X
  196. X
  197. Xdict_h __dict_create_error( caller, flags, errp, error_code )
  198. X    char    *caller ;
  199. X    int    flags ;
  200. X    int    *errp ;
  201. X    int    error_code ;
  202. X{
  203. X    dheader_s dh ;
  204. X
  205. X    dh.flags = flags ;
  206. X    dh.errnop = ( errp == INT_NULL ) ? &dict_errno : errp ;
  207. X    HANDLE_ERROR( &dh, caller, error_code, NULL_HANDLE ) ;
  208. X    /* NOTREACHED */
  209. X}
  210. X
  211. X
  212. Xint __dict_args_ok( caller, flags, errp, oo_comp, ko_comp, allowed_orders )
  213. X    char                *caller ;
  214. X    int                flags ;
  215. X    int                *errp ;
  216. X    dict_function    oo_comp ;
  217. X    dict_function    ko_comp ;
  218. X    int                allowed_orders ;
  219. X{
  220. X    int requested_order ;
  221. X
  222. X    if ( BAD_ORDER( flags ) )
  223. X    {
  224. X        (void) __dict_create_error( caller, flags, errp, DICT_EBADORDER ) ;
  225. X        return( FALSE ) ;
  226. X    }
  227. X
  228. X    /*
  229. X     * If the user provided an object-object comparator, we can pretend
  230. X     * that the library supports the DICT_UNORDERED flag.
  231. X     */
  232. X    if ( oo_comp )
  233. X        allowed_orders |= DICT_UNORDERED ;
  234. X
  235. X    requested_order = ( flags & ORDER_FLAGS ) ;
  236. X    if ( requested_order && ! ( allowed_orders & requested_order ) )
  237. X    {
  238. X        (void) __dict_create_error( caller, flags, errp, DICT_EORDER ) ;
  239. X        return( FALSE ) ;
  240. X    }
  241. X
  242. X    /*
  243. X     * An object-object comparator is required if
  244. X     *        order is requested,
  245. X     * or
  246. X     *        key uniqueness is requested
  247. X     * or
  248. X     *        the library requires it.
  249. X     */
  250. X    if ( oo_comp == NULL_FUNC && ( flags & (DICT_ORDERED | DICT_UNIQUE_KEYS) ) )
  251. X    {
  252. X        (void) __dict_create_error( caller, flags, errp, DICT_ENOOOCOMP ) ;
  253. X        return( FALSE ) ;
  254. X    }
  255. X
  256. X#ifdef notdef
  257. X    if ( ko_comp == NULL )
  258. X    {
  259. X        (void) __dict_create_error( caller, flags, errp, DICT_ENOKOCOMP ) ;
  260. X        return( FALSE ) ;
  261. X    }
  262. X#endif
  263. X
  264. X    return( TRUE ) ;
  265. X}
  266. X
  267. X
  268. Xvoid __dict_init_header( dhp, oo_comp, ko_comp, flags, errnop )
  269. X    dheader_s *dhp ;
  270. X    dict_function oo_comp, ko_comp ;
  271. X    int flags, *errnop ;
  272. X{
  273. X    dhp->oo_comp = oo_comp ;
  274. X    dhp->ko_comp = ko_comp ;
  275. X    dhp->flags = flags ;
  276. X    dhp->errnop = ( errnop == INT_NULL ) ? &dict_errno : errnop ;
  277. X}
  278. X
  279. END_OF_FILE
  280. if test 3586 -ne `wc -c <'libs/src/dict/dict.c'`; then
  281.     echo shar: \"'libs/src/dict/dict.c'\" unpacked with wrong size!
  282. fi
  283. # end of 'libs/src/dict/dict.c'
  284. fi
  285. if test -f 'libs/src/misc/Makefile' -a "${1}" != "-c" ; then 
  286.   echo shar: Will not clobber existing file \"'libs/src/misc/Makefile'\"
  287. else
  288. echo shar: Extracting \"'libs/src/misc/Makefile'\" \(3674 characters\)
  289. sed "s/^X//" >'libs/src/misc/Makefile' <<'END_OF_FILE'
  290. X# (c) Copyright 1992 by Panagiotis Tsirigotis
  291. X# All rights reserved.  The file named COPYRIGHT specifies the terms 
  292. X# and conditions for redistribution.
  293. X
  294. X#
  295. X# $Id: Makefile,v 2.9 1992/11/06 02:20:41 panos Exp $
  296. X#
  297. X# Based on Library makefile template: *Revision: 1.15 *
  298. X#
  299. X
  300. X# 
  301. X# Available entries:
  302. X#         lib             --> creates the library
  303. X#        install        --> installs the library (archive, man page(s), header(s))
  304. X#        uninstall    --> uninstall the library
  305. X#        clean            --> removes all .o and .a files
  306. X#        spotless        --> clean + uninstall
  307. X#         lint            --> lints a file (usage: make lint MODULE=foo.c)
  308. X#        tags            --> creates a tags file (from the SOURCES and HEADERS)
  309. X#        checkout     --> checkout all files
  310. X#        dist            --> distribution support
  311. X#
  312. X
  313. XNAME                = misc
  314. XVERSION            = 1.2.2
  315. X
  316. XHEADERS            = misc.h ftwx.h env.h
  317. XSOURCES            = misc.c ftwx.c env.c
  318. XOBJECTS            = misc.o ftwx.o env.o
  319. X
  320. XMANFILES            = misc.3 ftwx.3 env.3
  321. XINCLUDEFILES    = $(HEADERS)
  322. X
  323. X# The following variables are used by the 'install' entry and
  324. X# should be customized:
  325. X#     LIBDIR:     where the library will be placed
  326. X#     INCUDEDIR:  where the include files will be placed
  327. X#     MANDIR:     where the man pages will be placed
  328. X#
  329. XLIBDIR            = $(HOME)/.links/libraries/$(ARCH)
  330. XMANDIR            = $(HOME)/.links/manpages/man3
  331. XINCLUDEDIR        = $(HOME)/.links/includes
  332. X
  333. X#
  334. X# Possible flags:
  335. X#     -DOLD_DIR         : must include <sys/dir.h> instead of <dirent.h>
  336. X#     -D__FTWX_NO_FTW   : does not have <ftw.h>
  337. X#
  338. XDEFS                =                # used for command line defined flags
  339. X
  340. XDEBUG                = -g                # -g or -O
  341. XVERSION_DEF        = -DVERSION=\"MISC\ Version\ $(VERSION)\"
  342. X
  343. XCPP_DEFS            = $(VERSION_DEF) $(DEFS)
  344. X
  345. X#
  346. X# The following variables shouldn't need to be changed
  347. X#
  348. XLINT_FLAGS        = -hbux
  349. XCPP_FLAGS        = $(CPP_DEFS)
  350. XCC_FLAGS            = $(DEBUG)
  351. XCFLAGS            = $(CPP_FLAGS) $(CC_FLAGS)
  352. X
  353. XINSTALL            = install -c
  354. XFMODE                = -m 640            # used by install
  355. XRANLIB            = ranlib
  356. X
  357. XPAGER                = less
  358. X
  359. X
  360. XLIBNAME            = lib$(NAME).a
  361. X
  362. Xlib: $(LIBNAME)
  363. X
  364. Xlibopt: clean
  365. X    make DEBUG=-O lib
  366. X    mv $(LIBNAME) $(LIBDIR)/optimized
  367. X
  368. X
  369. X$(LIBNAME): $(OBJECTS)
  370. X    ar r $@ $?
  371. X    $(RANLIB) $@
  372. X
  373. Xlint:
  374. X    lint $(CPP_FLAGS) $(LINT_FLAGS) $(MODULE) 2>&1 | $(PAGER)
  375. X
  376. Xinstall: $(LIBNAME)
  377. X    @if test "$(LIBDIR)" -a "$(INCLUDEDIR)" -a "$(MANDIR)" ;\
  378. X    then \
  379. X        $(INSTALL) $(FMODE) $(LIBNAME) $(LIBDIR) ;\
  380. X        echo "Installed $(LIBNAME) to $(LIBDIR)" ;\
  381. X        for i in $(INCLUDEFILES); do $(INSTALL) $(FMODE) $$i $(INCLUDEDIR) ; done ;\
  382. X        echo Installed $(INCLUDEFILES) to $(INCLUDEDIR) ;\
  383. X        for i in $(MANFILES) ; do $(INSTALL) $(FMODE) $$i $(MANDIR) ; done ;\
  384. X        echo Installed $(MANFILES) to $(MANDIR) ;\
  385. X    else \
  386. X        echo "You forgot to set one of the following variables: LIBDIR,INCLUDEDIR,MANDIR" ;\
  387. X    fi
  388. X
  389. Xuninstall:
  390. X    a=`pwd` ; cd $(INCLUDEDIR) ;\
  391. X    if test $$a != `pwd` ; then rm -f $(INCLUDEFILES) ; fi
  392. X    a=`pwd` ; cd $(LIBDIR) ;\
  393. X    if test $$a != `pwd` ; then rm -f $(LIBNAME) ; fi
  394. X    a=`pwd` ; cd $(MANDIR) ;\
  395. X    if test $$a != `pwd` ; then rm -f $(MANFILES) ; fi
  396. X
  397. Xclean:
  398. X    rm -f $(OBJECTS) $(LIBNAME) core
  399. X
  400. Xspotless: clean uninstall
  401. X
  402. Xtags: $(SOURCES) $(HEADERS)
  403. X    ctags -w $(SOURCES) $(HEADERS)
  404. X
  405. Xcheckout:
  406. X    co $(SOURCES) $(HEADERS) $(MANFILES)
  407. X
  408. X#
  409. X# Distribution section
  410. X# This section contains the 2 targets for distribution support: dist, dirs
  411. X# "dist" checks out all files to be distributed
  412. X# "dirs" prints a list of directories to be included in the distribution.
  413. X# These directories should have a Makefile with a "dist" target
  414. X#
  415. XDISTRIBUTION_FILES    = $(HEADERS) $(SOURCES) $(MANFILES) README
  416. XDIRS                        =
  417. X
  418. Xdist:
  419. X    -co -q $(DISTRIBUTION_FILES)
  420. X
  421. Xdirs:
  422. X    @echo $(DIRS)
  423. X
  424. X#
  425. X# PUT HERE THE RULES TO MAKE THE OBJECT FILES
  426. X#
  427. Xmisc.o:        misc.h
  428. Xftwx.o:        ftwx.h misc.h
  429. Xenv.o:        env.h misc.h
  430. X
  431. X
  432. X#
  433. X# Test program
  434. X#
  435. Xtt: tt.c $(LIBNAME)
  436. X    $(CC) -g tt.c -o $@ $(LIBNAME) -L$(LIBDIR) -ltest
  437. X
  438. END_OF_FILE
  439. if test 3674 -ne `wc -c <'libs/src/misc/Makefile'`; then
  440.     echo shar: \"'libs/src/misc/Makefile'\" unpacked with wrong size!
  441. fi
  442. # end of 'libs/src/misc/Makefile'
  443. fi
  444. if test -f 'libs/src/pq/Makefile' -a "${1}" != "-c" ; then 
  445.   echo shar: Will not clobber existing file \"'libs/src/pq/Makefile'\"
  446. else
  447. echo shar: Extracting \"'libs/src/pq/Makefile'\" \(3498 characters\)
  448. sed "s/^X//" >'libs/src/pq/Makefile' <<'END_OF_FILE'
  449. X# (c) Copyright 1993 by Panagiotis Tsirigotis
  450. X# All rights reserved.  The file named COPYRIGHT specifies the terms 
  451. X# and conditions for redistribution.
  452. X
  453. X#
  454. X# $Id: Makefile,v 2.2 1993/05/06 07:50:44 panos Exp $
  455. X#
  456. X# Based on Library makefile template: *Revision: 1.15 *
  457. X#
  458. X
  459. X# 
  460. X# Available entries:
  461. X#         lib             --> creates the library
  462. X#        install        --> installs the library (archive, man page(s), header(s))
  463. X#        uninstall    --> uninstall the library
  464. X#        clean            --> removes all .o and .a files
  465. X#        spotless        --> clean + uninstall
  466. X#         lint            --> lints a file (usage: make lint MODULE=foo.c)
  467. X#        tags            --> creates a tags file (from the SOURCES and HEADERS)
  468. X#        checkout     --> checkout all files
  469. X#        dist            --> distribution support
  470. X#
  471. X
  472. XNAME                = pq
  473. XVERSION            = 1.0.2
  474. X
  475. XHEADERS            = hpq.h hpqimpl.h pq.h
  476. XSOURCES            = hpq.c pq.c
  477. XOBJECTS            = hpq.o pq.o
  478. X
  479. XMANFILES            = pq.3
  480. XINCLUDEFILES    = hpq.h pq.h
  481. X
  482. X# The following variables are used by the 'install' entry and
  483. X# should be customized:
  484. X#     LIBDIR:     where the library will be placed
  485. X#     INCUDEDIR:  where the include files will be placed
  486. X#     MANDIR:     where the man pages will be placed
  487. X#
  488. XLIBDIR            = $(HOME)/.links/libraries/$(ARCH)
  489. XMANDIR            = $(HOME)/.links/manpages/man3
  490. XINCLUDEDIR        = $(HOME)/.links/includes
  491. X
  492. XDEFS                =                # used for command line defined flags
  493. XDEBUG                = -g            # -g or -O
  494. XVERSION_DEF        = -DVERSION=\"HPQ\ Version\ $(VERSION)\"
  495. X
  496. XCPP_DEFS            = $(VERSION_DEF) $(DEFS)
  497. X
  498. X#
  499. X# The following variables shouldn't need to be changed
  500. X#
  501. XLINT_FLAGS        = -hbux
  502. XCPP_FLAGS        = $(CPP_DEFS)
  503. XCC_FLAGS            = $(DEBUG)
  504. XCFLAGS            = $(CPP_FLAGS) $(CC_FLAGS)
  505. X
  506. XINSTALL            = install -c
  507. XFMODE                = -m 640            # used by install
  508. XRANLIB            = ranlib
  509. X
  510. XPAGER                = less
  511. X
  512. X
  513. XLIBNAME            = lib$(NAME).a
  514. X
  515. Xlib: $(LIBNAME)
  516. X
  517. Xlibopt: clean
  518. X    make DEBUG=-O "DEFS=$(DEFS)" lib
  519. X    $(INSTALL) $(FMODE) $(LIBNAME) $(LIBDIR)/optimized
  520. X
  521. X$(LIBNAME): $(OBJECTS)
  522. X    ar r $@ $?
  523. X    $(RANLIB) $@
  524. X
  525. Xlint:
  526. X    lint $(CPP_FLAGS) $(LINT_FLAGS) $(MODULE) 2>&1 | $(PAGER)
  527. X
  528. Xinstall: $(LIBNAME)
  529. X    @if test "$(LIBDIR)" -a "$(INCLUDEDIR)" -a "$(MANDIR)" ;\
  530. X    then \
  531. X        $(INSTALL) $(FMODE) $(LIBNAME) $(LIBDIR) ;\
  532. X        echo "Installed $(LIBNAME) to $(LIBDIR)" ;\
  533. X        for i in $(INCLUDEFILES); do $(INSTALL) $(FMODE) $$i $(INCLUDEDIR) ; done ;\
  534. X        echo Installed $(INCLUDEFILES) to $(INCLUDEDIR) ;\
  535. X        for i in $(MANFILES) ; do $(INSTALL) $(FMODE) $$i $(MANDIR) ; done ;\
  536. X        echo Installed $(MANFILES) to $(MANDIR) ;\
  537. X    else \
  538. X        echo "You forgot to set one of the following variables: LIBDIR,INCLUDEDIR,MANDIR" ;\
  539. X    fi
  540. X
  541. Xuninstall:
  542. X    a=`pwd` ; cd $(INCLUDEDIR) ;\
  543. X    if test $$a != `pwd` ; then rm -f $(INCLUDEFILES) ; fi
  544. X    a=`pwd` ; cd $(LIBDIR) ;\
  545. X    if test $$a != `pwd` ; then rm -f $(LIBNAME) ; fi
  546. X    a=`pwd` ; cd $(MANDIR) ;\
  547. X    if test $$a != `pwd` ; then rm -f $(MANFILES) ; fi
  548. X
  549. Xclean:
  550. X    rm -f $(OBJECTS) $(LIBNAME) core
  551. X
  552. Xspotless: clean uninstall
  553. X
  554. Xtags: $(SOURCES) $(HEADERS)
  555. X    ctags -w $(SOURCES) $(HEADERS)
  556. X
  557. Xcheckout:
  558. X    co $(SOURCES) $(HEADERS) $(MANFILES)
  559. X
  560. X#
  561. X# Distribution section
  562. X# This section contains the 2 targets for distribution support: dist, dirs
  563. X# "dist" checks out all files to be distributed
  564. X# "dirs" prints a list of directories to be included in the distribution.
  565. X# These directories should have a Makefile with a "dist" target
  566. X#
  567. XDISTRIBUTION_FILES    = $(HEADERS) $(SOURCES) $(MANFILES) COPYRIGHT
  568. XDIRS                        =
  569. X
  570. Xdist:
  571. X    -co -q $(DISTRIBUTION_FILES)
  572. X
  573. Xdirs:
  574. X    @echo $(DIRS)
  575. X
  576. X#
  577. X# PUT HERE THE RULES TO MAKE THE OBJECT FILES
  578. X#
  579. Xhpq.o: hpq.h hpqimpl.h pq.h
  580. X
  581. X#
  582. X# Simple test program
  583. X#
  584. Xpqtest: pqtest.c $(LIBNAME)
  585. X    cc $(DEBUG) -o $@ pqtest.c $(LIBNAME)
  586. X
  587. END_OF_FILE
  588. if test 3498 -ne `wc -c <'libs/src/pq/Makefile'`; then
  589.     echo shar: \"'libs/src/pq/Makefile'\" unpacked with wrong size!
  590. fi
  591. # end of 'libs/src/pq/Makefile'
  592. fi
  593. if test -f 'libs/src/str/str.h' -a "${1}" != "-c" ; then 
  594.   echo shar: Will not clobber existing file \"'libs/src/str/str.h'\"
  595. else
  596. echo shar: Extracting \"'libs/src/str/str.h'\" \(3551 characters\)
  597. sed "s/^X//" >'libs/src/str/str.h' <<'END_OF_FILE'
  598. X/*
  599. X * (c) Copyright 1992, 1993 by Panagiotis Tsirigotis
  600. X * All rights reserved.  The file named COPYRIGHT specifies the terms 
  601. X * and conditions for redistribution.
  602. X */
  603. X
  604. X
  605. X#ifndef __STR_H
  606. X#define __STR_H
  607. X
  608. X/*
  609. X * $Id: str.h,v 3.1 1993/06/13 02:47:14 panos Exp $
  610. X */
  611. X
  612. X#include <varargs.h>
  613. X
  614. X
  615. X#ifdef __ARGS
  616. X#undef __ARGS
  617. X#endif
  618. X
  619. X#ifdef PROTOTYPES
  620. X#   define __ARGS( s )               s
  621. X#else
  622. X#   define __ARGS( s )               ()
  623. X#endif
  624. X
  625. X
  626. X/*
  627. X * strprint(3) functions
  628. X */
  629. Xchar *str_sprint __ARGS( ( char *buf, char *fmt, ... ) ) ;
  630. Xint str_nprint __ARGS( ( char *buf, char *fmt, ... ) ) ;
  631. Xvoid str_print __ARGS( ( int *count, char *buf, char *fmt, ... ) ) ;
  632. X
  633. Xchar *str_sprintv __ARGS( ( char *buf, char *fmt, va_list ) ) ;
  634. Xint str_nprintv __ARGS( ( char *buf, char *fmt, va_list ) ) ;
  635. Xvoid str_printv __ARGS( ( int *count, char *buf, char *fmt, va_list ) ) ;
  636. X
  637. Xchar *strx_sprint __ARGS( ( char *buf, int len, char *fmt, ... ) ) ;
  638. Xint strx_nprint __ARGS( ( char *buf, int len, char *fmt, ... ) ) ;
  639. Xvoid strx_print __ARGS( ( int *count, char *buf, int len, char *fmt, ... ) ) ;
  640. X
  641. Xchar *strx_sprintv __ARGS( ( char *buf, int len, char *fmt, va_list ) ) ;
  642. Xint strx_nprintv __ARGS( ( char *buf, int len, char *fmt, va_list ) ) ;
  643. Xvoid strx_printv __ARGS(( int *cnt, char *buf, int len, char *fmt, va_list )) ;
  644. X
  645. X
  646. X/*
  647. X * strparse(3) functions
  648. X */
  649. X
  650. X/*
  651. X * Return values
  652. X */
  653. X#define STR_OK                        0
  654. X#define STR_ERR                    (-1)
  655. X
  656. X
  657. X/* 
  658. X * Flags for the string parsing functions
  659. X */
  660. X#define STR_NOFLAGS                0x0
  661. X#define STR_RETURN_ERROR        0x1
  662. X#define STR_NULL_START            0x2
  663. X#define STR_NULL_END                0x4
  664. X#define STR_MALLOC                0x8
  665. X
  666. Xextern int str_errno ;
  667. X
  668. X/*
  669. X * Error values
  670. X */
  671. X#define STR_ENULLSEPAR            1
  672. X#define STR_ENULLSTRING            2
  673. X#define STR_ENOMEM                3
  674. X
  675. Xtypedef void *str_h ;
  676. X
  677. Xstr_h str_parse __ARGS( ( char *str, char *separ, int flags, int *errnop ) ) ;
  678. Xvoid str_endparse __ARGS( ( str_h handle ) ) ;
  679. Xchar *str_component __ARGS( ( str_h handle ) ) ;
  680. Xint str_setstr __ARGS( ( str_h handle, char *newstr ) ) ;
  681. Xint str_separator __ARGS( ( str_h handle, char *separ ) ) ;
  682. Xchar *str_nextpos __ARGS( ( str_h handle ) ) ;
  683. X
  684. X/*
  685. X * For backwards compatibility
  686. X */
  687. X#define str_process( s, sep, flags )    str_parse( s, sep, flags, (int *)0 )
  688. X#define str_endprocess( handle )            str_endparse( handle )
  689. X
  690. X
  691. X/*
  692. X * strutil(3) functions
  693. X */
  694. Xchar *str_find __ARGS( ( char *s1, char *s2 ) ) ;
  695. Xchar *str_casefind __ARGS( ( char *s1, char *s2 ) ) ;
  696. Xvoid str_fill __ARGS( ( char *s, char c ) ) ;
  697. Xchar *str_lower __ARGS( ( char *s ) ) ;
  698. Xchar *str_upper __ARGS( ( char *s ) ) ;
  699. X
  700. X
  701. X/*
  702. X * strsearch(3) functions
  703. X */
  704. X
  705. X/*
  706. X * Methods
  707. X */
  708. X#define STRS_BF                                0            /* brute force                */
  709. X#define STRS_RK                                1            /* Rabin-Karp                */
  710. X#define STRS_KMP                                2            /* Knuth-Morris-Pratt    */
  711. X#define STRS_SBM                                3            /* Simple Boyer-Moore    */
  712. X#define STRS_BMH                                4            /* Boyer-Moore-Horspool */
  713. X#define STRS_SO                                5            /* Shift-Or                    */
  714. X
  715. X#define __STRS_METHOD_BITS                    5
  716. X#define STRS_METHODS_MAX                    ( 1 << __STRS_METHOD_BITS )
  717. X
  718. X/*
  719. X * Flags
  720. X */
  721. X#define __STRS_MAKEFLAG( v )                ( (v) << __STRS_METHOD_BITS )
  722. X#define STRS_IGNCASE                            __STRS_MAKEFLAG( 0x1 )
  723. X#define STRS_NOMALLOC                        __STRS_MAKEFLAG( 0x2 )
  724. X#define STRS_NOSWITCH                        __STRS_MAKEFLAG( 0x4 )
  725. X#define STRS_PATLEN                            __STRS_MAKEFLAG( 0x8 )
  726. X
  727. X
  728. Xtypedef void *strs_h ;
  729. X
  730. Xchar *strs_search __ARGS( ( int flags, char *str, int len, char *pat, ... ) ) ;
  731. Xstrs_h strs_setup __ARGS( ( int flags, char *pattern, ... ) ) ;
  732. Xchar *strs_match    __ARGS( ( strs_h handle, char *str, int len ) ) ;
  733. Xvoid strs_done        __ARGS( ( strs_h handle ) ) ;
  734. X
  735. X#endif     /* __STR_H */
  736. X
  737. END_OF_FILE
  738. if test 3551 -ne `wc -c <'libs/src/str/str.h'`; then
  739.     echo shar: \"'libs/src/str/str.h'\" unpacked with wrong size!
  740. fi
  741. # end of 'libs/src/str/str.h'
  742. fi
  743. if test -f 'libs/src/str/strprint.c' -a "${1}" != "-c" ; then 
  744.   echo shar: Will not clobber existing file \"'libs/src/str/strprint.c'\"
  745. else
  746. echo shar: Extracting \"'libs/src/str/strprint.c'\" \(3569 characters\)
  747. sed "s/^X//" >'libs/src/str/strprint.c' <<'END_OF_FILE'
  748. X/*
  749. X * (c) Copyright 1992, 1993 by Panagiotis Tsirigotis
  750. X * All rights reserved.  The file named COPYRIGHT specifies the terms 
  751. X * and conditions for redistribution.
  752. X */
  753. X
  754. Xstatic char RCSid[] = "$Id: strprint.c,v 3.1 1993/06/13 02:50:11 panos Exp $" ;
  755. X
  756. X#ifndef NO_SIO
  757. X#include "sio.h"
  758. X#endif
  759. X
  760. X#include "str.h"
  761. X
  762. X#define INT_NULL                        ((int *)0)
  763. X
  764. X/*
  765. X * The strx_* functions will never overwrite the buffer
  766. X * The str_* functions may overwrite the buffer
  767. X */
  768. X
  769. X/*
  770. X * Group 1: the strx_* functions
  771. X */
  772. X
  773. X/*
  774. X * This is the general purpose conversion function. It is invoked
  775. X * by all the other str[x]_* functions
  776. X */
  777. Xvoid strx_printv( ccp, buf, len, format, ap )
  778. X    int *ccp ;
  779. X    char *buf ;
  780. X    int len ;
  781. X    char *format ;
  782. X    va_list ap ;
  783. X{
  784. X#ifndef NO_SIO
  785. X    __sio_od_t od ;
  786. X    int cc ;
  787. X
  788. X   /*
  789. X    * First initialize the descriptor
  790. X     * Notice that if no length is given, we initialize buf_end to the
  791. X     * highest possible address.
  792. X    */
  793. X   od.buf = buf ;                                        /* NOT NEEDED        */
  794. X   od.buf_end = len ? &buf[ len ] : (char *) ~0 ;    /* NEEDED                */
  795. X   od.buffer_size = 0 ;                                  /* NOT NEEDED        */
  796. X   od.start = buf ;                                      /* NOT NEEDED        */
  797. X   od.nextb = buf ;                                      /* NEEDED            */
  798. X   od.buftype = 0 ;                                      /* NOT NEEDED        */
  799. X
  800. X   /*
  801. X    * Do the conversion
  802. X    */
  803. X   cc = __sio_converter( &od, -1, format, ap ) ;
  804. X    if ( len == 0 || od.nextb < od.buf_end )
  805. X        *(od.nextb) = '\0' ;
  806. X   if ( ccp )
  807. X      *ccp = cc ;
  808. X#endif    /* ! NO_SIO */
  809. X}
  810. X
  811. X
  812. Xvoid strx_print( ccp, buf, len, format, va_alist )
  813. X    int *ccp ;
  814. X    char *buf ;
  815. X    int len ;
  816. X    char *format ;
  817. X    va_dcl
  818. X{
  819. X    va_list ap ;
  820. X
  821. X    va_start( ap ) ;
  822. X    strx_printv( ccp, buf, len, format, ap ) ;
  823. X    va_end( ap ) ;
  824. X}
  825. X
  826. X
  827. Xchar *strx_sprint( buf, len, format, va_alist )
  828. X    char *buf ;
  829. X    int len ;
  830. X    char *format ;
  831. X    va_dcl
  832. X{
  833. X    va_list ap ;
  834. X
  835. X    va_start( ap ) ;
  836. X    strx_printv( INT_NULL, buf, len, format, ap ) ;
  837. X    va_end( ap ) ;
  838. X    return( buf ) ;
  839. X}
  840. X
  841. X
  842. Xchar *strx_sprintv( buf, len, format, ap )
  843. X    char *buf ;
  844. X    int len ;
  845. X    char *format ;
  846. X    va_list ap ;
  847. X{
  848. X    strx_printv( INT_NULL, buf, len, format, ap ) ;
  849. X    return( buf ) ;
  850. X}
  851. X
  852. X
  853. Xint strx_nprint( buf, len, format, va_alist )
  854. X    char *buf ;
  855. X    int len ;
  856. X    char *format ;
  857. X    va_dcl
  858. X{
  859. X    int cc ;
  860. X    va_list ap ;
  861. X
  862. X    va_start( ap ) ;
  863. X    strx_printv( &cc, buf, len, format, ap ) ;
  864. X    va_end( ap ) ;
  865. X    return( cc ) ;
  866. X}
  867. X
  868. X
  869. Xint strx_nprintv( buf, len, format, ap )
  870. X    char *buf ;
  871. X    int len ;
  872. X    char *format ;
  873. X    va_list ap ;
  874. X{
  875. X    int cc ;
  876. X
  877. X    strx_printv( &cc, buf, len, format, ap ) ;
  878. X    return( cc ) ;
  879. X}
  880. X
  881. X
  882. X
  883. X/*
  884. X * Group 2: the str_* functions
  885. X */
  886. X
  887. Xvoid str_print( ccp, buf, format, va_alist )
  888. X    int *ccp ;
  889. X    char *buf ;
  890. X    char *format ;
  891. X    va_dcl
  892. X{
  893. X    va_list ap ;
  894. X
  895. X    va_start( ap ) ;
  896. X    strx_printv( ccp, buf, 0, format, ap ) ;
  897. X    va_end( ap ) ;
  898. X}
  899. X
  900. X
  901. Xvoid str_printv( ccp, buf, format, ap )
  902. X    int *ccp ;
  903. X    char *buf ;
  904. X    char *format ;
  905. X    va_list ap ;
  906. X{
  907. X    strx_printv( ccp, buf, 0, format, ap ) ;
  908. X}
  909. X
  910. X
  911. Xchar *str_sprint( buf, format, va_alist )
  912. X    char *buf ;
  913. X    char *format ;
  914. X    va_dcl
  915. X{
  916. X    va_list ap ;
  917. X
  918. X    va_start( ap ) ;
  919. X    strx_printv( INT_NULL, buf, 0, format, ap ) ;
  920. X    va_end( ap ) ;
  921. X    return( buf ) ;
  922. X}
  923. X
  924. X
  925. Xchar *str_sprintv( buf, format, ap )
  926. X    char *buf ;
  927. X    char *format ;
  928. X    va_list ap ;
  929. X{
  930. X    strx_printv( INT_NULL, buf, 0, format, ap ) ;
  931. X    return( buf ) ;
  932. X}
  933. X
  934. X
  935. Xint str_nprint( buf, format, va_alist )
  936. X    char *buf ;
  937. X    char *format ;
  938. X    va_dcl
  939. X{
  940. X    int cc ;
  941. X    va_list ap ;
  942. X
  943. X    va_start( ap ) ;
  944. X    strx_printv( &cc, buf, 0, format, ap ) ;
  945. X    va_end( ap ) ;
  946. X    return( cc ) ;
  947. X}
  948. X
  949. X
  950. X
  951. Xint str_nprintv( buf, format, ap )
  952. X    char *buf ;
  953. X    char *format ;
  954. X    va_list ap ;
  955. X{
  956. X    int cc ;
  957. X
  958. X    strx_printv( &cc, buf, 0, format, ap ) ;
  959. X    return( cc ) ;
  960. X}
  961. X
  962. X
  963. END_OF_FILE
  964. if test 3569 -ne `wc -c <'libs/src/str/strprint.c'`; then
  965.     echo shar: \"'libs/src/str/strprint.c'\" unpacked with wrong size!
  966. fi
  967. # end of 'libs/src/str/strprint.c'
  968. fi
  969. if test -f 'libs/src/str/strutil.c' -a "${1}" != "-c" ; then 
  970.   echo shar: Will not clobber existing file \"'libs/src/str/strutil.c'\"
  971. else
  972. echo shar: Extracting \"'libs/src/str/strutil.c'\" \(3554 characters\)
  973. sed "s/^X//" >'libs/src/str/strutil.c' <<'END_OF_FILE'
  974. X/*
  975. X * (c) Copyright 1992, 1993 by Panagiotis Tsirigotis
  976. X * All rights reserved.  The file named COPYRIGHT specifies the terms 
  977. X * and conditions for redistribution.
  978. X */
  979. X
  980. Xstatic char RCSid[] = "$Id: strutil.c,v 3.1 1993/06/13 02:50:22 panos Exp $" ;
  981. X
  982. X
  983. X#include <ctype.h>
  984. X
  985. X#define NULL                0
  986. X
  987. X
  988. X#ifndef TRIVIAL_STR_FIND
  989. X
  990. X/*
  991. X * look for an instance of s2 in s1
  992. X * Returns a pointer to the beginning of s2 in s1
  993. X */
  994. Xchar *str_find( str, sstr )
  995. X    register char *str ;
  996. X    register char *sstr ;
  997. X{
  998. X   register int ssfc = *sstr++ ;    /* sub-string first char */
  999. X
  1000. X    if ( ssfc == 0 )            /* empty string is always a match */
  1001. X        return( str ) ;
  1002. X
  1003. X    while ( *str )
  1004. X    {
  1005. X        char *current = str ;
  1006. X        register int strc = *str++ ;
  1007. X        register char *sp ;                    /* string pointer */
  1008. X        register char *ssp ;                   /* sub-string pointer */
  1009. X
  1010. X        if ( strc != ssfc )
  1011. X            continue ;
  1012. X        
  1013. X        /*
  1014. X         * We don't need to make the end of str a special case since
  1015. X         * the comparison of *sp against *ssp is guaranteed to fail
  1016. X         */
  1017. X        for ( sp = str, ssp = sstr ;; sp++, ssp++ )
  1018. X        {
  1019. X            if ( *ssp == 0 )
  1020. X                return( current ) ;
  1021. X            if ( *sp != *ssp )
  1022. X                break ;
  1023. X        }
  1024. X    }
  1025. X
  1026. X    return( 0 ) ;
  1027. X}
  1028. X
  1029. X
  1030. X#define LOWER_CASE( c )                    ( (c) + 'a' - 'A' )
  1031. X
  1032. X/*
  1033. X * str_casefind is similar to str_find except that it ignores the
  1034. X * case of the alphabetic characters
  1035. X */
  1036. Xchar *str_casefind( str, sstr )
  1037. X    register char *str ;
  1038. X    char *sstr ;
  1039. X{
  1040. X    register int ssfc = *sstr++ ;        /* sub-string first char */
  1041. X
  1042. X    if ( ssfc == 0 )
  1043. X        return( str ) ;
  1044. X
  1045. X    if ( isalpha( ssfc ) && isupper( ssfc ) )
  1046. X        ssfc = LOWER_CASE( ssfc ) ;
  1047. X
  1048. X    while ( *str )
  1049. X    {
  1050. X        char *current = str ;
  1051. X        register int strc = *str++ ;
  1052. X        char *sp ;                            /* string pointer */
  1053. X        char *ssp ;                            /* sub-string pointer */
  1054. X
  1055. X        if ( isalpha( strc ) && isupper( strc ) )
  1056. X            strc = LOWER_CASE( strc ) ;
  1057. X        if ( strc != ssfc )
  1058. X            continue ;
  1059. X        
  1060. X        for ( sp = str, ssp = sstr ;; sp++, ssp++ )
  1061. X        {
  1062. X            register int sc = *sp ;                /* string char */
  1063. X            register int ssc = *ssp ;            /* substring char */
  1064. X
  1065. X            /*
  1066. X             * End-of-substring means we got a match
  1067. X             */
  1068. X            if ( ssc == 0 )
  1069. X                return( current ) ;
  1070. X
  1071. X            /*
  1072. X             * Convert to lower case if alphanumeric
  1073. X             */
  1074. X            if ( isalpha( sc ) && isupper( sc ) )
  1075. X                sc = LOWER_CASE( sc ) ;
  1076. X            if ( isalpha( ssc ) && isupper( ssc ) )
  1077. X                ssc = LOWER_CASE( ssc ) ;
  1078. X            if ( sc != ssc )
  1079. X                break ;
  1080. X        }
  1081. X    }
  1082. X
  1083. X    return( 0 ) ;
  1084. X}
  1085. X
  1086. X
  1087. X#else        /* defined( TRIVIAL_STR_FIND ) */
  1088. X
  1089. X/*
  1090. X * look for an instance of s2 in s1
  1091. X * Returns a pointer to the beginning of s2 in s1
  1092. X */
  1093. Xchar *str_find( s1, s2 )
  1094. X    char *s1 ;
  1095. X    char *s2 ;
  1096. X{
  1097. X   int i ;
  1098. X   int l1 = strlen( s1 ) ;
  1099. X   int l2 = strlen( s2 ) ;
  1100. X
  1101. X   for ( i = 0 ; i < l1 - l2 + 1 ; i++ )
  1102. X      if ( strncmp( &s1[ i ], s2, l2 ) == 0 )
  1103. X         return( &s1[ i ] ) ;
  1104. X   return( NULL ) ;
  1105. X}
  1106. X
  1107. X
  1108. Xchar *str_casefind( s1, s2 )
  1109. X    char *s1 ;
  1110. X    char *s2 ;
  1111. X{
  1112. X   int i ;
  1113. X   int l1 = strlen( s1 ) ;
  1114. X   int l2 = strlen( s2 ) ;
  1115. X
  1116. X   for ( i = 0 ; i < l1 - l2 + 1 ; i++ )
  1117. X      if ( strncasecmp( &s1[ i ], s2, l2 ) == 0 )
  1118. X         return( &s1[ i ] ) ;
  1119. X   return( NULL ) ;
  1120. X}
  1121. X
  1122. X#endif     /* TRIVIAL_STR_FIND */
  1123. X
  1124. X
  1125. X/*
  1126. X * Fill string s with character c
  1127. X */
  1128. Xvoid str_fill( s, c )
  1129. X    register char *s ;
  1130. X    register char c ;
  1131. X{
  1132. X    while ( *s ) *s++ = c ;
  1133. X}
  1134. X
  1135. X
  1136. Xchar *str_lower( s )
  1137. X    char *s ;
  1138. X{
  1139. X    register char *p ;
  1140. X    register int offset = 'a' - 'A' ;
  1141. X
  1142. X    for ( p = s ; *p ; p++ )
  1143. X        if ( isascii( *p ) && isupper( *p ) )
  1144. X            *p += offset ;
  1145. X    return( s ) ;
  1146. X}
  1147. X
  1148. X
  1149. Xchar *str_upper( s )
  1150. X    char *s ;
  1151. X{
  1152. X    register char *p ;
  1153. X    register int offset = 'a' - 'A' ;
  1154. X
  1155. X    for ( p = s ; *p ; p++ )
  1156. X        if ( isascii( *p ) && islower( *p ) )
  1157. X            *p -= offset ;
  1158. X    return( s ) ;
  1159. X}
  1160. X
  1161. X
  1162. END_OF_FILE
  1163. if test 3554 -ne `wc -c <'libs/src/str/strutil.c'`; then
  1164.     echo shar: \"'libs/src/str/strutil.c'\" unpacked with wrong size!
  1165. fi
  1166. # end of 'libs/src/str/strutil.c'
  1167. fi
  1168. echo shar: End of archive 7 \(of 20\).
  1169. cp /dev/null ark7isdone
  1170. MISSING=""
  1171. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ; do
  1172.     if test ! -f ark${I}isdone ; then
  1173.     MISSING="${MISSING} ${I}"
  1174.     fi
  1175. done
  1176. if test "${MISSING}" = "" ; then
  1177.     echo You have unpacked all 20 archives.
  1178.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  1179. else
  1180.     echo You still need to unpack the following archives:
  1181.     echo "        " ${MISSING}
  1182. fi
  1183. ##  End of shell archive.
  1184. exit 0
  1185.