Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
1.3 KiB

  1. /***
  2. *mbsinc.c - Move MBCS string pointer ahead one charcter.
  3. *
  4. * Copyright (c) 1991-2001, Microsoft Corporation. All rights reserved.
  5. *
  6. *Purpose:
  7. * Move MBCS string pointer ahead one character.
  8. *
  9. *Revision History:
  10. * 11-19-92 KRS Ported from 16-bit sources.
  11. * 08-03-93 KRS Fix prototypes.
  12. * 08-20-93 CFW Remove test for NULL string, use new function parameters.
  13. * 10-05-93 GJF Replaced _CRTAPI1 with __cdecl.
  14. * 04-28-98 GJF No more _ISLEADBYTE macro.
  15. *
  16. *******************************************************************************/
  17. #ifdef _MBCS
  18. #include <cruntime.h>
  19. #include <mbdata.h>
  20. #include <mbstring.h>
  21. #include <mbctype.h>
  22. #include <stddef.h>
  23. /***
  24. *_mbsinc - Move MBCS string pointer ahead one charcter.
  25. *
  26. *Purpose:
  27. * Move the supplied string pointer ahead by one
  28. * character. MBCS characters are handled correctly.
  29. *
  30. *Entry:
  31. * const unsigned char *current = current char pointer (legal MBCS boundary)
  32. *
  33. *Exit:
  34. * Returns pointer after moving it.
  35. *
  36. *Exceptions:
  37. *
  38. *******************************************************************************/
  39. unsigned char * __cdecl _mbsinc(
  40. const unsigned char *current
  41. )
  42. {
  43. if ( _ismbblead(*(current++)) )
  44. current++;
  45. return (unsigned char *)current;
  46. }
  47. #endif /* _MBCS */