home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / mail / mmdf / mmdf-IIb.43 / lib / util / equwrd.c < prev    next >
Encoding:
C/C++ Source or Header  |  1986-02-01  |  565 b   |  17 lines

  1. #include "util.h"
  2. /*                                                                      */
  3. /*      Determine whether the two given strings begin with the same     */
  4. /*  alphabetic prefix of the given length.                              */
  5. /*                                                                      */
  6.  
  7. equwrd (wrd1, wrd2, length)
  8. register char   *wrd1,
  9.         *wrd2;
  10. int              length;
  11. {
  12.     extern char chrcnv[];
  13.  
  14.     while (chrcnv[*wrd1++] == chrcnv[*wrd2++] && --length > 0);
  15.     return (length == 0 && !isalpha (*wrd1) && !isalpha (*wrd2));
  16. }
  17.