diff options
Diffstat (limited to 'private/crt32/mbstring/mbsinc.c')
-rw-r--r-- | private/crt32/mbstring/mbsinc.c | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/private/crt32/mbstring/mbsinc.c b/private/crt32/mbstring/mbsinc.c new file mode 100644 index 000000000..451810485 --- /dev/null +++ b/private/crt32/mbstring/mbsinc.c @@ -0,0 +1,48 @@ +/*** +*mbsinc.c - Move MBCS string pointer ahead one charcter. +* +* Copyright (c) 1991-1993, Microsoft Corporation. All rights reserved. +* +*Purpose: +* Move MBCS string pointer ahead one character. +* +*Revision History: +* 11-19-92 KRS Ported from 16-bit sources. +* 08-03-93 KRS Fix prototypes. +* 08-20-93 CFW Remove test for NULL string, use new function parameters. +* +*******************************************************************************/ + +#ifdef _MBCS +#include <cruntime.h> +#include <mbdata.h> +#include <mbstring.h> +#include <mbctype.h> +#include <stddef.h> + +/*** +*_mbsinc - Move MBCS string pointer ahead one charcter. +* +*Purpose: +* Move the supplied string pointer ahead by one +* character. MBCS characters are handled correctly. +* +*Entry: +* const unsigned char *current = current char pointer (legal MBCS boundary) +* +*Exit: +* Returns pointer after moving it. +* +*Exceptions: +* +*******************************************************************************/ + +unsigned char * _CRTAPI1 _mbsinc( + const unsigned char *current + ) +{ + if (_ISLEADBYTE(*(current++))) + current++; + return (unsigned char *)current; +} +#endif /* _MBCS */ |