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

  1. Newsgroups: comp.sources.unix
  2. From: panos@anchor.cs.colorado.edu (Panos Tsirigotis)
  3. Subject: v27i108: clc - C Libraries Collection, Part02/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 108
  10. Archive-Name: clc/part02
  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 2 (of 20)."
  19. # Contents:  libs/src/dict/COPYRIGHT libs/src/dict/bstcomp.c
  20. #   libs/src/dict/dict.h libs/src/dict/ht.h libs/src/fsma/COPYRIGHT
  21. #   libs/src/misc/COPYRIGHT libs/src/pq/COPYRIGHT
  22. #   libs/src/pset/COPYRIGHT libs/src/sio/COPYRIGHT
  23. #   libs/src/sio/suite/fdtest.c libs/src/sio/suite/sprint_test
  24. #   libs/src/sio/suite/testlib libs/src/str/COPYRIGHT
  25. #   libs/src/str/ss_bf.c libs/src/timer/COPYRIGHT
  26. #   libs/src/timer/defs.h libs/src/xlog/COPYRIGHT
  27. #   libs/src/xlog/filelog.h libs/src/xlog/util.c
  28. # Wrapped by panos@eclipse on Sun Nov 28 14:48:15 1993
  29. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  30. if test -f 'libs/src/dict/COPYRIGHT' -a "${1}" != "-c" ; then 
  31.   echo shar: Will not clobber existing file \"'libs/src/dict/COPYRIGHT'\"
  32. else
  33. echo shar: Extracting \"'libs/src/dict/COPYRIGHT'\" \(1336 characters\)
  34. sed "s/^X//" >'libs/src/dict/COPYRIGHT' <<'END_OF_FILE'
  35. XThis software is
  36. X
  37. X(c) Copyright 1993 by Panagiotis Tsirigotis
  38. X
  39. XThe author (Panagiotis Tsirigotis) grants permission to use, copy,
  40. Xand distribute this software and its documentation for any purpose 
  41. Xand without fee, provided that the above copyright notice extant in
  42. Xfiles in this distribution is not removed from files included in any
  43. Xredistribution and that this copyright notice is also included in any 
  44. Xredistribution.
  45. X
  46. XModifications to this software may be distributed, either by distributing
  47. Xthe modified software or by distributing patches to the original software,
  48. Xunder the following additional terms:
  49. X
  50. X1. The version number will be modified as follows:
  51. X      a. The first 3 components of the version number
  52. X         (i.e <number>.<number>.<number>) will remain unchanged.
  53. X      b. A new component will be appended to the version number to indicate
  54. X         the modification level. The form of this component is up to the 
  55. X         author of the modifications.
  56. X
  57. X2. The author of the modifications will include his/her name by appending it 
  58. X   along with the new version number to this file and will be responsible for 
  59. X   any wrong behavior of the modified software.
  60. X
  61. XThe author makes no representations about the suitability of this 
  62. Xsoftware for any purpose.  It is provided "as is" without any express 
  63. Xor implied warranty.
  64. X
  65. END_OF_FILE
  66. if test 1336 -ne `wc -c <'libs/src/dict/COPYRIGHT'`; then
  67.     echo shar: \"'libs/src/dict/COPYRIGHT'\" unpacked with wrong size!
  68. fi
  69. # end of 'libs/src/dict/COPYRIGHT'
  70. fi
  71. if test -f 'libs/src/dict/bstcomp.c' -a "${1}" != "-c" ; then 
  72.   echo shar: Will not clobber existing file \"'libs/src/dict/bstcomp.c'\"
  73. else
  74. echo shar: Extracting \"'libs/src/dict/bstcomp.c'\" \(1149 characters\)
  75. sed "s/^X//" >'libs/src/dict/bstcomp.c' <<'END_OF_FILE'
  76. X/*
  77. X * (c) Copyright 1993 by Panagiotis Tsirigotis
  78. X * All rights reserved.  The file named COPYRIGHT specifies the terms 
  79. X * and conditions for redistribution.
  80. X */
  81. X
  82. X
  83. X#define NULL 0
  84. X
  85. X#include "bst.h"
  86. X
  87. X
  88. Xint_comp( p1, p2 )
  89. X    char *p1, *p2 ;
  90. X{
  91. X    int i1 = *(int *)p1 ;
  92. X    int i2 = *(int *)p2 ;
  93. X
  94. X    return( i1 - i2 ) ;
  95. X}
  96. X
  97. X#define N 1000
  98. Xint nums[ N ] ;
  99. X
  100. Xint main( argc, argv )
  101. X    int argc ;
  102. X    char *argv[] ;
  103. X{
  104. X    dict_h bh ;
  105. X    int i ;
  106. X    int *ip ;
  107. X    int j ;
  108. X    int flags = DICT_NOFLAGS ;
  109. X    struct bst_depth d ;
  110. X
  111. X    if ( argc == 3 && argv[1][0] == 'b' )
  112. X        flags |= DICT_BALANCED_TREE ;
  113. X
  114. X    bh = bst_create( int_comp, int_comp, flags, (int *)0 ) ;
  115. X
  116. X    for ( i = 0 ; i < N ; i++ )
  117. X    {
  118. X#ifdef notdef
  119. X        nums[ i ] = random() % 100 ;
  120. X#else
  121. X        nums[ i ] = N-i ;
  122. X#endif
  123. X        if ( bst_insert( bh, &nums[ i ] ) != DICT_OK )
  124. X        {
  125. X            printf( "Failed at %d\n", i ) ;
  126. X            exit( 1 ) ;
  127. X        }
  128. X    }
  129. X
  130. X    bst_getdepth( bh, &d ) ;
  131. X    printf( "min tree depth=%d, max tree depth=%d\n",
  132. X        d.depth_min, d.depth_max ) ;
  133. X
  134. X    for ( j = atoi( argv[ argc-1 ] ) ; j ; j-- )
  135. X    {
  136. X        i = 1 ;
  137. X        ip = (int *) bst_search( bh, &i ) ;
  138. X        if ( ip == NULL )
  139. X        {
  140. X            printf( "Search failed at %d\n", j ) ;
  141. X            exit( 0 ) ;
  142. X        }
  143. X    }
  144. X
  145. X    exit( 0 ) ;
  146. X}
  147. END_OF_FILE
  148. if test 1149 -ne `wc -c <'libs/src/dict/bstcomp.c'`; then
  149.     echo shar: \"'libs/src/dict/bstcomp.c'\" unpacked with wrong size!
  150. fi
  151. # end of 'libs/src/dict/bstcomp.c'
  152. fi
  153. if test -f 'libs/src/dict/dict.h' -a "${1}" != "-c" ; then 
  154.   echo shar: Will not clobber existing file \"'libs/src/dict/dict.h'\"
  155. else
  156. echo shar: Extracting \"'libs/src/dict/dict.h'\" \(1216 characters\)
  157. sed "s/^X//" >'libs/src/dict/dict.h' <<'END_OF_FILE'
  158. X/*
  159. X * (c) Copyright 1993 by Panagiotis Tsirigotis
  160. X * All rights reserved.  The file named COPYRIGHT specifies the terms 
  161. X * and conditions for redistribution.
  162. X */
  163. X
  164. X#ifndef __DICT_H
  165. X#define __DICT_H
  166. X
  167. X/*
  168. X * $Id: dict.h,v 3.3 93/09/28 21:07:33 panos Exp $
  169. X */
  170. X
  171. X/*
  172. X * Return values
  173. X */
  174. X#define DICT_OK                        0
  175. X#define DICT_ERR                        (-1)
  176. X
  177. X/*
  178. X * Flags
  179. X */
  180. X#define DICT_NOFLAGS                    0x0
  181. X#define DICT_RETURN_ERROR            0x1
  182. X#define DICT_UNIQUE_KEYS            0x2
  183. X#define DICT_UNORDERED                0x4
  184. X#define DICT_ORDERED                    0x8
  185. X#define DICT_BALANCED_TREE            0x10
  186. X
  187. X/*
  188. X * Error values
  189. X */
  190. X#define DICT_ENOERROR                0
  191. X#define DICT_ENOMEM                    1
  192. X#define DICT_ENOTFOUND                2
  193. X#define DICT_ENOOOCOMP                3
  194. X#define DICT_ENOKOCOMP                4
  195. X#define DICT_ENULLOBJECT            5
  196. X#define DICT_EEXISTS                    6
  197. X#define DICT_ENOHVFUNC                7
  198. X#define DICT_EBADOBJECT                8
  199. X#define DICT_EORDER                    9
  200. X#define DICT_EBADORDER                10
  201. X
  202. X#ifdef __ARGS
  203. X#undef __ARGS
  204. X#endif
  205. X
  206. X#ifdef PROTOTYPES
  207. X#   define __ARGS( s )           s
  208. X#else
  209. X#   define __ARGS( s )           ()
  210. X#endif
  211. X
  212. Xtypedef int (*dict_function)() ;
  213. Xtypedef void *dict_obj ;
  214. Xtypedef void *dict_key ;
  215. Xtypedef void *dict_h ;
  216. X
  217. Xenum dict_direction { DICT_FROM_START, DICT_FROM_END } ;
  218. X
  219. Xextern int dict_errno ;
  220. X
  221. X#endif    /* __DICT_H */
  222. X
  223. END_OF_FILE
  224. if test 1216 -ne `wc -c <'libs/src/dict/dict.h'`; then
  225.     echo shar: \"'libs/src/dict/dict.h'\" unpacked with wrong size!
  226. fi
  227. # end of 'libs/src/dict/dict.h'
  228. fi
  229. if test -f 'libs/src/dict/ht.h' -a "${1}" != "-c" ; then 
  230.   echo shar: Will not clobber existing file \"'libs/src/dict/ht.h'\"
  231. else
  232. echo shar: Extracting \"'libs/src/dict/ht.h'\" \(1233 characters\)
  233. sed "s/^X//" >'libs/src/dict/ht.h' <<'END_OF_FILE'
  234. X/*
  235. X * (c) Copyright 1993 by Panagiotis Tsirigotis
  236. X * All rights reserved.  The file named COPYRIGHT specifies the terms 
  237. X * and conditions for redistribution.
  238. X */
  239. X
  240. X#ifndef __HT_H
  241. X#define __HT_H
  242. X
  243. X/*
  244. X * $Id: ht.h,v 3.1 93/04/23 17:50:15 panos Exp $
  245. X */
  246. X
  247. X#include "dict.h"
  248. X
  249. Xtypedef unsigned ht_val ;
  250. Xtypedef ht_val (*ht_func)() ;
  251. X
  252. Xstruct ht_args
  253. X{
  254. X    unsigned ht_table_entries ;
  255. X    unsigned ht_bucket_entries ;
  256. X    ht_func ht_objvalue ;
  257. X    ht_func ht_keyvalue ;
  258. X} ;
  259. X
  260. X
  261. Xdict_h ht_create
  262. X    __ARGS( (
  263. X                    dict_function oo_compare,
  264. X                    dict_function ko_compare,
  265. X                    int flags,
  266. X                    int *errnop,
  267. X                    struct ht_args *args 
  268. X            ) ) ;
  269. Xvoid         ht_destroy        __ARGS( ( dict_h hh ) ) ;
  270. Xint         ht_insert         __ARGS( ( dict_h hh, dict_obj obj ) ) ;
  271. Xint         ht_insert_uniq    __ARGS( ( dict_h hh dict_obj, dict_obj *objp ) ) ;
  272. Xint         ht_delete        __ARGS( ( dict_h hh, dict_obj obj ) ) ;
  273. Xdict_obj ht_search        __ARGS( ( dict_h hh, dict_key key ) ) ;
  274. Xdict_obj ht_minimum        __ARGS( ( dict_h hh ) ) ;
  275. Xdict_obj ht_maximum        __ARGS( ( dict_h hh ) ) ;
  276. Xdict_obj ht_successor    __ARGS( ( dict_h hh, dict_obj ) ) ;
  277. Xdict_obj ht_predecessor    __ARGS( ( dict_h hh, dict_obj ) ) ;
  278. Xvoid ht_iterate            __ARGS( ( dict_h hh ) ) ;
  279. Xdict_obj ht_nextobj        __ARGS( ( dict_h hh ) ) ;
  280. X
  281. X#endif    /* __HT_H */
  282. X
  283. END_OF_FILE
  284. if test 1233 -ne `wc -c <'libs/src/dict/ht.h'`; then
  285.     echo shar: \"'libs/src/dict/ht.h'\" unpacked with wrong size!
  286. fi
  287. # end of 'libs/src/dict/ht.h'
  288. fi
  289. if test -f 'libs/src/fsma/COPYRIGHT' -a "${1}" != "-c" ; then 
  290.   echo shar: Will not clobber existing file \"'libs/src/fsma/COPYRIGHT'\"
  291. else
  292. echo shar: Extracting \"'libs/src/fsma/COPYRIGHT'\" \(1336 characters\)
  293. sed "s/^X//" >'libs/src/fsma/COPYRIGHT' <<'END_OF_FILE'
  294. XThis software is
  295. X
  296. X(c) Copyright 1992 by Panagiotis Tsirigotis
  297. X
  298. XThe author (Panagiotis Tsirigotis) grants permission to use, copy,
  299. Xand distribute this software and its documentation for any purpose 
  300. Xand without fee, provided that the above copyright notice extant in
  301. Xfiles in this distribution is not removed from files included in any
  302. Xredistribution and that this copyright notice is also included in any 
  303. Xredistribution.
  304. X
  305. XModifications to this software may be distributed, either by distributing
  306. Xthe modified software or by distributing patches to the original software,
  307. Xunder the following additional terms:
  308. X
  309. X1. The version number will be modified as follows:
  310. X      a. The first 3 components of the version number
  311. X         (i.e <number>.<number>.<number>) will remain unchanged.
  312. X      b. A new component will be appended to the version number to indicate
  313. X         the modification level. The form of this component is up to the 
  314. X         author of the modifications.
  315. X
  316. X2. The author of the modifications will include his/her name by appending it 
  317. X   along with the new version number to this file and will be responsible for 
  318. X   any wrong behavior of the modified software.
  319. X
  320. XThe author makes no representations about the suitability of this 
  321. Xsoftware for any purpose.  It is provided "as is" without any express 
  322. Xor implied warranty.
  323. X
  324. END_OF_FILE
  325. if test 1336 -ne `wc -c <'libs/src/fsma/COPYRIGHT'`; then
  326.     echo shar: \"'libs/src/fsma/COPYRIGHT'\" unpacked with wrong size!
  327. fi
  328. # end of 'libs/src/fsma/COPYRIGHT'
  329. fi
  330. if test -f 'libs/src/misc/COPYRIGHT' -a "${1}" != "-c" ; then 
  331.   echo shar: Will not clobber existing file \"'libs/src/misc/COPYRIGHT'\"
  332. else
  333. echo shar: Extracting \"'libs/src/misc/COPYRIGHT'\" \(1336 characters\)
  334. sed "s/^X//" >'libs/src/misc/COPYRIGHT' <<'END_OF_FILE'
  335. XThis software is
  336. X
  337. X(c) Copyright 1992 by Panagiotis Tsirigotis
  338. X
  339. XThe author (Panagiotis Tsirigotis) grants permission to use, copy,
  340. Xand distribute this software and its documentation for any purpose 
  341. Xand without fee, provided that the above copyright notice extant in
  342. Xfiles in this distribution is not removed from files included in any
  343. Xredistribution and that this copyright notice is also included in any 
  344. Xredistribution.
  345. X
  346. XModifications to this software may be distributed, either by distributing
  347. Xthe modified software or by distributing patches to the original software,
  348. Xunder the following additional terms:
  349. X
  350. X1. The version number will be modified as follows:
  351. X      a. The first 3 components of the version number
  352. X         (i.e <number>.<number>.<number>) will remain unchanged.
  353. X      b. A new component will be appended to the version number to indicate
  354. X         the modification level. The form of this component is up to the 
  355. X         author of the modifications.
  356. X
  357. X2. The author of the modifications will include his/her name by appending it 
  358. X   along with the new version number to this file and will be responsible for 
  359. X   any wrong behavior of the modified software.
  360. X
  361. XThe author makes no representations about the suitability of this 
  362. Xsoftware for any purpose.  It is provided "as is" without any express 
  363. Xor implied warranty.
  364. X
  365. END_OF_FILE
  366. if test 1336 -ne `wc -c <'libs/src/misc/COPYRIGHT'`; then
  367.     echo shar: \"'libs/src/misc/COPYRIGHT'\" unpacked with wrong size!
  368. fi
  369. # end of 'libs/src/misc/COPYRIGHT'
  370. fi
  371. if test -f 'libs/src/pq/COPYRIGHT' -a "${1}" != "-c" ; then 
  372.   echo shar: Will not clobber existing file \"'libs/src/pq/COPYRIGHT'\"
  373. else
  374. echo shar: Extracting \"'libs/src/pq/COPYRIGHT'\" \(1336 characters\)
  375. sed "s/^X//" >'libs/src/pq/COPYRIGHT' <<'END_OF_FILE'
  376. XThis software is
  377. X
  378. X(c) Copyright 1993 by Panagiotis Tsirigotis
  379. X
  380. XThe author (Panagiotis Tsirigotis) grants permission to use, copy,
  381. Xand distribute this software and its documentation for any purpose 
  382. Xand without fee, provided that the above copyright notice extant in
  383. Xfiles in this distribution is not removed from files included in any
  384. Xredistribution and that this copyright notice is also included in any 
  385. Xredistribution.
  386. X
  387. XModifications to this software may be distributed, either by distributing
  388. Xthe modified software or by distributing patches to the original software,
  389. Xunder the following additional terms:
  390. X
  391. X1. The version number will be modified as follows:
  392. X      a. The first 3 components of the version number
  393. X         (i.e <number>.<number>.<number>) will remain unchanged.
  394. X      b. A new component will be appended to the version number to indicate
  395. X         the modification level. The form of this component is up to the 
  396. X         author of the modifications.
  397. X
  398. X2. The author of the modifications will include his/her name by appending it 
  399. X   along with the new version number to this file and will be responsible for 
  400. X   any wrong behavior of the modified software.
  401. X
  402. XThe author makes no representations about the suitability of this 
  403. Xsoftware for any purpose.  It is provided "as is" without any express 
  404. Xor implied warranty.
  405. X
  406. END_OF_FILE
  407. if test 1336 -ne `wc -c <'libs/src/pq/COPYRIGHT'`; then
  408.     echo shar: \"'libs/src/pq/COPYRIGHT'\" unpacked with wrong size!
  409. fi
  410. # end of 'libs/src/pq/COPYRIGHT'
  411. fi
  412. if test -f 'libs/src/pset/COPYRIGHT' -a "${1}" != "-c" ; then 
  413.   echo shar: Will not clobber existing file \"'libs/src/pset/COPYRIGHT'\"
  414. else
  415. echo shar: Extracting \"'libs/src/pset/COPYRIGHT'\" \(1342 characters\)
  416. sed "s/^X//" >'libs/src/pset/COPYRIGHT' <<'END_OF_FILE'
  417. XThis software is
  418. X
  419. X(c) Copyright 1992, 1993 by Panagiotis Tsirigotis
  420. X
  421. XThe author (Panagiotis Tsirigotis) grants permission to use, copy,
  422. Xand distribute this software and its documentation for any purpose 
  423. Xand without fee, provided that the above copyright notice extant in
  424. Xfiles in this distribution is not removed from files included in any
  425. Xredistribution and that this copyright notice is also included in any 
  426. Xredistribution.
  427. X
  428. XModifications to this software may be distributed, either by distributing
  429. Xthe modified software or by distributing patches to the original software,
  430. Xunder the following additional terms:
  431. X
  432. X1. The version number will be modified as follows:
  433. X      a. The first 3 components of the version number
  434. X         (i.e <number>.<number>.<number>) will remain unchanged.
  435. X      b. A new component will be appended to the version number to indicate
  436. X         the modification level. The form of this component is up to the 
  437. X         author of the modifications.
  438. X
  439. X2. The author of the modifications will include his/her name by appending it 
  440. X   along with the new version number to this file and will be responsible for 
  441. X   any wrong behavior of the modified software.
  442. X
  443. XThe author makes no representations about the suitability of this 
  444. Xsoftware for any purpose.  It is provided "as is" without any express 
  445. Xor implied warranty.
  446. X
  447. END_OF_FILE
  448. if test 1342 -ne `wc -c <'libs/src/pset/COPYRIGHT'`; then
  449.     echo shar: \"'libs/src/pset/COPYRIGHT'\" unpacked with wrong size!
  450. fi
  451. # end of 'libs/src/pset/COPYRIGHT'
  452. fi
  453. if test -f 'libs/src/sio/COPYRIGHT' -a "${1}" != "-c" ; then 
  454.   echo shar: Will not clobber existing file \"'libs/src/sio/COPYRIGHT'\"
  455. else
  456. echo shar: Extracting \"'libs/src/sio/COPYRIGHT'\" \(1332 characters\)
  457. sed "s/^X//" >'libs/src/sio/COPYRIGHT' <<'END_OF_FILE'
  458. XThis software is
  459. X
  460. X(c) Copyright 1992, 1993 by Panagiotis Tsirigotis
  461. X
  462. XThe author (Panagiotis Tsirigotis) grants permission to use, copy,
  463. Xand distribute this software and its documentation for any purpose 
  464. Xand without fee, provided that a) the above copyright notice extant in
  465. Xfiles in this distribution is not removed from files included in any
  466. Xredistribution, and b) this file is also included in any redistribution.
  467. X
  468. XModifications to this software may be distributed, either by distributing
  469. Xthe modified software or by distributing patches to the original software,
  470. Xunder the following additional terms:
  471. X
  472. X1. The version number will be modified as follows:
  473. X      a. The first 3 components of the version number
  474. X         (i.e. <number>.<number>.<number>) will remain unchanged.
  475. X      b. A new component will be appended to the version number to indicate
  476. X         the modification level. The form of this component is up to the 
  477. X         author of the modifications.
  478. X
  479. X2. The author of the modifications will include his/her name by appending it 
  480. X   along with the new version number to this file and will be responsible for 
  481. X   any wrong behavior of the modified software.
  482. X
  483. XThe author makes no representations about the suitability of this 
  484. Xsoftware for any purpose.  It is provided "as is" without any express 
  485. Xor implied warranty.
  486. X
  487. END_OF_FILE
  488. if test 1332 -ne `wc -c <'libs/src/sio/COPYRIGHT'`; then
  489.     echo shar: \"'libs/src/sio/COPYRIGHT'\" unpacked with wrong size!
  490. fi
  491. # end of 'libs/src/sio/COPYRIGHT'
  492. fi
  493. if test -f 'libs/src/sio/suite/fdtest.c' -a "${1}" != "-c" ; then 
  494.   echo shar: Will not clobber existing file \"'libs/src/sio/suite/fdtest.c'\"
  495. else
  496. echo shar: Extracting \"'libs/src/sio/suite/fdtest.c'\" \(1150 characters\)
  497. sed "s/^X//" >'libs/src/sio/suite/fdtest.c' <<'END_OF_FILE'
  498. X/*
  499. X * (c) Copyright 1992, 1993 by Panagiotis Tsirigotis
  500. X * All rights reserved.  The file named COPYRIGHT specifies the terms 
  501. X * and conditions for redistribution.
  502. X */
  503. X
  504. X
  505. X#include <sys/time.h>
  506. X#include <sys/resource.h>
  507. X
  508. X#include "sio.h"
  509. X
  510. X#ifndef NULL
  511. X#define NULL 0
  512. X#endif
  513. X
  514. Xint main( argc, argv )
  515. X    int argc ;
  516. X    char *argv[] ;
  517. X{
  518. X#ifdef RLIMIT_NOFILE
  519. X    struct rlimit rl ;
  520. X    int fd ;
  521. X    int duped_fd ;
  522. X    char *s ;
  523. X
  524. X    if ( getrlimit( RLIMIT_NOFILE, &rl ) == -1 )
  525. X    {
  526. X        perror( "getrlimit" ) ;
  527. X        exit( 1 ) ;
  528. X    }
  529. X    if ( rl.rlim_cur != getdtablesize() )
  530. X    {
  531. X        printf( "rl.rlim_cur != getdtablesize()\n" ) ;
  532. X        exit( 1 ) ;
  533. X    }
  534. X    if ( rl.rlim_cur == rl.rlim_max )
  535. X        exit( 0 ) ;
  536. X
  537. X    rl.rlim_cur++ ;
  538. X    if ( setrlimit( RLIMIT_NOFILE, &rl ) == -1 )
  539. X    {
  540. X        perror( "setrlimit" ) ;
  541. X        exit( 1 ) ;
  542. X    }
  543. X    if ( Smorefds() == SIO_ERR )
  544. X    {
  545. X        perror( "Smorefds" ) ;
  546. X        exit( 1 ) ;
  547. X    }
  548. X    fd = open( "/etc/passwd", 0 ) ;
  549. X    if ( fd == -1 )
  550. X    {
  551. X        perror( "open" ) ;
  552. X        exit( 1 ) ;
  553. X    }
  554. X    duped_fd = getdtablesize()-1 ;
  555. X    if ( dup2( fd, duped_fd ) == -1 )
  556. X    {
  557. X        perror( "dup2" ) ;
  558. X        exit( 1 ) ;
  559. X    }
  560. X    s = Srdline( duped_fd ) ;
  561. X    if ( s == NULL )
  562. X    {
  563. X        perror( "Srdline" ) ;
  564. X        exit( 1 ) ;
  565. X    }
  566. X#endif
  567. X    exit( 0 ) ;
  568. X}
  569. END_OF_FILE
  570. if test 1150 -ne `wc -c <'libs/src/sio/suite/fdtest.c'`; then
  571.     echo shar: \"'libs/src/sio/suite/fdtest.c'\" unpacked with wrong size!
  572. fi
  573. # end of 'libs/src/sio/suite/fdtest.c'
  574. fi
  575. if test -f 'libs/src/sio/suite/sprint_test' -a "${1}" != "-c" ; then 
  576.   echo shar: Will not clobber existing file \"'libs/src/sio/suite/sprint_test'\"
  577. else
  578. echo shar: Extracting \"'libs/src/sio/suite/sprint_test'\" \(1146 characters\)
  579. sed "s/^X//" >'libs/src/sio/suite/sprint_test' <<'END_OF_FILE'
  580. X#!/bin/sh
  581. X
  582. X# (c) Copyright 1992, 1993 by Panagiotis Tsirigotis
  583. X# All rights reserved.  The file named COPYRIGHT specifies the terms 
  584. X# and conditions for redistribution.
  585. X
  586. X
  587. X#
  588. X# $Id: sprint_test,v 8.1 1993/03/13 01:21:48 panos Exp $
  589. X#
  590. X
  591. Xcompare()
  592. X{
  593. X    cmp -s PRINTF.DATA SPRINT.DATA
  594. X    if [ $? -ne 0 ]
  595. X    then
  596. X        echo TEST $1 FAILED
  597. X        echo Check files PRINTF.DATA and SPRINT.DATA for differences
  598. X        exit 1
  599. X    else
  600. X        echo TEST $1 PASSED
  601. X        rm -f PRINTF.DATA SPRINT.DATA
  602. X    fi
  603. X}
  604. X
  605. Xformat_test()
  606. X{
  607. X    Sprint $@ 1>PRINTF.DATA 2>SPRINT.DATA
  608. X    compare "$*"
  609. X}
  610. X
  611. Xformat_test ALL
  612. X
  613. Xformat_test -W10 -F0 -c
  614. Xformat_test -W10 -F- -c
  615. X
  616. Xecho
  617. Xecho PRECISION TEST
  618. Xi=13
  619. Xwhile test $i -ne 0
  620. Xdo
  621. X    format_test -P$i -F# -X
  622. X    i=`expr $i - 1`
  623. Xdone
  624. Xecho END OF PRECISION TEST
  625. Xecho
  626. X
  627. Xformat_test -Vi -4 4 1 -o "-F#"
  628. X
  629. Xformat_test -Vf -1.0 1.0 0.3 -W30 -P13 -F+ -f
  630. Xformat_test -Vf -1.0 1.0 0.3 -W30 -P13 -F+ -e
  631. Xformat_test -Vf -1.0 2.0 0.3 -W30 -P13 -F+ -g
  632. X
  633. Xformat_test -Vf -1.0 1.0 0.3 -W30 -P13 -F+- -f
  634. Xformat_test -Vf -1.0 1.0 0.3 -W30 -P13 -F+- -e
  635. Xformat_test -Vf -1.0 2.0 0.3 -W30 -P13 -F+- -g
  636. X
  637. Xformat_test -W10 "-F " -x
  638. X
  639. Xformat_test -W40 -u -Vi 8 100 3 -F0
  640. X
  641. Xformat_test -b
  642. Xformat_test -b -P10
  643. END_OF_FILE
  644. if test 1146 -ne `wc -c <'libs/src/sio/suite/sprint_test'`; then
  645.     echo shar: \"'libs/src/sio/suite/sprint_test'\" unpacked with wrong size!
  646. fi
  647. # end of 'libs/src/sio/suite/sprint_test'
  648. fi
  649. if test -f 'libs/src/sio/suite/testlib' -a "${1}" != "-c" ; then 
  650.   echo shar: Will not clobber existing file \"'libs/src/sio/suite/testlib'\"
  651. else
  652. echo shar: Extracting \"'libs/src/sio/suite/testlib'\" \(1172 characters\)
  653. sed "s/^X//" >'libs/src/sio/suite/testlib' <<'END_OF_FILE'
  654. X#!/bin/sh
  655. X
  656. X# (c) Copyright 1992, 1993 by Panagiotis Tsirigotis
  657. X# All rights reserved.  The file named COPYRIGHT specifies the terms 
  658. X# and conditions for redistribution.
  659. X
  660. X
  661. X#
  662. X# $Id: testlib,v 8.2 1993/09/08 05:59:01 panos Exp $
  663. X#
  664. X
  665. X#
  666. X# Purpose:
  667. X#        Invoke the tester script. This is necessary because the tester
  668. X#        script requires functions and /bin/sh does not support functions
  669. X#        on all OS's. This script decides what shell to use to execute
  670. X#        tester. On Suns, it uses /bin/sh. On DECstations, it uses
  671. X#        /usr/bin/ksh
  672. X#        The decision is made by checking $ARCH
  673. X#        
  674. X
  675. Xcase "$ARCH" in
  676. X    "")
  677. X        echo "ARCH not defined. Please define it."
  678. X        exit 1
  679. X        ;;
  680. X    
  681. X    sun4|sun3)
  682. X        TESTSHELL=/bin/sh
  683. X        LDFLAGS="-Bstatic -lm"
  684. X        ;;
  685. X
  686. X    dec-mips)
  687. X        TESTSHELL=/usr/bin/ksh
  688. X        LDFLAGS=
  689. X        ;;
  690. X    
  691. X    #
  692. X    # The following case was provided by Stephen House.
  693. X    # It applies to HP-UX 8.0 (and later, probably).
  694. X    #
  695. X    # The addition of MORE_DEFS was by me (Panos Tsirigotis)
  696. X    #
  697. X    hp)
  698. X        TESTSHELL=/bin/ksh
  699. X        LDFLAGS=
  700. X        MORE_DEFS="-DRANDOM=lrand48"
  701. X        ;;
  702. X
  703. X    *) echo "Unknown architecture: $ARCH"
  704. X        exit 2
  705. X        ;;
  706. Xesac
  707. X
  708. Xexport LDFLAGS
  709. Xexport TESTSHELL
  710. Xif test "$MORE_DEFS" ; then export MORE_DEFS ; fi
  711. X$TESTSHELL tester $*
  712. X
  713. END_OF_FILE
  714. if test 1172 -ne `wc -c <'libs/src/sio/suite/testlib'`; then
  715.     echo shar: \"'libs/src/sio/suite/testlib'\" unpacked with wrong size!
  716. fi
  717. # end of 'libs/src/sio/suite/testlib'
  718. fi
  719. if test -f 'libs/src/str/COPYRIGHT' -a "${1}" != "-c" ; then 
  720.   echo shar: Will not clobber existing file \"'libs/src/str/COPYRIGHT'\"
  721. else
  722. echo shar: Extracting \"'libs/src/str/COPYRIGHT'\" \(1329 characters\)
  723. sed "s/^X//" >'libs/src/str/COPYRIGHT' <<'END_OF_FILE'
  724. XThis software is
  725. X
  726. X(c) Copyright 1992, 1993 by Panagiotis Tsirigotis
  727. X
  728. XThe author (Panagiotis Tsirigotis) grants permission to use, copy,
  729. Xand distribute this software and its documentation for any purpose 
  730. Xand without fee, provided that the above copyright notice extant in
  731. Xfiles in this distribution is not removed from files included in any
  732. Xredistribution and that this file is also included in any redistribution.
  733. X
  734. XModifications to this software may be distributed, either by distributing
  735. Xthe modified software or by distributing patches to the original software,
  736. Xunder the following additional terms:
  737. X
  738. X1. The version number will be modified as follows:
  739. X      a. The first 3 components of the version number
  740. X         (i.e <number>.<number>.<number>) will remain unchanged.
  741. X      b. A new component will be appended to the version number to indicate
  742. X         the modification level. The form of this component is up to the 
  743. X         author of the modifications.
  744. X
  745. X2. The author of the modifications will include his/her name by appending it 
  746. X   along with the new version number to this file and will be responsible for 
  747. X   any wrong behavior of the modified software.
  748. X
  749. XThe author makes no representations about the suitability of this 
  750. Xsoftware for any purpose.  It is provided "as is" without any express 
  751. Xor implied warranty.
  752. X
  753. END_OF_FILE
  754. if test 1329 -ne `wc -c <'libs/src/str/COPYRIGHT'`; then
  755.     echo shar: \"'libs/src/str/COPYRIGHT'\" unpacked with wrong size!
  756. fi
  757. # end of 'libs/src/str/COPYRIGHT'
  758. fi
  759. if test -f 'libs/src/str/ss_bf.c' -a "${1}" != "-c" ; then 
  760.   echo shar: Will not clobber existing file \"'libs/src/str/ss_bf.c'\"
  761. else
  762. echo shar: Extracting \"'libs/src/str/ss_bf.c'\" \(1305 characters\)
  763. sed "s/^X//" >'libs/src/str/ss_bf.c' <<'END_OF_FILE'
  764. X/*
  765. X * (c) Copyright 1992, 1993 by Panagiotis Tsirigotis
  766. X * All rights reserved.  The file named COPYRIGHT specifies the terms 
  767. X * and conditions for redistribution.
  768. X */
  769. X
  770. Xstatic char RCSid[] = "$Id" ;
  771. X
  772. X#include "ss_impl.h"
  773. X
  774. XPRIVATE int bf_setup() ;
  775. XPRIVATE char *bf_match() ;
  776. XPRIVATE void bf_done() ;
  777. X
  778. Xstruct ss_ops __strs_bfops = { bf_setup, bf_match, bf_done } ;
  779. X
  780. X
  781. XPRIVATE int bf_setup( hp )
  782. X    header_s *hp ;
  783. X{
  784. X#ifdef lint
  785. X    hp = hp ;
  786. X#endif
  787. X    return( SS_OK ) ;
  788. X}
  789. X
  790. X
  791. XPRIVATE char *bf_match( hp, str, len )
  792. X    header_s        *hp ;
  793. X    char            *str ;
  794. X    int            len ;
  795. X{
  796. X    register int    pfc        = SS_PATTERN( hp )[ 0 ] ;    /* pattern first char */
  797. X    register char    *pos        = str ;
  798. X    register char    *endpos    = &str[ len - SS_PATLEN( hp ) + 1 ] ;
  799. X    char                *endpat    = &SS_PATTERN( hp )[ SS_PATLEN( hp ) ] ;
  800. X
  801. X    while ( pos < endpos )
  802. X    {
  803. X        register int strc = SS_MAP( hp, *pos ) ;
  804. X        register char *pp ;                                    /* pattern pointer */
  805. X        register char *sp ;                                    /* string pointer */
  806. X
  807. X        pos++ ;
  808. X        if ( strc != pfc )
  809. X            continue ;
  810. X
  811. X        for ( pp = &SS_PATTERN( hp )[ 1 ], sp = pos ;; sp++, pp++ )
  812. X        {
  813. X            if ( pp == endpat )            /* we are guaranteed a non-empty pattern */
  814. X                return( pos-1 ) ;
  815. X            if ( *pp != SS_MAP( hp, *sp ) )
  816. X                break ;
  817. X        }
  818. X    }
  819. X    return( CHAR_NULL ) ;
  820. X}
  821. X
  822. X
  823. XPRIVATE void bf_done( hp )
  824. X    header_s *hp ;
  825. X{
  826. X#ifdef lint
  827. X    hp = hp ;
  828. X#endif
  829. X}
  830. X
  831. END_OF_FILE
  832. if test 1305 -ne `wc -c <'libs/src/str/ss_bf.c'`; then
  833.     echo shar: \"'libs/src/str/ss_bf.c'\" unpacked with wrong size!
  834. fi
  835. # end of 'libs/src/str/ss_bf.c'
  836. fi
  837. if test -f 'libs/src/timer/COPYRIGHT' -a "${1}" != "-c" ; then 
  838.   echo shar: Will not clobber existing file \"'libs/src/timer/COPYRIGHT'\"
  839. else
  840. echo shar: Extracting \"'libs/src/timer/COPYRIGHT'\" \(1336 characters\)
  841. sed "s/^X//" >'libs/src/timer/COPYRIGHT' <<'END_OF_FILE'
  842. XThis software is
  843. X
  844. X(c) Copyright 1993 by Panagiotis Tsirigotis
  845. X
  846. XThe author (Panagiotis Tsirigotis) grants permission to use, copy,
  847. Xand distribute this software and its documentation for any purpose 
  848. Xand without fee, provided that the above copyright notice extant in
  849. Xfiles in this distribution is not removed from files included in any
  850. Xredistribution and that this copyright notice is also included in any 
  851. Xredistribution.
  852. X
  853. XModifications to this software may be distributed, either by distributing
  854. Xthe modified software or by distributing patches to the original software,
  855. Xunder the following additional terms:
  856. X
  857. X1. The version number will be modified as follows:
  858. X      a. The first 3 components of the version number
  859. X         (i.e <number>.<number>.<number>) will remain unchanged.
  860. X      b. A new component will be appended to the version number to indicate
  861. X         the modification level. The form of this component is up to the 
  862. X         author of the modifications.
  863. X
  864. X2. The author of the modifications will include his/her name by appending it 
  865. X   along with the new version number to this file and will be responsible for 
  866. X   any wrong behavior of the modified software.
  867. X
  868. XThe author makes no representations about the suitability of this 
  869. Xsoftware for any purpose.  It is provided "as is" without any express 
  870. Xor implied warranty.
  871. X
  872. END_OF_FILE
  873. if test 1336 -ne `wc -c <'libs/src/timer/COPYRIGHT'`; then
  874.     echo shar: \"'libs/src/timer/COPYRIGHT'\" unpacked with wrong size!
  875. fi
  876. # end of 'libs/src/timer/COPYRIGHT'
  877. fi
  878. if test -f 'libs/src/timer/defs.h' -a "${1}" != "-c" ; then 
  879.   echo shar: Will not clobber existing file \"'libs/src/timer/defs.h'\"
  880. else
  881. echo shar: Extracting \"'libs/src/timer/defs.h'\" \(1262 characters\)
  882. sed "s/^X//" >'libs/src/timer/defs.h' <<'END_OF_FILE'
  883. X/*
  884. X * (c) Copyright 1993 by Panagiotis Tsirigotis
  885. X * All rights reserved.  The file named COPYRIGHT specifies the terms 
  886. X * and conditions for redistribution.
  887. X */
  888. X
  889. X
  890. X/*
  891. X * $Id: defs.h,v 5.1 93/11/26 12:07:18 panos Exp $
  892. X */
  893. X
  894. X#define PRIVATE                    static
  895. X
  896. X#ifndef NULL
  897. X#define NULL                        0
  898. X#endif
  899. X
  900. X#ifndef FALSE
  901. X#define FALSE                        0
  902. X#define TRUE                        1
  903. X#endif
  904. X
  905. X#define TIMER_NULL                ((timer_s *)0)
  906. X#define SIGVEC_NULL                ((struct sigvec *)0)
  907. X#define SIGACTION_NULL            ((struct sigaction *)0)
  908. X
  909. X#define HANDLE_ERROR( flags, retval, errp, errval, msg )                            \
  910. X                                        if ( flags & TIMER_RETURN_ERROR )            \
  911. X                                        {                                            \
  912. X                                            *errp = errval ;                          \
  913. X                                            return( retval ) ;                        \
  914. X                                        }                                            \
  915. X                                        else                                         \
  916. X                                        {                                            \
  917. X                                            char *s = msg ;                           \
  918. X                                                                                                    \
  919. X                                            (void) write( 2, s, strlen( s ) ) ;       \
  920. X                                            abort() ;                                 \
  921. X                                            _exit( 1 ) ;                              \
  922. X                                            /* NOTREACHED */                          \
  923. X                                        }
  924. X
  925. END_OF_FILE
  926. if test 1262 -ne `wc -c <'libs/src/timer/defs.h'`; then
  927.     echo shar: \"'libs/src/timer/defs.h'\" unpacked with wrong size!
  928. fi
  929. # end of 'libs/src/timer/defs.h'
  930. fi
  931. if test -f 'libs/src/xlog/COPYRIGHT' -a "${1}" != "-c" ; then 
  932.   echo shar: Will not clobber existing file \"'libs/src/xlog/COPYRIGHT'\"
  933. else
  934. echo shar: Extracting \"'libs/src/xlog/COPYRIGHT'\" \(1342 characters\)
  935. sed "s/^X//" >'libs/src/xlog/COPYRIGHT' <<'END_OF_FILE'
  936. XThis software is
  937. X
  938. X(c) Copyright 1992, 1993 by Panagiotis Tsirigotis
  939. X
  940. XThe author (Panagiotis Tsirigotis) grants permission to use, copy,
  941. Xand distribute this software and its documentation for any purpose 
  942. Xand without fee, provided that the above copyright notice extant in
  943. Xfiles in this distribution is not removed from files included in any
  944. Xredistribution and that this copyright notice is also included in any 
  945. Xredistribution.
  946. X
  947. XModifications to this software may be distributed, either by distributing
  948. Xthe modified software or by distributing patches to the original software,
  949. Xunder the following additional terms:
  950. X
  951. X1. The version number will be modified as follows:
  952. X      a. The first 3 components of the version number
  953. X         (i.e <number>.<number>.<number>) will remain unchanged.
  954. X      b. A new component will be appended to the version number to indicate
  955. X         the modification level. The form of this component is up to the 
  956. X         author of the modifications.
  957. X
  958. X2. The author of the modifications will include his/her name by appending it 
  959. X   along with the new version number to this file and will be responsible for 
  960. X   any wrong behavior of the modified software.
  961. X
  962. XThe author makes no representations about the suitability of this 
  963. Xsoftware for any purpose.  It is provided "as is" without any express 
  964. Xor implied warranty.
  965. X
  966. END_OF_FILE
  967. if test 1342 -ne `wc -c <'libs/src/xlog/COPYRIGHT'`; then
  968.     echo shar: \"'libs/src/xlog/COPYRIGHT'\" unpacked with wrong size!
  969. fi
  970. # end of 'libs/src/xlog/COPYRIGHT'
  971. fi
  972. if test -f 'libs/src/xlog/filelog.h' -a "${1}" != "-c" ; then 
  973.   echo shar: Will not clobber existing file \"'libs/src/xlog/filelog.h'\"
  974. else
  975. echo shar: Extracting \"'libs/src/xlog/filelog.h'\" \(1275 characters\)
  976. sed "s/^X//" >'libs/src/xlog/filelog.h' <<'END_OF_FILE'
  977. X/*
  978. X * (c) Copyright 1992, 1993 by Panagiotis Tsirigotis
  979. X * All rights reserved.  The file named COPYRIGHT specifies the terms 
  980. X * and conditions for redistribution.
  981. X */
  982. X
  983. X
  984. X/*
  985. X * $Id: filelog.h,v 2.2 1993/10/28 01:35:55 panos Exp $
  986. X */
  987. X
  988. X/*
  989. X * The file can be either open or closed.
  990. X * When the file is closed, the state is always FL_CLOSED.
  991. X * When the file is open, the state is:
  992. X *        FL_OPEN:            if everything is ok
  993. X *        FL_SIZE:            if the hard limit was exceeded
  994. X *        FL_ERROR:        if an error occured
  995. X */
  996. Xtypedef enum { FL_CLOSED = 0, FL_OPEN, FL_SIZE, FL_ERROR } filelog_state_e ;
  997. X
  998. Xstruct filelog
  999. X{
  1000. X    int                    fl_fd ;
  1001. X    filelog_state_e    fl_state ;
  1002. X    bool_int             fl_close_on_exec ;
  1003. X    int                     fl_error ;                /* error code when in FL_ERROR        */
  1004. X    bool_int                fl_size_control ;        /* enabled or not                            */
  1005. X    bool_int                fl_issued_warning ;    /* when the soft limit was exceeded    */
  1006. X    unsigned             fl_size ;            /* current size                       */
  1007. X    unsigned                fl_soft_limit ;
  1008. X    unsigned                fl_hard_limit ;
  1009. X} ;
  1010. X
  1011. X#define FILELOG_ENABLE_SIZE_CONTROL( flp )        (flp)->fl_size_control = TRUE
  1012. X#define FILELOG_DISABLE_SIZE_CONTROL( flp )        (flp)->fl_size_control = FALSE
  1013. X#define FILELOG_SIZE_CONTROL( flp )                ( (flp)->fl_size_control )
  1014. X
  1015. X#define FILELOG( xp )            ((struct filelog *)(xp)->xl_data)
  1016. X
  1017. END_OF_FILE
  1018. if test 1275 -ne `wc -c <'libs/src/xlog/filelog.h'`; then
  1019.     echo shar: \"'libs/src/xlog/filelog.h'\" unpacked with wrong size!
  1020. fi
  1021. # end of 'libs/src/xlog/filelog.h'
  1022. fi
  1023. if test -f 'libs/src/xlog/util.c' -a "${1}" != "-c" ; then 
  1024.   echo shar: Will not clobber existing file \"'libs/src/xlog/util.c'\"
  1025. else
  1026. echo shar: Extracting \"'libs/src/xlog/util.c'\" \(1198 characters\)
  1027. sed "s/^X//" >'libs/src/xlog/util.c' <<'END_OF_FILE'
  1028. X/*
  1029. X * (c) Copyright 1992, 1993 by Panagiotis Tsirigotis
  1030. X * All rights reserved.  The file named COPYRIGHT specifies the terms 
  1031. X * and conditions for redistribution.
  1032. X */
  1033. X
  1034. Xstatic char RCSid[] = "$Id: util.c,v 2.1 1993/05/06 07:40:12 panos Exp $" ;
  1035. X
  1036. Xextern int sys_nerr;
  1037. Xextern char *sys_errlist[];
  1038. Xextern int errno;
  1039. X
  1040. Xchar *malloc() ;
  1041. X
  1042. X#define NUL                        '\0'
  1043. X#define NULL                    0
  1044. X
  1045. X
  1046. X/*
  1047. X * Search the given buffer for an occurrence of "%m"
  1048. X */
  1049. Xchar *__xlog_add_errno( buf, len )
  1050. X    char *buf ;
  1051. X    int len ;
  1052. X{
  1053. X    register char *s ;
  1054. X
  1055. X    for ( s = buf ; s < &buf[ len-1 ] ; s++ )
  1056. X        if ( *s == '%' && *(s+1) == 'm' )
  1057. X            return( s ) ;
  1058. X    return( NULL ) ;
  1059. X}
  1060. X
  1061. X
  1062. X
  1063. Xchar *__xlog_explain_errno( buf, size )
  1064. X    char *buf ;
  1065. X    unsigned *size ;
  1066. X{
  1067. X    register int len ;
  1068. X    char *strncpy() ;
  1069. X
  1070. X    if ( errno < sys_nerr )
  1071. X    {
  1072. X
  1073. X        (void) strncpy( buf, sys_errlist[ errno ], (int)*size ) ;
  1074. X        for ( len = 0 ; len < *size ; len++ )
  1075. X            if ( buf[ len ] == NUL )
  1076. X                break ;
  1077. X        *size = len ;
  1078. X    }
  1079. X    else
  1080. X        len = strx_nprint( buf, *size, "errno = %d", errno ) ;
  1081. X    return( buf ) ;
  1082. X}
  1083. X
  1084. X
  1085. Xchar *__xlog_new_string( s )
  1086. X    char *s ;
  1087. X{
  1088. X    unsigned size = strlen( s ) + 1 ;
  1089. X    char *p = malloc( size ) ;
  1090. X    char *strcpy() ;
  1091. X
  1092. X    return( ( p != NULL ) ? strcpy( p, s ) : p ) ;
  1093. X}
  1094. X
  1095. X
  1096. END_OF_FILE
  1097. if test 1198 -ne `wc -c <'libs/src/xlog/util.c'`; then
  1098.     echo shar: \"'libs/src/xlog/util.c'\" unpacked with wrong size!
  1099. fi
  1100. # end of 'libs/src/xlog/util.c'
  1101. fi
  1102. echo shar: End of archive 2 \(of 20\).
  1103. cp /dev/null ark2isdone
  1104. MISSING=""
  1105. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ; do
  1106.     if test ! -f ark${I}isdone ; then
  1107.     MISSING="${MISSING} ${I}"
  1108.     fi
  1109. done
  1110. if test "${MISSING}" = "" ; then
  1111.     echo You have unpacked all 20 archives.
  1112.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  1113. else
  1114.     echo You still need to unpack the following archives:
  1115.     echo "        " ${MISSING}
  1116. fi
  1117. ##  End of shell archive.
  1118. exit 0
  1119.