home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / vol_300 / 344_01 / pb.doc < prev    next >
Text File  |  1989-10-28  |  1KB  |  44 lines

  1. /*
  2.  *      HEADER:         ;
  3.  *      TITLE:          PB Phone Book Manual Page;
  4.  *      DATE:           10/27/1989;
  5.  *      VERSION:        1.0;
  6.  *      FILENAME:       PB.DOC;
  7.  *      SEE-ALSO:       PB.C, STRISTR.C, BLKSPLIT.C;
  8.  *      AUTHORS:        Michael Kelly;
  9.  */
  10.  
  11.          'Quick and Dirty Phone Directory'
  12.  
  13.  
  14. DESCRIPTION:
  15.  
  16.      This example program implements a telephone directory to illustrate
  17.  
  18.      the use of the blksplit() and stristr() functions on this disk.
  19.  
  20.      It loads a file of ASCII data, ( "phonebk.dat" ) splitting it into lines
  21.  
  22.      ( using blksplit() ) and performing a case insensitive search
  23.  
  24.      ( using stristr() ) for the requested substring.
  25.  
  26.      It then echos matching records and a total of records matched.
  27.  
  28.      The size of the data file is limited to the largest memory block
  29.  
  30.      minus 1 that can be allocated with calloc(), the substring is
  31.  
  32.      limited to 127 characters, and records are limited to one line
  33.  
  34.      of ASCII text.
  35.  
  36.      The blksplit() function can just as easily be used to split a
  37.  
  38.      line of text into fields.
  39.  
  40. INVOCATION:
  41.  
  42.      PB [ searchstring ]
  43.  
  44.