home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d1xx / d110 / pdc.lha / Pdc / lib / READ_ME < prev    next >
Text File  |  1987-10-28  |  3KB  |  54 lines

  1. This is a public-domain reimplementation of string(3) and friends, notably
  2. memory(3) and bstring(3) (except ffs).  Not derived from licensed software.
  3. This code may be used on any computer system for any purpose by anyone.
  4.  
  5. Relative to my old net.sources posting, this one adds some functions and
  6. fixes one or two obscure bugs.  There has been another string library
  7. posted in recent times, with many more functions; I haven't inspected it
  8. and can't comment on its relationship to mine.  Alas, the manual pages
  9. for this stuff are copyright by various people other than me, so I can't
  10. include them.  See your local Unix manuals.
  11.  
  12. This distribution implements precisely the union of the string functions
  13. of the SVID, 4BSD, X3J11, and V7.  Included is a large test program that
  14. exercises everything quite thoroughly.  (Note that some existing libraries,
  15. including e.g. V7, flunk one or more of these tests.)
  16.  
  17. In the event of conflict between the definitions from various places, the
  18. newer or more portable one is chosen.  That is, X3J11 overrules the SVID,
  19. which in turn overrules older Unixes.
  20.  
  21. The code is written for maximal portability.  Some efficiency has been
  22. sacrificed in the cause of meticulously avoiding possible portability
  23. problems.  For example, this code never assumes that a pointer can be
  24. moved past the end of an array and then backed up.  Many of these functions
  25. can be implemented more efficiently if machine-dependent assumptions are
  26. made; memcpy is a particular glaring case.
  27.  
  28. Simplistically:  put this stuff into a source directory, inspect Makefile
  29. for compilation options that need changing to suit your local environment,
  30. and then do "make r".  This compiles the functions and the test program and
  31. runs the tests.  If there are no complaints, put string.h in /usr/include
  32. (you may also want to "make memory.h" and put it in /usr/include) and add
  33. the functions (*.o except for tester.o) to your C library.  The internal
  34. interdependencies are:
  35.  
  36.          index     needs     strchr
  37.          rindex    needs     strrchr
  38.          bcopy     needs     memcpy
  39.          bcmp      needs     memcmp
  40.          bzero     needs     memset
  41.  
  42. I haven't included an implementation of Berkeley's ffs function partly
  43. because it's not trivial to do in a portable way, and partly because I
  44. don't really see it as a string function.
  45.  
  46. A weakness in the tester program is that it uses quite short strings for
  47. everything, and pays no real attention to alignment issues.  Optimized
  48. implementations of things like memcpy would need a more elaborate set of
  49. test cases to put them through their full paces.
  50.  
  51.                                        Henry Spencer @ U of Toronto Zoology
  52.                                        {allegra,ihnp4,decvax,pyramid}!utzoo!henry
  53.                                        Wed Jun 25 19:21:34 EDT 1986
  54.