home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 9 / amigaformatcd09.iso / coverdisks / subsdisk / subs.dms / subs.adf / cookie.LZX / cookietool / src / strstuff.h < prev   
Encoding:
C/C++ Source or Header  |  1996-10-26  |  1.0 KB  |  24 lines

  1. /*************************************************************************\
  2.                  strstuff.h: header file to strstuff.c
  3. \*************************************************************************/
  4.  
  5. typedef unsigned char UBYTE;
  6.  
  7. /* special return values for str_cmp() and strn_cmp() */
  8. #define STR_LONGER   256   
  9. #define STR_SHORTER -256
  10.  
  11. /* possible values for bordermode (treatment of word delimiters): */
  12. #define BM_FUSSY       3  /* compare char by char */
  13. #define BM_DONTCOUNT   2  /* number (and kind) of spaces doesn't matter */
  14. #define BM_SPACEPUNCTS 1  /* treat punctuation like spaces */
  15. #define BM_MERGE       0  /* merge all alphanumerics into one single word */
  16.  
  17. void str_setup(int bordermode, int case_sense);
  18. /* Always call str_setup(), before using any of the other functions !!! */
  19. int str_cmp(UBYTE *s, UBYTE *t);
  20. int strn_cmp(UBYTE *s, UBYTE *t, size_t n);
  21. UBYTE *str_str(UBYTE *s, UBYTE *t);    /* bordermode has NO effect here! */
  22. void print_strstat(void);     /* some user info printed to <stdout> */
  23.  
  24.