string.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /* $Id$
  2. * MegaZeux
  3. *
  4. * Copyright (C) 1996 Greg Janson
  5. * Copyright (C) 1998 Matthew D. Williams - dbwilli@scsn.net
  6. *
  7. * This program is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU General Public License as
  9. * published by the Free Software Foundation; either version 2 of
  10. * the License, or (at your option) any later version.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. * General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, write to the Free Software
  19. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  20. */
  21. /* STRING.H- Declarations for STRING.ASM */
  22. #ifndef __STRING_H
  23. #define __STRING_H
  24. #ifdef __cplusplus
  25. extern "C" {
  26. #endif
  27. int str_len_color(char far *str);
  28. int str_len(char far *str);
  29. void str_cpy(char far *dest,char far *source);
  30. void mem_cpy(char far *dest,char far *source,unsigned int len);
  31. void str_cat(char far *dest,char far *source);
  32. //Dest and source can overlap. Set code_bit to 0 if dest is lower in mem,
  33. //or to 1 if dest is higher in mem.
  34. void mem_mov(char far *dest,char far *source,unsigned int len,
  35. char code_bit);
  36. //XOR a section of memory with a given code
  37. void mem_xor(char far *mem,unsigned int len,unsigned char xor_with);
  38. char _fstricmp(char far *dest,char far *source);//0==equal
  39. // This will do up to a certain amount; good for "wildcarding" - Exo
  40. char _fstrnicmp(char far *dest, char far *source, int count);
  41. void _fstrlwr(char far *str);
  42. void _fstrupr(char far *str);
  43. #define str_cmp _fstricmp
  44. #define strn_cmp _fstrnicmp
  45. #define str_lwr _fstrlwr
  46. #define str_upr _fstrupr
  47. #ifdef __cplusplus
  48. }
  49. #endif
  50. #endif