diff options
Diffstat (limited to 'private/crt32/mbstring/strninc.c')
-rw-r--r-- | private/crt32/mbstring/strninc.c | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/private/crt32/mbstring/strninc.c b/private/crt32/mbstring/strninc.c new file mode 100644 index 000000000..211fdbc99 --- /dev/null +++ b/private/crt32/mbstring/strninc.c @@ -0,0 +1,47 @@ +/*** +*strninc.c - Increment non-MBCS string pointer by specified char count. +* +* Copyright (c) 1987-1993, Microsoft Corporation. All rights reserved. +* +*Purpose: +* Increment non-MBCS string pointer by specified char count. +* +*Revision History: +* 11-19-92 KRS Ported from 16-bit sources. +* 06-03-93 KRS Remove NULL pointer check. +* 08-03-93 KRS Fix return value arithmetic. +* +*******************************************************************************/ + +#ifdef _MBCS +#include <cruntime.h> +#include <mbdata.h> +#include <mbstring.h> +#include <stddef.h> + +/*** +*_strninc - Increment a SBCS string pointer by specified char count, used +* for mapping _[f]mbsninc to the non-MBCS case. +* +*Purpose: +* Increment the supplied string pointer by the specified number +* of characters. +* +*Entry: +* const unsigned char *string = pointer to string +* unsigned int ccnt = number of char to advance the pointer +* +*Exit: +* Returns pointer after advancing it. +* +*Exceptions: +* +*******************************************************************************/ + +unsigned char * _CRTAPI1 _strninc(string, ccnt) +const unsigned char *string; +size_t ccnt; +{ + return((char *)string + (unsigned)ccnt); +} +#endif /* _MBCS */ |